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

Use kwargs for auto_release_time #637

Merged
merged 1 commit into from
Oct 26, 2023
Merged
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
18 changes: 12 additions & 6 deletions osism/commands/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,24 @@ def handle_role(
environment = f"{environment}.{sub}"
if role.startswith("ceph-"):
t = ceph.run.delay(
environment, role[5:], arguments, auto_release_time=task_timeout
environment,
role[5:],
arguments,
{"auto_release_time": task_timeout},
)
else:
t = ceph.run.delay(
environment, role, arguments, auto_release_time=task_timeout
environment, role, arguments, {"auto_release_time": task_timeout}
)
elif role == "loadbalancer-ng":
if sub:
environment = f"{environment}.{sub}"
g = group(
kolla.run.si(
environment, playbook, arguments, auto_release_time=task_timeout
environment,
playbook,
arguments,
{"auto_release_time": task_timeout},
)
for playbook in enums.LOADBALANCER_PLAYBOOKS
)
Expand All @@ -201,7 +207,7 @@ def handle_role(
environment,
"loadbalancer-ng",
arguments,
auto_release_time=task_timeout,
{"auto_release_time": task_timeout},
)
| g
).apply_async()
Expand All @@ -221,7 +227,7 @@ def handle_role(
kolla_arguments = [f"-e kolla_action={action}"] + arguments

t = kolla.run.delay(
environment, role, kolla_arguments, auto_release_time=task_timeout
environment, role, kolla_arguments, {"auto_release_time": task_timeout}
)
else:
# Overwrite the environment
Expand All @@ -234,7 +240,7 @@ def handle_role(
f" {environment} was not found."
)
t = ansible.run.delay(
environment, role, arguments, auto_release_time=task_timeout
environment, role, arguments, {"auto_release_time": task_timeout}
)

if isinstance(t, GroupResult):
Expand Down