[openstack-dev] [Heat] Combination of Heat ResourceGroup(index) with Fn::Select doesnt work ?

Subrahmanyam Ongole songole at oneconvergence.com
Tue Oct 21 18:05:26 UTC 2014


Hi

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.

Regards
Subra

On Tue, Oct 21, 2014 at 8:55 AM, Fox, Kevin M <Kevin.Fox at pnnl.gov> wrote:

>  use a OS::Neutron::PoolMember instead. Then each member template can add
> itself to the pool.
>
>  ------------------------------
> *From:* Magesh GV [magesh.gv at oneconvergence.com]
> *Sent:* Tuesday, October 21, 2014 12:07 AM
> *To:* openstack-dev at lists.openstack.org
> *Subject:* [openstack-dev] Combination of Heat ResourceGroup(index) with
> Fn::Select doesnt work ?
>
>   I am trying to find a way of creating a dynamic List of
> Resources(Loadbalancer PoolMembers to be exact) using Heat.
>
>  The idea is that the number of PoolMembers and the required Addresses
> would be received as  Heat parameters.
>
>  However, I am unable to get %index% working inside a Fn:Select block.
>
>  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 ?
>
>  IMO this is a very important usecase for the %index%.
>
>  "Parameters": {
> "NumberOfMembers": {
>             "Description": "Number of Pool Members to be created",
>             "Type": "Number",
>     "Default": 1
>         },
>         "MembersList": {
>             "Description": "Pool Member IP Address",
>             "Type": "Json",
>     "Default": {"key0":"11.0.0.43"}
>         }
>     },
>
>  "MemberList": {
>          "Type": "OS::Heat::ResourceGroup",
>         "Properties": {
>           "count": {"Ref":"NumberOfMembers"},
>           "resource_def": {
>      "type": "OS::Neutron::PoolMember",
>      "properties": {
> "address": { "Fn::Select" : [ "key%index%", {"Ref":"MembersList"}] },
>              "admin_state_up": true,
>              "pool_id": {"Ref":"HaproxyPool"},
>              "protocol_port": "80",
>      "weight": 1
>            }
>      }
>           }
>  }
>
>  Regards,
> Magesh
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 

Thanks
OSM
(Subrahmanyam Ongole)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141021/e4326d3f/attachment.html>


More information about the OpenStack-dev mailing list