From 45e92d47038514fc05ae17a8a38dae1b337c15fe Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 17 Jan 2013 12:42:24 -0800 Subject: Optimize network calls by moving them to api Now that quantumv2 replaces api, there is no need for many of the network calls to go over rpc. This patch optimizes them by moving the implementation into the api class. Note that the old methods are left in place to keep rpcapi compatibility. This patch also adds api_deprecated in case anyone is using a custom out-of-tree manager class. It is possible to set: network_api_class=nova.network.api_deprecated.API to get the old functionality. Part of blueprint optimize-nova-network Change-Id: I130908df060246e8a5f3711cf16d1c49ee3e2664 --- nova/tests/integrated/test_api_samples.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index 080e4e92b..c180db47b 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -34,7 +34,6 @@ from nova import db from nova.db.sqlalchemy import models from nova import exception from nova.network import api as network_api -from nova.network import manager as network_manager from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import jsonutils @@ -1511,7 +1510,7 @@ class CloudPipeSampleJsonTest(ApiSampleTestBase): 'vpn_public_port': 22} self.stubs.Set(pipelib.CloudPipe, 'get_encoded_zip', get_user_data) - self.stubs.Set(network_manager.NetworkManager, "get_network", + self.stubs.Set(network_api.API, "get", network_api_get) def generalize_subs(self, subs, vanilla_regexes): -- cgit