Skip to content

Commit

Permalink
To extend the existing two wait_for states with support
Browse files Browse the repository at this point in the history
for parametric timeouts, timeout value is taken from
reclass pillar data.

wait_for_deployed.sls
wait_for_ready.sls

Signed-off-by: ting wu <[email protected]>
  • Loading branch information
tiwuu committed May 31, 2018
1 parent bca1f46 commit c4434e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions maas/machines/wait_for_deployed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ wait_for_machines_deployed:
- name: maas.wait_for_machine_status
- kwargs:
req_status: "Deployed"
{%- if region.timeout is defined and region.timeout.deployed is defined %}
timeout: {{ region.timeout.deployed }}
{%- endif %}
- require:
- cmd: maas_login_admin
4 changes: 4 additions & 0 deletions maas/machines/wait_for_ready.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ maas_login_admin:
wait_for_machines_ready:
module.run:
- name: maas.wait_for_machine_status
- kwargs:
{%- if region.timeout is defined and region.timeout.ready is defined %}
timeout: {{ region.timeout.ready }}
{%- endif %}
- require:
- cmd: maas_login_admin

0 comments on commit c4434e2

Please sign in to comment.