diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2013-01-08 09:48:03 +0000 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2013-01-09 22:09:17 +0000 |
| commit | 7cb17d63f1bd317abc5cacd6d77e7ca810ccc346 (patch) | |
| tree | 9c633aafbfe7446be208737232f627c0922d25e4 /nova/tests | |
| parent | 562b5a452db7208b53022aba0e8b6a8f70150587 (diff) | |
Move global service networking opts to new module
The my_ip, host and use_ipv6 options are used all over the codebase
and they're pretty well related to each other. Create a new netconf
module for them to live in.
There are now no options registered globally in nova.config!
blueprint: scope-config-opts
Change-Id: Ifde37839ae6f38e6bf99dff1e80b8e25fd68ed25
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/ec2/test_cinder_cloud.py | 2 | ||||
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 2 | ||||
| -rw-r--r-- | nova/tests/api/openstack/compute/test_extensions.py | 1 | ||||
| -rw-r--r-- | nova/tests/api/openstack/fakes.py | 2 | ||||
| -rw-r--r-- | nova/tests/cells/test_cells_messaging.py | 1 | ||||
| -rw-r--r-- | nova/tests/compute/test_compute.py | 2 | ||||
| -rw-r--r-- | nova/tests/conf_fixture.py | 1 | ||||
| -rw-r--r-- | nova/tests/fake_network.py | 2 | ||||
| -rw-r--r-- | nova/tests/integrated/test_extensions.py | 1 | ||||
| -rw-r--r-- | nova/tests/scheduler/test_host_filters.py | 2 | ||||
| -rw-r--r-- | nova/tests/test_imagecache.py | 2 | ||||
| -rw-r--r-- | nova/tests/test_libvirt.py | 4 | ||||
| -rw-r--r-- | nova/tests/test_xenapi.py | 2 | ||||
| -rw-r--r-- | nova/tests/utils.py | 2 |
14 files changed, 12 insertions, 14 deletions
diff --git a/nova/tests/api/ec2/test_cinder_cloud.py b/nova/tests/api/ec2/test_cinder_cloud.py index 7512303ae..d403ba1f0 100644 --- a/nova/tests/api/ec2/test_cinder_cloud.py +++ b/nova/tests/api/ec2/test_cinder_cloud.py @@ -40,7 +40,7 @@ from nova import volume CONF = cfg.CONF CONF.import_opt('compute_driver', 'nova.virt.driver') CONF.import_opt('default_instance_type', 'nova.compute.instance_types') -CONF.import_opt('use_ipv6', 'nova.config') +CONF.import_opt('use_ipv6', 'nova.netconf') LOG = logging.getLogger(__name__) diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index 21978c300..ae2ea11c3 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -53,7 +53,7 @@ from nova import volume CONF = cfg.CONF CONF.import_opt('compute_driver', 'nova.virt.driver') CONF.import_opt('default_instance_type', 'nova.compute.instance_types') -CONF.import_opt('use_ipv6', 'nova.config') +CONF.import_opt('use_ipv6', 'nova.netconf') LOG = logging.getLogger(__name__) HOST = "testhost" diff --git a/nova/tests/api/openstack/compute/test_extensions.py b/nova/tests/api/openstack/compute/test_extensions.py index 494e44738..e3810510b 100644 --- a/nova/tests/api/openstack/compute/test_extensions.py +++ b/nova/tests/api/openstack/compute/test_extensions.py @@ -32,7 +32,6 @@ from nova.tests.api.openstack import fakes from nova.tests import matchers CONF = cfg.CONF -CONF.import_opt('osapi_compute_extension', 'nova.config') NS = "{http://docs.openstack.org/common/api/v1.0}" ATOMNS = "{http://www.w3.org/2005/Atom}" diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index 9b939b324..03fc87ac5 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -151,7 +151,7 @@ def stub_out_instance_quota(stubs, allowed, quota, resource='instances'): def stub_out_networking(stubs): def get_my_ip(): return '127.0.0.1' - stubs.Set(nova.config, '_get_my_ip', get_my_ip) + stubs.Set(nova.netconf, '_get_my_ip', get_my_ip) def stub_out_compute_api_snapshot(stubs): diff --git a/nova/tests/cells/test_cells_messaging.py b/nova/tests/cells/test_cells_messaging.py index d728c9474..a5810fb21 100644 --- a/nova/tests/cells/test_cells_messaging.py +++ b/nova/tests/cells/test_cells_messaging.py @@ -24,7 +24,6 @@ from nova.tests.cells import fakes CONF = cfg.CONF -CONF.import_opt('host', 'nova.config') CONF.import_opt('name', 'nova.cells.opts', group='cells') CONF.import_opt('allowed_rpc_exception_modules', 'nova.openstack.common.rpc') diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 644043ae9..460366833 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -71,7 +71,7 @@ QUOTAS = quota.QUOTAS LOG = logging.getLogger(__name__) CONF = cfg.CONF CONF.import_opt('compute_manager', 'nova.service') -CONF.import_opt('host', 'nova.config') +CONF.import_opt('host', 'nova.netconf') CONF.import_opt('live_migration_retry_count', 'nova.compute.manager') diff --git a/nova/tests/conf_fixture.py b/nova/tests/conf_fixture.py index 010737a0d..9155a3f68 100644 --- a/nova/tests/conf_fixture.py +++ b/nova/tests/conf_fixture.py @@ -25,6 +25,7 @@ from nova import paths from nova.tests.utils import cleanup_dns_managers CONF = cfg.CONF +CONF.import_opt('use_ipv6', 'nova.netconf') CONF.import_opt('scheduler_driver', 'nova.scheduler.manager') CONF.import_opt('fake_network', 'nova.network.manager') CONF.import_opt('network_size', 'nova.network.manager') diff --git a/nova/tests/fake_network.py b/nova/tests/fake_network.py index eefd4d213..b97999e7d 100644 --- a/nova/tests/fake_network.py +++ b/nova/tests/fake_network.py @@ -31,7 +31,7 @@ from nova.virt.libvirt import config as libvirt_config HOST = "testhost" CONF = cfg.CONF -CONF.import_opt('use_ipv6', 'nova.config') +CONF.import_opt('use_ipv6', 'nova.netconf') class FakeIptablesFirewallDriver(object): diff --git a/nova/tests/integrated/test_extensions.py b/nova/tests/integrated/test_extensions.py index e23b31e5b..b6e1adc73 100644 --- a/nova/tests/integrated/test_extensions.py +++ b/nova/tests/integrated/test_extensions.py @@ -22,7 +22,6 @@ from nova.openstack.common.log import logging from nova.tests.integrated import integrated_helpers CONF = cfg.CONF -CONF.import_opt('osapi_compute_extension', 'nova.config') LOG = logging.getLogger(__name__) diff --git a/nova/tests/scheduler/test_host_filters.py b/nova/tests/scheduler/test_host_filters.py index 7314c7cc6..9f7f189cc 100644 --- a/nova/tests/scheduler/test_host_filters.py +++ b/nova/tests/scheduler/test_host_filters.py @@ -30,7 +30,7 @@ from nova import test from nova.tests.scheduler import fakes CONF = cfg.CONF -CONF.import_opt('my_ip', 'nova.config') +CONF.import_opt('my_ip', 'nova.netconf') class TestFilter(filters.BaseHostFilter): diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py index 618a6bd54..eaf244c56 100644 --- a/nova/tests/test_imagecache.py +++ b/nova/tests/test_imagecache.py @@ -38,7 +38,7 @@ from nova.virt.libvirt import utils as virtutils CONF = cfg.CONF CONF.import_opt('compute_manager', 'nova.service') -CONF.import_opt('host', 'nova.config') +CONF.import_opt('host', 'nova.netconf') LOG = log.getLogger(__name__) diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index cce220b20..53bb1b984 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -73,8 +73,8 @@ libvirt_driver.libvirt = libvirt CONF = cfg.CONF CONF.import_opt('compute_manager', 'nova.service') -CONF.import_opt('host', 'nova.config') -CONF.import_opt('my_ip', 'nova.config') +CONF.import_opt('host', 'nova.netconf') +CONF.import_opt('my_ip', 'nova.netconf') CONF.import_opt('base_dir_name', 'nova.virt.libvirt.imagecache') LOG = logging.getLogger(__name__) diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 5cdc2928b..b3437db62 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -60,7 +60,7 @@ CONF = cfg.CONF CONF.import_opt('compute_manager', 'nova.service') CONF.import_opt('network_manager', 'nova.service') CONF.import_opt('compute_driver', 'nova.virt.driver') -CONF.import_opt('host', 'nova.config') +CONF.import_opt('host', 'nova.netconf') CONF.import_opt('default_availability_zone', 'nova.availability_zones') IMAGE_MACHINE = '1' diff --git a/nova/tests/utils.py b/nova/tests/utils.py index 45d0d295b..00b70ceb3 100644 --- a/nova/tests/utils.py +++ b/nova/tests/utils.py @@ -23,7 +23,7 @@ from nova.network import minidns from nova.openstack.common import cfg CONF = cfg.CONF -CONF.import_opt('use_ipv6', 'nova.config') +CONF.import_opt('use_ipv6', 'nova.netconf') def get_test_admin_context(): |
