summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/network/api.py2
-rw-r--r--nova/network/manager.py8
2 files changed, 6 insertions, 4 deletions
diff --git a/nova/network/api.py b/nova/network/api.py
index 44b3c802b..9c66c8f6e 100644
--- a/nova/network/api.py
+++ b/nova/network/api.py
@@ -66,6 +66,8 @@ class API(base.Base):
fixed_ip is either a fixed_ip object or a string fixed ip address
floating_ip is a string floating ip address
"""
+ # NOTE(tr3buchet): i don't like the "either or" argument type
+ # funcationility but i've left it alone for now
if isinstance(fixed_ip, basestring):
fixed_ip = self.db.fixed_ip_get_by_address(context, fixed_ip)
floating_ip = self.db.floating_ip_get_by_address(context, floating_ip)
diff --git a/nova/network/manager.py b/nova/network/manager.py
index ba5b80522..3150eda01 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -345,9 +345,9 @@ class NetworkManager(manager.SchedulerDependentManager):
rpc.called by network_api
"""
- instance_id = kwargs.get('instance_id')
- project_id = kwargs.get('project_id')
- type_id = kwargs.get('instance_type_id')
+ instance_id = kwargs.pop('instance_id')
+ project_id = kwargs.pop('project_id')
+ type_id = kwargs.pop('instance_type_id')
admin_context = context.elevated()
LOG.debug(_("network allocations for instance %s"), instance_id,
context=context)
@@ -364,7 +364,7 @@ class NetworkManager(manager.SchedulerDependentManager):
rpc.called by network_api
kwargs can contain fixed_ips to circumvent another db lookup
"""
- instance_id = kwargs.get('instance_id')
+ instance_id = kwargs.pop('instance_id')
fixed_ips = kwargs.get('fixed_ips') or \
self.db.fixed_ip_get_all_by_instance(context, instance_id)
LOG.debug(_("network deallocation for instance |%s|"), instance_id,