Merge "Hide attach fip if already fip attached"

This commit is contained in:
Jenkins 2015-06-23 07:38:35 +00:00 committed by Gerrit Code Review
commit 29ef0549a3

View File

@ -557,6 +557,10 @@ class AssociateIP(policy.PolicyTargetMixin, tables.LinkAction):
return False
if instance.status == "ERROR":
return False
for addresses in instance.addresses.values():
for address in addresses:
if address.get('OS-EXT-IPS:type') == "floating":
return False
return not is_deleting(instance)
def get_link_url(self, datum):