summaryrefslogtreecommitdiffstats
path: root/nova/virt
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-01-08 09:48:03 +0000
committerMark McLoughlin <markmc@redhat.com>2013-01-09 22:09:17 +0000
commit7cb17d63f1bd317abc5cacd6d77e7ca810ccc346 (patch)
tree9c633aafbfe7446be208737232f627c0922d25e4 /nova/virt
parent562b5a452db7208b53022aba0e8b6a8f70150587 (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/virt')
-rw-r--r--nova/virt/baremetal/driver.py1
-rw-r--r--nova/virt/baremetal/pxe.py2
-rw-r--r--nova/virt/baremetal/volume_driver.py2
-rw-r--r--nova/virt/firewall.py2
-rw-r--r--nova/virt/hyperv/basevolumeutils.py2
-rw-r--r--nova/virt/hyperv/volumeops.py2
-rw-r--r--nova/virt/libvirt/driver.py4
-rw-r--r--nova/virt/libvirt/firewall.py2
-rw-r--r--nova/virt/libvirt/imagecache.py2
-rw-r--r--nova/virt/libvirt/vif.py2
-rw-r--r--nova/virt/netutils.py2
-rw-r--r--nova/virt/xenapi/driver.py2
-rw-r--r--nova/virt/xenapi/pool.py2
-rw-r--r--nova/virt/xenapi/vm_utils.py2
-rw-r--r--nova/virt/xenapi/vmops.py2
15 files changed, 17 insertions, 14 deletions
diff --git a/nova/virt/baremetal/driver.py b/nova/virt/baremetal/driver.py
index bb76954e1..39364168c 100644
--- a/nova/virt/baremetal/driver.py
+++ b/nova/virt/baremetal/driver.py
@@ -74,6 +74,7 @@ baremetal_group = cfg.OptGroup(name='baremetal',
CONF = cfg.CONF
CONF.register_group(baremetal_group)
CONF.register_opts(opts, baremetal_group)
+CONF.import_opt('host', 'nova.netconf')
DEFAULT_FIREWALL_DRIVER = "%s.%s" % (
firewall.__name__,
diff --git a/nova/virt/baremetal/pxe.py b/nova/virt/baremetal/pxe.py
index 4bb61ad39..9dbb4e79e 100644
--- a/nova/virt/baremetal/pxe.py
+++ b/nova/virt/baremetal/pxe.py
@@ -70,7 +70,7 @@ baremetal_group = cfg.OptGroup(name='baremetal',
CONF = cfg.CONF
CONF.register_group(baremetal_group)
CONF.register_opts(pxe_opts, baremetal_group)
-
+CONF.import_opt('use_ipv6', 'nova.netconf')
CHEETAH = None
diff --git a/nova/virt/baremetal/volume_driver.py b/nova/virt/baremetal/volume_driver.py
index 09088dd53..570cea1d8 100644
--- a/nova/virt/baremetal/volume_driver.py
+++ b/nova/virt/baremetal/volume_driver.py
@@ -45,6 +45,8 @@ CONF = cfg.CONF
CONF.register_group(baremetal_group)
CONF.register_opts(opts, baremetal_group)
+CONF.import_opt('host', 'nova.netconf')
+CONF.import_opt('use_ipv6', 'nova.netconf')
CONF.import_opt('libvirt_volume_drivers', 'nova.virt.libvirt.driver')
LOG = logging.getLogger(__name__)
diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py
index bdfa8fb4e..bbc6034bd 100644
--- a/nova/virt/firewall.py
+++ b/nova/virt/firewall.py
@@ -41,7 +41,7 @@ firewall_opts = [
CONF = cfg.CONF
CONF.register_opts(firewall_opts)
-CONF.import_opt('use_ipv6', 'nova.config')
+CONF.import_opt('use_ipv6', 'nova.netconf')
def load_driver(default, *args, **kwargs):
diff --git a/nova/virt/hyperv/basevolumeutils.py b/nova/virt/hyperv/basevolumeutils.py
index c6ac8b644..2352c3bef 100644
--- a/nova/virt/hyperv/basevolumeutils.py
+++ b/nova/virt/hyperv/basevolumeutils.py
@@ -33,7 +33,7 @@ if sys.platform == 'win32':
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
-CONF.import_opt('my_ip', 'nova.config')
+CONF.import_opt('my_ip', 'nova.netconf')
class BaseVolumeUtils(object):
diff --git a/nova/virt/hyperv/volumeops.py b/nova/virt/hyperv/volumeops.py
index ed80e0f1b..200236233 100644
--- a/nova/virt/hyperv/volumeops.py
+++ b/nova/virt/hyperv/volumeops.py
@@ -45,7 +45,7 @@ hyper_volumeops_opts = [
CONF = cfg.CONF
CONF.register_opts(hyper_volumeops_opts)
-CONF.import_opt('my_ip', 'nova.config')
+CONF.import_opt('my_ip', 'nova.netconf')
class VolumeOps(baseops.BaseOps):
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 1f75c7ee2..ea6e0e6a0 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -190,8 +190,8 @@ libvirt_opts = [
CONF = cfg.CONF
CONF.register_opts(libvirt_opts)
-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('default_ephemeral_format', 'nova.virt.driver')
CONF.import_opt('use_cow_images', 'nova.virt.driver')
CONF.import_opt('live_migration_retry_count', 'nova.compute.manager')
diff --git a/nova/virt/libvirt/firewall.py b/nova/virt/libvirt/firewall.py
index c52b0c56e..c47056ff2 100644
--- a/nova/virt/libvirt/firewall.py
+++ b/nova/virt/libvirt/firewall.py
@@ -27,7 +27,7 @@ import nova.virt.firewall as base_firewall
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
-CONF.import_opt('use_ipv6', 'nova.config')
+CONF.import_opt('use_ipv6', 'nova.netconf')
try:
import libvirt
diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py
index db5e6e058..50fac9bb4 100644
--- a/nova/virt/libvirt/imagecache.py
+++ b/nova/virt/libvirt/imagecache.py
@@ -72,7 +72,7 @@ imagecache_opts = [
CONF = cfg.CONF
CONF.register_opts(imagecache_opts)
-CONF.import_opt('host', 'nova.config')
+CONF.import_opt('host', 'nova.netconf')
CONF.import_opt('instances_path', 'nova.compute.manager')
diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py
index f04674395..1dc30f73e 100644
--- a/nova/virt/libvirt/vif.py
+++ b/nova/virt/libvirt/vif.py
@@ -42,7 +42,7 @@ libvirt_vif_opts = [
CONF = cfg.CONF
CONF.register_opts(libvirt_vif_opts)
CONF.import_opt('libvirt_type', 'nova.virt.libvirt.driver')
-CONF.import_opt('use_ipv6', 'nova.config')
+CONF.import_opt('use_ipv6', 'nova.netconf')
LINUX_DEV_LEN = 14
diff --git a/nova/virt/netutils.py b/nova/virt/netutils.py
index 727b7aac6..70f1544c4 100644
--- a/nova/virt/netutils.py
+++ b/nova/virt/netutils.py
@@ -26,7 +26,7 @@ import netaddr
from nova.openstack.common import cfg
CONF = cfg.CONF
-CONF.import_opt('use_ipv6', 'nova.config')
+CONF.import_opt('use_ipv6', 'nova.netconf')
CONF.import_opt('injected_network_template', 'nova.virt.disk.api')
Template = None
diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py
index b54fdcda0..bdb73b28f 100644
--- a/nova/virt/xenapi/driver.py
+++ b/nova/virt/xenapi/driver.py
@@ -117,7 +117,7 @@ xenapi_opts = [
CONF = cfg.CONF
CONF.register_opts(xenapi_opts)
-CONF.import_opt('host', 'nova.config')
+CONF.import_opt('host', 'nova.netconf')
class XenAPIDriver(driver.ComputeDriver):
diff --git a/nova/virt/xenapi/pool.py b/nova/virt/xenapi/pool.py
index 1855789eb..1682f18d1 100644
--- a/nova/virt/xenapi/pool.py
+++ b/nova/virt/xenapi/pool.py
@@ -39,7 +39,7 @@ xenapi_pool_opts = [
CONF = cfg.CONF
CONF.register_opts(xenapi_pool_opts)
-CONF.import_opt('host', 'nova.config')
+CONF.import_opt('host', 'nova.netconf')
class ResourcePool(object):
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index b48953875..40d43da8d 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -126,7 +126,7 @@ CONF.register_opts(xenapi_vm_utils_opts)
CONF.import_opt('default_ephemeral_format', 'nova.virt.driver')
CONF.import_opt('use_cow_images', 'nova.virt.driver')
CONF.import_opt('glance_num_retries', 'nova.image.glance')
-CONF.import_opt('use_ipv6', 'nova.config')
+CONF.import_opt('use_ipv6', 'nova.netconf')
XENAPI_POWER_STATE = {
'Halted': power_state.SHUTDOWN,
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index 430944a8e..e8e0f3cb0 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -63,7 +63,7 @@ xenapi_vmops_opts = [
CONF = cfg.CONF
CONF.register_opts(xenapi_vmops_opts)
-CONF.import_opt('host', 'nova.config')
+CONF.import_opt('host', 'nova.netconf')
CONF.import_opt('vncserver_proxyclient_address', 'nova.vnc')
DEFAULT_FIREWALL_DRIVER = "%s.%s" % (