Commit c85c3508 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Rename FloatingIP to IPAddress

FloatingIP table has been removed. Instead floating IPs are stored in
the IPAddress table and are distinguished from other IP addresses by
the 'floating_ip' attribute.
parent e7e447ef
......@@ -322,12 +322,15 @@ def get_commission_info(resource, action, action_fields=None):
return resources
elif action == "DESTROY":
return reverse_quantities(resources)
elif isinstance(resource, FloatingIP):
resources = {"cyclades.floating_ip": 1}
if action == "BUILD":
return resources
elif action == "DESTROY":
return reverse_quantities(resources)
elif isinstance(resource, IPAddress):
if resource.floating_ip:
resources = {"cyclades.floating_ip": 1}
if action == "BUILD":
return resources
elif action == "DESTROY":
return reverse_quantities(resources)
else:
return None
def reverse_quantities(resources):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment