Ask Your Question
0

Unable to retrieve parameters passed as comma_delimited_list

asked 2016-06-22 04:55:08 -0500

abdul.chetpet gravatar image

Following is the parameter block :

  parameters :   
    instance_ip_list:
    type: comma_delimited_list
    description: List of floating IPs to be assigned to Instances

Thereafter in the resources block, am accessing it :

 inst_floating_ip:
      type: OS::Neutron::FloatingIP
      properties:
        floating_network: { get_param: public_net }
        floating_ip_address:  { "Fn::Select" : [ { get_param: public_ip_index}, { get_param: [public_ip] } ] }
        port_id: { get_resource: inst_port }

And I supply the parameters in a separate environment file :

 parameter_defaults:
   instance_ip_list: "10.10.149.74,10.10.149.75"

However, on instantiating the stack, the instance_ip_list is empty leading to failure in stack creation. But If I add the following defaults in the template, then it works fine.

default: ["10.10.149.72","10.10.149.73"]

Please can someone help in clarifying why this difference in behaviour.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-23 07:02:49 -0500

teju gravatar image

You need to pass a list (Python data type) of IP addresses like ["10.10.149.72","10.10.149.73"].

Instead, if you pass "10.10.149.74,10.10.149.75" , the code treats this as an incompatible data type since this is a string and the code is expecting a list

edit flag offensive delete link more

Comments

Have tried that as well

parameter_defaults:
  instance_ip_list: ["10.10.149.74","10.10.149.75"]

And error is Resource CREATE failed: resources.dsc-instance: resources[1]: Property error: resources.inst_floating_ip.properties.floating_ip_address: Error validating value '': Invalid IP addres

abdul.chetpet gravatar imageabdul.chetpet ( 2016-06-23 07:31:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-06-22 04:55:08 -0500

Seen: 63 times

Last updated: Jun 23 '16