Add attribute 'first_address' to OS::Neutron::Port

Bug #1262196 reported by Alexander Chudnovets
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Won't Fix
Wishlist
Sergey Kraynev

Bug Description

For now it's quite tricky to get first IP address from OS::Neutron::Port:

{ "Fn::Select": ["ip_address", { "Fn::Select": [0, { get_attr: [ server1_port, fixed_ips ] }] }] }

And currently it doesn't work in havana (https://review.openstack.org/#/c/56829/).

So may be we can add an extra attribute like 'first_address' in OS::Nova::Server?

description: updated
Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This would need to be address_ipv4 or something like that, since IIRC the only way you get multiple addresses is ipv4 or ipv6.

Changed in heat:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Sergey Kraynev (skraynev) wrote :

Clint, your solution is:
1. creating one attribute with name "address_ip"
2. this attribute return list or dict of two addresses ipv4 and ipv6
3. these ip addresses are fixed.
Am I right?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

No I think an attribute first_address_ipv4 and another, first_address_ipv6, would be useful and work for 99% of users.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/67836

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
Sergey Kraynev (skraynev) wrote :

Hm. I suppose, that we should close this bug according to SteveBaker's comment on https://review.openstack.org/67836.
As additional will be good open bug with removing first_address attribute for OS::Nova::Server

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

It is now possible to do get_attr: [server1_port, fixed_ips, 0, ip_address]

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

And yes, OS::Nova::Server first_address can now be deprecated

Changed in heat:
status: In Progress → Opinion
Changed in heat:
status: Opinion → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.