config options: Centralise 'virt.netutils' options
Add options from 'virt.netutils'. These options are part of the 'DEFAULT' group but are included in the "nova.conf.virt" file in hope that they can eventually be moved to their own group. Change-Id: Iadde1aff056008988d21deb914cdd18c8347e5d3 Implements: bp centralize-config-options
This commit is contained in:
parent
b51da3d9fa
commit
cb072fc4e0
|
@ -14,6 +14,8 @@
|
|||
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova import paths
|
||||
|
||||
vcpu_pin_set = cfg.StrOpt(
|
||||
'vcpu_pin_set',
|
||||
help="""Defines which physical CPUs (pCPUs) can be used by instance
|
||||
|
@ -267,6 +269,11 @@ Interdependencies to other options:
|
|||
* ``compute_driver``: Only the libvirt driver uses this option.
|
||||
""")
|
||||
|
||||
injected_network_template = cfg.StrOpt(
|
||||
'injected_network_template',
|
||||
default=paths.basedir_def('nova/virt/interfaces.template'),
|
||||
help='Template file for injected network')
|
||||
|
||||
ALL_OPTS = [vcpu_pin_set,
|
||||
compute_driver,
|
||||
default_ephemeral_format,
|
||||
|
@ -276,7 +283,8 @@ ALL_OPTS = [vcpu_pin_set,
|
|||
vif_plugging_timeout,
|
||||
firewall_driver,
|
||||
allow_same_net_traffic,
|
||||
force_raw_images]
|
||||
force_raw_images,
|
||||
injected_network_template]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
|
|
|
@ -23,20 +23,11 @@ import os
|
|||
|
||||
import jinja2
|
||||
import netaddr
|
||||
from oslo_config import cfg
|
||||
|
||||
import nova.conf
|
||||
from nova.network import model
|
||||
from nova import paths
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
netutils_opts = [
|
||||
cfg.StrOpt('injected_network_template',
|
||||
default=paths.basedir_def('nova/virt/interfaces.template'),
|
||||
help='Template file for injected network'),
|
||||
]
|
||||
|
||||
CONF.register_opts(netutils_opts)
|
||||
CONF = nova.conf.CONF
|
||||
CONF.import_opt('use_ipv6', 'nova.netconf')
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import nova.virt.libvirt.storage.lvm
|
|||
import nova.virt.libvirt.utils
|
||||
import nova.virt.libvirt.vif
|
||||
import nova.virt.libvirt.volume.volume
|
||||
import nova.virt.netutils
|
||||
import nova.virt.vmwareapi.driver
|
||||
import nova.virt.vmwareapi.images
|
||||
import nova.virt.vmwareapi.vif
|
||||
|
@ -55,7 +54,6 @@ def list_opts():
|
|||
nova.virt.disk.api.disk_opts,
|
||||
nova.virt.disk.mount.nbd.nbd_opts,
|
||||
nova.virt.imagecache.imagecache_opts,
|
||||
nova.virt.netutils.netutils_opts,
|
||||
)),
|
||||
('guestfs', nova.virt.disk.vfs.guestfs.guestfs_opts),
|
||||
('hyperv',
|
||||
|
|
Loading…
Reference in New Issue