Fix workflow documents

Change the way get result of tasks

Change-Id: Ic3ca93c967269fe0f4c3f7124470fb04661122ed
This commit is contained in:
Bo Tran 2019-09-09 16:05:32 +07:00
parent b8a8aad645
commit f13b69ca69
2 changed files with 5 additions and 5 deletions

View File

@ -253,7 +253,7 @@ YAML example
action: nova.servers_create name=<% $.vm_name %> \ action: nova.servers_create name=<% $.vm_name %> \
image=<% $.image_ref %> flavor=<% $.flavor_ref %> image=<% $.image_ref %> flavor=<% $.flavor_ref %>
publish: publish:
vm_ids: <% $.create_servers.id %> vm_ids: <% task().result.id %>
on-success: on-success:
- wait_for_servers - wait_for_servers

View File

@ -26,7 +26,7 @@ YAML example
    create_server:     create_server:
      action: nova.servers_create name=<% $.vm_name %> image=<% $.image_ref %> flavor=<% $.flavor_ref %>       action: nova.servers_create name=<% $.vm_name %> image=<% $.image_ref %> flavor=<% $.flavor_ref %>
      publish:       publish:
        vm_id: <% $.id %>         vm_id: <% task().result.id %>
      on-success:       on-success:
        - wait_for_instance         - wait_for_instance
    wait_for_instance:     wait_for_instance:
@ -76,7 +76,7 @@ YAML example of direct workflow
    create_vm:     create_vm:
      action: nova.servers_create name=<% $.vm_name %> image=<% $.image_id %> flavor=<% $.flavor_id %>       action: nova.servers_create name=<% $.vm_name %> image=<% $.image_id %> flavor=<% $.flavor_id %>
      publish:       publish:
        vm_id: <% $.id %>         vm_id: <% task().result.id %>
      on-error:       on-error:
        - send_error_email         - send_error_email
      on-success:       on-success:
@ -124,11 +124,11 @@ YAML example of reverse workflow
    create_vm:     create_vm:
      action: nova.servers_create name=<% $.vm_name %> image=<% $.image_id %> flavor=<% $.flavor_id %>       action: nova.servers_create name=<% $.vm_name %> image=<% $.image_id %> flavor=<% $.flavor_id %>
      publish:       publish:
        vm_id: <% $.id %>         vm_id: <% task().result.id %>
    search_for_ip:     search_for_ip:
      action: nova.floating_ips_findall instance_id=null       action: nova.floating_ips_findall instance_id=null
      publish:       publish:
        vm_ip: <% $[0].ip %>         vm_ip: <% task().result.ip %>
    associate_ip:     associate_ip:
      action: nova.servers_add_floating_ip server=<% $.vm_id %> address=<% $.vm_ip %>       action: nova.servers_add_floating_ip server=<% $.vm_id %> address=<% $.vm_ip %>
      requires: [search_for_ip]       requires: [search_for_ip]