<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">use a OS::Neutron::PoolMember instead. Then each member template can add itself to the pool.<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF731661"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Magesh GV [magesh.gv@oneconvergence.com]<br>
<b>Sent:</b> Tuesday, October 21, 2014 12:07 AM<br>
<b>To:</b> openstack-dev@lists.openstack.org<br>
<b>Subject:</b> [openstack-dev] Combination of Heat ResourceGroup(index) with Fn::Select doesnt work ?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div style="font-family:arial,sans-serif; font-size:13px">I am trying to find a way of creating a dynamic List of Resources(Loadbalancer PoolMembers to be exact) using Heat. </div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">The idea is that the number of PoolMembers and the required Addresses would be received as  Heat parameters. </div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">However, I am unable to get %index% working inside a Fn:Select block.</div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">Is this a bug with Heat or am I doing something wrong ? If this is a bug/limitation in heat is there some other way to get what I am trying to do working with heat ?</div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">IMO this is a very important usecase for the %index%.</div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">
<div>"Parameters": {</div>
<div><span style="white-space:pre-wrap"></span>"NumberOfMembers": {</div>
<div>            "Description": "Number of Pool Members to be created",</div>
<div>            "Type": "Number",</div>
<div><span style="white-space:pre-wrap"></span>    "Default": 1</div>
<div>        },</div>
<div>        "MembersList": {</div>
<div>            "Description": "Pool Member IP Address",</div>
<div>            "Type": "Json",</div>
<div><span style="white-space:pre-wrap"></span>    "Default": {"key0":"11.0.0.43"}</div>
<div>        }</div>
<div>    },</div>
</div>
<div style="font-family:arial,sans-serif; font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">"MemberList": {<br>
</div>
<div style="font-family:arial,sans-serif; font-size:13px">        "Type": "OS::Heat::ResourceGroup",</div>
<div style="font-family:arial,sans-serif; font-size:13px">        "Properties": {</div>
<div style="font-family:arial,sans-serif; font-size:13px">          "count": {"Ref":"NumberOfMembers"},</div>
<div style="font-family:arial,sans-serif; font-size:13px">          "resource_def": {</div>
<div style="font-family:arial,sans-serif; font-size:13px"><span style="white-space:pre-wrap"></span>     "type": "OS::Neutron::PoolMember", </div>
<div style="font-family:arial,sans-serif; font-size:13px"><span style="white-space:pre-wrap"></span>     "properties": {</div>
<div style="font-family:arial,sans-serif; font-size:13px"><span style="white-space:pre-wrap"></span>"address": { "Fn::Select" : [ "key%index%", {"Ref":"MembersList"}] },</div>
<div style="font-family:arial,sans-serif; font-size:13px">            <span style="white-space:pre-wrap">
</span>"admin_state_up": true,</div>
<div style="font-family:arial,sans-serif; font-size:13px">            <span style="white-space:pre-wrap">
</span>"pool_id": {"Ref":"HaproxyPool"},</div>
<div style="font-family:arial,sans-serif; font-size:13px">            <span style="white-space:pre-wrap">
</span>"protocol_port": "80",</div>
<div style="font-family:arial,sans-serif; font-size:13px"><span style="white-space:pre-wrap"></span>    <span style="white-space:pre-wrap">
</span>"weight": 1</div>
<div style="font-family:arial,sans-serif; font-size:13px">          <span style="white-space:pre-wrap">
</span>}</div>
<div style="font-family:arial,sans-serif; font-size:13px"><span style="white-space:pre-wrap"></span>     }</div>
<div style="font-family:arial,sans-serif; font-size:13px">       <span style="white-space:pre-wrap">
</span>  }</div>
<div style="font-family:arial,sans-serif; font-size:13px">
<div>}</div>
<div><br>
</div>
<div>Regards,</div>
<div>Magesh</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>