Skip to content

Commit

Permalink
Fix optional trusted_exec
Browse files Browse the repository at this point in the history
  • Loading branch information
philogicae committed Aug 27, 2024
1 parent 991670c commit 348508a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/aleph/sdk/client/authenticated_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,18 @@ async def create_instance(
# Default to the QEMU hypervisor for instances.
selected_hypervisor: HypervisorType = hypervisor or HypervisorType.qemu

environment_kwargs = dict(
internet=internet,
aleph_api=aleph_api,
hypervisor=selected_hypervisor,
)
if trusted_execution:
environment_kwargs["trusted_execution"] = trusted_execution

content = InstanceContent(
address=address,
allow_amend=allow_amend,
environment=InstanceEnvironment(
internet=internet,
aleph_api=aleph_api,
hypervisor=selected_hypervisor,
trusted_execution=trusted_execution,
),
environment=InstanceEnvironment(**environment_kwargs),
variables=environment_variables,
resources=MachineResources(
vcpus=vcpus,
Expand Down

0 comments on commit 348508a

Please sign in to comment.