Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optional trusted_exec #158

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading