Config options: centralize quobyte libvirt options (14)

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 14th patch in a long-chain patchs.

Change-Id: I9a95daccc00aeb156fda3515cc667333b224f5a2
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 18:51:53 +07:00
parent 8778a9ea7c
commit 16ea2caa62
3 changed files with 10 additions and 14 deletions

View File

@ -361,6 +361,15 @@ libvirt_volume_nfs_opts = [
'of the nfs man page for details'),
]
libvirt_volume_quobyte_opts = [
cfg.StrOpt('quobyte_mount_point_base',
default=paths.state_path_def('mnt'),
help='Directory where the Quobyte volume is mounted on the '
'compute node'),
cfg.StrOpt('quobyte_client_cfg',
help='Path to a Quobyte Client configuration file.'),
]
ALL_OPTS = list(itertools.chain(
libvirt_general_opts,
libvirt_imagebackend_opts,
@ -375,6 +384,7 @@ ALL_OPTS = list(itertools.chain(
libvirt_volume_iser_opts,
libvirt_volume_net_opts,
libvirt_volume_nfs_opts,
libvirt_volume_quobyte_opts,
))

View File

@ -17,13 +17,11 @@ import errno
import os
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import fileutils
import six
import nova.conf
from nova.conf import paths
from nova import exception as nova_exception
from nova.i18n import _
from nova.i18n import _LE
@ -34,17 +32,7 @@ from nova.virt.libvirt.volume import fs
LOG = logging.getLogger(__name__)
volume_opts = [
cfg.StrOpt('quobyte_mount_point_base',
default=paths.state_path_def('mnt'),
help='Directory where the Quobyte volume is mounted on the '
'compute node'),
cfg.StrOpt('quobyte_client_cfg',
help='Path to a Quobyte Client configuration file.'),
]
CONF = nova.conf.CONF
CONF.register_opts(volume_opts, 'libvirt')
SOURCE_PROTOCOL = 'quobyte'
SOURCE_TYPE = 'file'

View File

@ -12,7 +12,6 @@
import itertools
import nova.virt.libvirt.volume.quobyte
import nova.virt.libvirt.volume.remotefs
import nova.virt.libvirt.volume.scality
import nova.virt.libvirt.volume.smbfs
@ -27,7 +26,6 @@ def list_opts():
return [
('libvirt',
itertools.chain(
nova.virt.libvirt.volume.quobyte.volume_opts,
nova.virt.libvirt.volume.remotefs.libvirt_opts,
nova.virt.libvirt.volume.scality.volume_opts,
nova.virt.libvirt.volume.smbfs.volume_opts,