summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-02 06:40:12 +0000
committerGerrit Code Review <review@openstack.org>2013-03-02 06:40:12 +0000
commit041e8ccd74bf7537163abf2de51a5ce68dab3a4d (patch)
treefde52e1ffae834ffdf7c629970349d40eff77754
parent6c5efd36698b7e141b6d81b1d519f22def687eef (diff)
parent42c2f7f7d1858c1d41807fd6e6cc0df748778446 (diff)
downloadnova-041e8ccd74bf7537163abf2de51a5ce68dab3a4d.tar.gz
nova-041e8ccd74bf7537163abf2de51a5ce68dab3a4d.tar.xz
nova-041e8ccd74bf7537163abf2de51a5ce68dab3a4d.zip
Merge "Pep8/pyflakes cleanup of deprecated_api"
-rw-r--r--nova/network/api_deprecated.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/nova/network/api_deprecated.py b/nova/network/api_deprecated.py
index 734a990e3..1f23d90f7 100644
--- a/nova/network/api_deprecated.py
+++ b/nova/network/api_deprecated.py
@@ -97,8 +97,8 @@ class API(base.Base):
@wrap_check_policy
def get_floating_ips_by_fixed_address(self, context, fixed_address):
- return self.network_rpcapi.get_floating_ips_by_fixed_address(context,
- fixed_address)
+ args = (context, fixed_address)
+ return self.network_rpcapi.get_floating_ips_by_fixed_address(*args)
@wrap_check_policy
def get_backdoor_port(self, context, host):
@@ -108,12 +108,12 @@ class API(base.Base):
def get_instance_id_by_floating_address(self, context, address):
# NOTE(tr3buchet): i hate this
return self.network_rpcapi.get_instance_id_by_floating_address(context,
- address)
+ address)
@wrap_check_policy
def get_vifs_by_instance(self, context, instance):
return self.network_rpcapi.get_vifs_by_instance(context,
- instance['id'])
+ instance['id'])
@wrap_check_policy
def get_vif_by_mac_address(self, context, mac_address):
@@ -127,14 +127,16 @@ class API(base.Base):
# will probably need to move into a network supervisor
# at some point.
return self.network_rpcapi.allocate_floating_ip(context,
- context.project_id, pool, False)
+ context.project_id,
+ pool,
+ False)
@wrap_check_policy
def release_floating_ip(self, context, address,
affect_auto_assigned=False):
"""Removes (deallocates) a floating ip with address from a project."""
- return self.network_rpcapi.deallocate_floating_ip(context, address,
- affect_auto_assigned)
+ args = (context, address, affect_auto_assigned)
+ return self.network_rpcapi.deallocate_floating_ip(*args)
@wrap_check_policy
@refresh_cache
@@ -145,8 +147,8 @@ class API(base.Base):
ensures floating ip is allocated to the project in context
"""
- orig_instance_uuid = self.network_rpcapi.associate_floating_ip(context,
- floating_address, fixed_address, affect_auto_assigned)
+ args = (context, floating_address, fixed_address, affect_auto_assigned)
+ orig_instance_uuid = self.network_rpcapi.associate_floating_ip(*args)
if orig_instance_uuid:
msg_dict = dict(address=floating_address,
@@ -165,7 +167,7 @@ class API(base.Base):
affect_auto_assigned=False):
"""Disassociates a floating ip from fixed ip it is associated with."""
self.network_rpcapi.disassociate_floating_ip(context, address,
- affect_auto_assigned)
+ affect_auto_assigned)
@wrap_check_policy
@refresh_cache
@@ -231,7 +233,7 @@ class API(base.Base):
def add_network_to_project(self, context, project_id, network_uuid=None):
"""Force adds another network to a project."""
self.network_rpcapi.add_network_to_project(context, project_id,
- network_uuid)
+ network_uuid)
@wrap_check_policy
def associate(self, context, network_uuid, host=_sentinel,
@@ -340,7 +342,7 @@ class API(base.Base):
@wrap_check_policy
def setup_networks_on_host(self, context, instance, host=None,
- teardown=False):
+ teardown=False):
"""Setup or teardown the network structures on hosts related to
instance"""
host = host or instance['host']
@@ -364,8 +366,8 @@ class API(base.Base):
return network['multi_host']
def _get_floating_ip_addresses(self, context, instance):
- floating_ips = self.db.instance_floating_address_get_all(context,
- instance['uuid'])
+ args = (context, instance['uuid'])
+ floating_ips = self.db.instance_floating_address_get_all(*args)
return [floating_ip['address'] for floating_ip in floating_ips]
@wrap_check_policy