Files
Jakob Meng 0ded7ac398 Enable add_ips_to_server() and _needs_floating_ip() for pristine server resources
Previously, both functions [1] and [2] would have to be called with
server objects which have been enhanced by add_server_interfaces()
[3]. The latter adds 'public_v4' and 'private_v4' attributes to the
server objects which the default server resource [4] does not have.

Now, we check server's 'addresses' attributes for fixed and floating
ip addresses [5] in case the 'public_v4' and 'private_v4' attributes
are not available. The checks for fixed vs floating ip addresses are
equal to how find_nova_addresses() [6] distinguishes between both
ip address types.

[1] 3f81d0001d/openstack/cloud/_floating_ip.py (L979)
[2] 3f81d0001d/openstack/cloud/_floating_ip.py (L997)
[3] 3f81d0001d/openstack/cloud/meta.py (L439)
[4] https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/compute/v2/server.py
[5] 3f81d0001d/openstack/compute/v2/server.py (L81)
[6] 3f81d0001d/openstack/cloud/meta.py (L69)

Change-Id: I064ed922be440d911fbc492dab8465e8f75236df
2022-08-03 14:33:55 +02:00
..
2021-03-08 16:50:54 +01:00
2022-06-03 07:38:55 +00:00
2022-05-26 12:29:48 +01:00
2021-03-08 16:50:54 +01:00
2022-04-14 12:50:53 +00:00