---
version: '2.0'

name: glance_actions

workflows:
  get_first_glance_image:
    type: direct

    output:
      image:
        id: <% $.image_id %>
        name: <% $.image_name %>

    tasks:
      get_image_id:
        action: glance.images_list
        publish:
          image_id: <% task(get_image_id).result[0].id %>
        on-success:
          - get_image_name

      get_image_name:
        action: glance.images_get image_id=<% $.image_id %>
        publish:
          image_name: <% task(get_image_name).result.name %>
