Skip to content

Commit

Permalink
CCT-1200: updated virtwho_host function to provide an argument reserv…
Browse files Browse the repository at this point in the history
…e_duration
  • Loading branch information
jstavel committed Feb 24, 2025
1 parent 42ec915 commit 43f6cb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion utils/beaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def beaker_job_submit(
"--task /distribution/reservesys"
)
whiteboard = f'--whiteboard="reserve host for {job_name}"'
reserve = f"--reserve --reserve-duration {reserve_duration} --priority Urgent"
reserve = "--reserve --priority Urgent" + \
((reserve_duration and f" --reserve-duration {reserve_duration}") or \
(config.beaker.get("reserve_duration") and f" --reserve-duration {config.beaker.get('reserve_duration')}") or "")
cmd = (
f"bkr workflow-simple --prettyxml "
f"{task} {whiteboard} {reserve} "
Expand Down
2 changes: 1 addition & 1 deletion virtwho/provision/virtwho_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def beaker_args_define(args):
args.host = args.beaker_host
args.host_type = "physical"
args.host_require = None

args.reserve_duration = None

def virtwho_install(ssh, url=None):
"""
Expand Down

0 comments on commit 43f6cb2

Please sign in to comment.