[Openstack] Question on using a combination of Heat ResourceGroup(index) with Fn::Select

Magesh GV magesh.gv at oneconvergence.com
Mon Oct 20 04:09:23 UTC 2014


I am trying to find a way of creating a dynamic List of Loadbalancer
PoolMembers 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 there some other way to get this working with heat ? The constraint is
that I cannot use autoscale group and the IP Address and number of Members
should come as arguments to the Heat Template.

"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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141020/66ec54be/attachment.html>


More information about the Openstack mailing list