Skip to content

Commit

Permalink
feat: allow worker config tests to disallow instance profile
Browse files Browse the repository at this point in the history
Signed-off-by: Li <52769999+YutongLi291@users.noreply.github.com>
  • Loading branch information
YutongLi291 committed Nov 12, 2024
1 parent 005efe4 commit fb2b63c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/deadline_test_fixtures/deadline/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class DeadlineWorkerConfiguration:
no_install_service: bool = False
service_model_path: str | None = None
no_local_session_logs: str | None = None
disallow_instance_profile: str | None = None

"""Mapping of files to copy from host environment to worker environment"""
file_mappings: list[tuple[str, str]] | None = None
Expand Down Expand Up @@ -544,6 +545,7 @@ def configure_worker_command(self, *, config: DeadlineWorkerConfiguration) -> st
+ f"--region {config.region} "
+ f"--user {config.agent_user} "
+ f"{'--allow-shutdown ' if config.allow_shutdown else ''}"
+ f"{'--disallow-instance-profile ' if config.disallow_instance_profile else ''}"
),
# fmt: on
]
Expand Down Expand Up @@ -767,6 +769,7 @@ def configure_worker_command(
+ f"--group {config.job_user_group} "
+ f"{'--allow-shutdown ' if config.allow_shutdown else ''}"
+ f"{'--no-install-service ' if config.no_install_service else ''}"
+ f"{'--disallow-instance-profile ' if config.disallow_instance_profile else ''}"
),
# fmt: on
f"runuser --login {self.configuration.agent_user} --command 'echo \"source /opt/deadline/worker/bin/activate\" >> $HOME/.bashrc'",
Expand Down

0 comments on commit fb2b63c

Please sign in to comment.