Support get_file for Heat Mistral Resource Type (Mistral Workflow)

Registered by Guy Paz

Currently user can deploy Hot template that contain Mistral Resource Type.
But Heat is using different format of Mistral Workflow and user cannot use the same format as Mistral or even use get_file while the file is Mistral workflow.

In case that user has a very complex Mistral Workflows and now he want to deploy it over Heat he will need to translate it manually to the Heat syntax .

It will be much more simple to use a Workflow file from Mistral and combine that in the hot template .

Simple Mistral WF example :
=======================
---
version: '2.0'

heal_stack_servers_:
  description: Simple workflow example
  type: direct
  input:
    - stack_id: 'fd39cb0c-dfbb-4251-bff7-03110ae00e98'
    - status_and_action: { 'SUSPENDED': 'resume', 'SHUTOFF': 'rebuild' }
    - resources_list_nested_depth: 99

  tasks:
    list_stack_servers:
      action: heat.resources_list stack_id=<% $.stack_id %> nested_depth=<% $.resources_list_nested_depth %>
      publish:
        servers_ids: <% $.list_stack_servers.where($.resource_type = 'OS::Nova::Server').select($.physical_resource_id) %>
      on-success:
        - start_heal_server_s_workflow: <% $.servers_ids.len() > 0 %>

    start_heal_server_s_workflow:
      with-items: server_id in <% $.servers_ids %>
      workflow: heal_server_ server_id=<% $.server_id %> status_and_action=<% $.status_and_action %>

EOF

And here how it looks like in hot :
==========================
  heal_stack_servers:
    type: OS::Mistral::Workflow
    properties:
      name: heal_stack_servers
      type: direct
      input:
        stack_id: { get_param: "OS::stack_id" }
        status_and_action: { 'SUSPENDED': 'resume', 'SHUTOFF': 'rebuild' }
        resources_list_nested_depth: 99

      tasks:
        - name: list_stack_servers
          action: heat.resources_list stack_id=<% $.stack_id %> nested_depth=<% $.resources_list_nested_depth %>
          publish:
            servers_ids: <% $.list_stack_servers.where($.resource_type = 'OS::Nova::Server').select($.physical_resource_id) %>
          on_success:
            - start_heal_servers_workflow: <% $.servers_ids.len() > 0 %>

        - name: start_heal_servers_workflow
          with-items: server_id in <% $.servers_ids %>
          workflow: heal_server
          input:
            server_id: <% $.server_id %>
            status_and_action: <% $.status_and_action %>
          publish:
            server_ids: <% $.servers_ids %>
            status_and_action: <% $.status_and_action %>
EOF

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Guy Paz
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Thomas Herve

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.