<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;">Ah, sorry. I misunderstood what you were trying to do.<br>
<br>
Why create a template that takes in a list of pool members, rather then pass the pool id to the template the instance is in, and use a PoolMember to attach it?<br>
<br>
Thanks,<br>
Kevin<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF435506"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Subrahmanyam Ongole [songole@oneconvergence.com]<br>
<b>Sent:</b> Tuesday, October 21, 2014 11:05 AM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> Re: [openstack-dev] [Heat] Combination of Heat ResourceGroup(index) with Fn::Select doesnt work ?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
Hi</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
We are in fact using OS::Neutron::PoolMember resource. I guess ResourceGroup is the only iterative construct in Heat. Is the use case supported today? I think this is more than a simple usage question, hence posting it here. Thank you.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
Regards</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif; font-size:small; color:#073763">
Subra </div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Oct 21, 2014 at 8:55 AM, Fox, Kevin M <span dir="ltr">
<<a href="mailto:Kevin.Fox@pnnl.gov" target="_blank">Kevin.Fox@pnnl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<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>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Magesh GV [<a href="mailto:magesh.gv@oneconvergence.com" target="_blank">magesh.gv@oneconvergence.com</a>]<br>
<b>Sent:</b> Tuesday, October 21, 2014 12:07 AM<br>
<b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a><br>
<b>Subject:</b> [openstack-dev] Combination of Heat ResourceGroup(index) with Fn::Select doesnt work ?<br>
</font><br>
</div>
<div>
<div class="h5">
<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>
</div>
</div>
</div>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<br>
Thanks<br>
OSM<br>
(Subrahmanyam Ongole)<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>