Config options: centralize vif libvirt options (6)

The config options of the "nova.conf" section "libvirt" got
moved to the new central location "nova/conf/libvirt.py".
Subsequent patches will then move another options in libvirt section.
This is the 6th patch in a long-chain patchs.

Change-Id: I9c182f49711a54e140c6321aa56c72850bc4d1a3
Co-Authored-by: Markus Zoeller <mzoeller@de.ibm.com>
Implements: blueprint centralize-config-options-newton
This commit is contained in:
Hieu LE
2016-04-22 15:08:38 +07:00
parent 27fcf2a6cf
commit 15abb39ef2
3 changed files with 8 additions and 11 deletions
+7
View File
@@ -284,12 +284,19 @@ libvirt_utils_opts = [
'currently applies exclusively to qcow2 images'),
]
libvirt_vif_opts = [
cfg.BoolOpt('use_virtio_for_bridges',
default=True,
help='Use virtio for bridge interfaces with KVM/QEMU'),
]
ALL_OPTS = list(itertools.chain(
libvirt_general_opts,
libvirt_imagebackend_opts,
libvirt_imagecache_opts,
libvirt_lvm_opts,
libvirt_utils_opts,
libvirt_vif_opts,
))
+1 -9
View File
@@ -21,7 +21,6 @@ import copy
import os
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_log import log as logging
import nova.conf
@@ -38,14 +37,7 @@ from nova.virt import osinfo
LOG = logging.getLogger(__name__)
libvirt_vif_opts = [
cfg.BoolOpt('use_virtio_for_bridges',
default=True,
help='Use virtio for bridge interfaces with KVM/QEMU'),
]
CONF = nova.conf.CONF
CONF.register_opts(libvirt_vif_opts, 'libvirt')
# vhostuser queues support
MIN_LIBVIRT_VHOSTUSER_MQ = (1, 2, 17)
@@ -728,7 +720,7 @@ class LibvirtGenericVIFDriver(object):
ip6_addr = ips['address']
ptype = 'NovaVMPort'
if (cfg.CONF.libvirt.virt_type == 'lxc'):
if (CONF.libvirt.virt_type == 'lxc'):
ptype = 'NameSpacePort'
cmd_args = ("--oper=add --uuid=%s --instance_uuid=%s --vn_uuid=%s "
-2
View File
@@ -12,7 +12,6 @@
import itertools
import nova.virt.libvirt.vif
import nova.virt.libvirt.volume.aoe
import nova.virt.libvirt.volume.glusterfs
import nova.virt.libvirt.volume.iscsi
@@ -35,7 +34,6 @@ def list_opts():
return [
('libvirt',
itertools.chain(
nova.virt.libvirt.vif.libvirt_vif_opts,
nova.virt.libvirt.volume.volume.volume_opts,
nova.virt.libvirt.volume.aoe.volume_opts,
nova.virt.libvirt.volume.glusterfs.volume_opts,