[Openstack] [HEAT] order in attributes list

Volodymyr Litovka doka.ua at gmx.com
Tue Apr 3 15:10:58 UTC 2018


Hi colleagues,

I have the following HOT configuration of a port:

   n1-wan:
     type: OS::Neutron::Port
     properties:
       fixed_ips:
         - { subnet: e-subnet1, ip_address: 51.x.x.x }
         - { subnet: e-subnet2, ip_address: 25.x.x.x }

when I try to extract these values in template using {get_attr}, then, 
regardless of fixed_ips' order in port definition (either "subnet1, 
subnet2" or "subnet2, subnet1"), the value of { get_attr: [n1-wan, 
fixed_ips] } always give the following result:

output_value:
    - ip_address: 25.x.x.x
       subnet_id: ...
    - ip_address: 51.x.x.x
      subnet_id: ...

and, thus, { get_attr: [n1-wan, fixed_ips, 1, ip_address ] } gives me 
51.x.x.x value.

So, the question is - how the list of fixed_ips is ordered? Is there way 
to know for sure index of entry I'm interested in?

Thank you.

-- 
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison




More information about the Openstack mailing list