[openstack-dev] [Mistral] Query on creating multiple resources

Nikolay Makhotkin nmakhotkin at mirantis.com
Mon Dec 8 15:54:04 UTC 2014


Hi, Sushma!

Can we create multiple resources using a single task, like multiple
> keypairs or security-groups or networks etc?


Yes, we can. This feature is in the development now and it is considered as
experimental -
https://blueprints.launchpad.net/mistral/+spec/mistral-dataflow-collections

Just clone the last master branch from mistral.

You can specify "for-each" task property and provide the array of data to
your workflow:

 --------------------

version: '2.0'

name: secgroup_actions

workflows:
  create_security_group:
    type: direct
    input:
      - array_with_names_and_descriptions

    tasks:
      create_secgroups:

        for-each:

          data: $.array_with_names_and_descriptions
        action: nova.security_groups_create name={$.data.name}
description={$.data.description}
------------

On Mon, Dec 8, 2014 at 6:36 PM, Zane Bitter <zbitter at redhat.com> wrote:

> On 08/12/14 09:41, Sushma Korati wrote:
>
>> Can we create multiple resources using a single task, like multiple
>> keypairs or security-groups or networks etc?
>>
>
> Define them in a Heat template and create the Heat stack as a single task.
>
> - ZB
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best Regards,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141208/7c232293/attachment.html>


More information about the OpenStack-dev mailing list