Skip to content

Commit a5a1bbf

Browse files
author
earthmant
committed
one last fix
1 parent c3379a4 commit a5a1bbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neutron_plugin/port.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ def attach(nova_client, neutron_client, **kwargs):
122122

123123
floating_ip_address = None
124124
for target in ctx.target.instance.relationships:
125-
floatingip_id = \
126-
target.target.instance.runtime_properties[OPENSTACK_ID_PROPERTY]
127125
if target.type == PORT_ADDRESS_REL_TYPE:
126+
target_instance = target.target.instance
127+
floatingip_id = \
128+
target_instance.runtime_properties[OPENSTACK_ID_PROPERTY]
128129
floating_ip = neutron_client.show_floatingip(floatingip_id)
129130
floating_ip_address = \
130131
floating_ip['floatingip']['floating_ip_address']

0 commit comments

Comments
 (0)