diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2013-01-17 12:42:24 -0800 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2013-01-31 15:38:17 -0800 |
| commit | 45e92d47038514fc05ae17a8a38dae1b337c15fe (patch) | |
| tree | 380c42ba080cbd8e1fea82280e87ce3528fe2cd0 /nova/tests | |
| parent | 05751bb7861892b949dedeccc283ce48abee0d16 (diff) | |
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
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/integrated/test_api_samples.py | 3 |
1 files changed, 1 insertions, 2 deletions
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): |
