Modify vm_job example

* Sometimes we can't associate IP to VM if
   the VM is on stage 'build' or 'spawning'
 * Added new task - wait_vm_active

Change-Id: I9c71202861717f1e0ee80b171d73e91d790e212c
This commit is contained in:
Nikolay Mahotkin 2014-09-26 12:55:22 +04:00
parent f677426410
commit bc07108581
1 changed files with 12 additions and 0 deletions

View File

@ -70,6 +70,18 @@ workflows:
action: nova.floating_ips_findall instance_id=null
publish:
vm_ip: $[0].ip
on-success:
- wait_vm_active
on-error:
- send_create_vm_error
wait_vm_active:
description: Waits till VM is ACTIVE.
action: nova.servers_find id={$.vm_id} status="ACTIVE"
policies:
retry:
count: 5
delay: 10
on-success:
- associate_ip
on-error: