<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:10pt;color:#000000;background-color:#FFFFFF;font-family:Tahoma,Geneva,sans-serif;">
<div style="color: rgb(33, 33, 33);" dir="ltr">
<div>
<div id="divtagdefaultwrapper" style="font-size:10pt; color:#000000; background-color:#FFFFFF; font-family:Tahoma,Geneva,sans-serif">
<div dir="ltr" style="color:rgb(33,33,33)">
<div>
<div id="divtagdefaultwrapper" style="font-size:10pt; color:#000000; background-color:#FFFFFF; font-family:Tahoma,Geneva,sans-serif">
<p>Hello All,</p>
<p><br>
</p>
<p>Can we create multiple resources using a single task, like multiple keypairs or security-groups or networks etc?</p>
<p><br>
</p>
<p>I am trying to extend the existing "create_vm" workflow, such that it accepts a list of security groups. In the workflow, before create_vm I am trying to create the security group if it does not exist.</p>
<p><br>
</p>
<p>Just to test the security group functionality individually I wrote a sample workflow:</p>
<p>--------------------<br>
</p>
<p>version: '2.0'<br>
<br>
name: secgroup_actions<br>
<br>
workflows:<br>
  create_security_group:<br>
    type: direct<br>
    input:<br>
      - name<br>
      - description<br>
<br>
    tasks:<br>
      create_secgroups:<br>
        action: nova.security_groups_create name={$.name} description={$.description}<br>
------------</p>
<p>This is a straight forward workflow, but I am unable figure out how to pass multiple security groups to the above workflow.</p>
<p>I tried passing multiple dicts in context file but it did not work.<br>
</p>
<p>------<br>
</p>
<p>{<br>
  "name": "secgrp1",<br>
  "description": "using mistral"<br>
},<br>
{<br>
  "name": "secgrp2",<br>
  "description": "using mistral"<br>
}</p>
<p>-----</p>
<p><br>
Is there any way to modify this workflow such that it creates more than one security group?
</p>
<p>Please help.</p>
<p><br>
</p>
<p>Regards,</p>
<p>Sushma<br>
</p>
</div>
<p><br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<p>DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
</p>
</body>
</html>