Config options: centralize volume net libvirt options (12)
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 12th patch in a long-chain patchs. Change-Id: I5cb03ce7082e9f71ee584c4cdb2cc9a658882a9e Co-Authored-by: Markus Zoeller <mzoeller@de.ibm.com> Implements: blueprint centralize-config-options-newton
This commit is contained in:
@@ -343,6 +343,14 @@ libvirt_volume_iser_opts = [
|
|||||||
help='Use multipath connection of the iSER volume'),
|
help='Use multipath connection of the iSER volume'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
libvirt_volume_net_opts = [
|
||||||
|
cfg.StrOpt('rbd_user',
|
||||||
|
help='The RADOS client name for accessing rbd volumes'),
|
||||||
|
cfg.StrOpt('rbd_secret_uuid',
|
||||||
|
help='The libvirt UUID of the secret for the rbd_user'
|
||||||
|
'volumes'),
|
||||||
|
]
|
||||||
|
|
||||||
ALL_OPTS = list(itertools.chain(
|
ALL_OPTS = list(itertools.chain(
|
||||||
libvirt_general_opts,
|
libvirt_general_opts,
|
||||||
libvirt_imagebackend_opts,
|
libvirt_imagebackend_opts,
|
||||||
@@ -355,6 +363,7 @@ ALL_OPTS = list(itertools.chain(
|
|||||||
libvirt_volume_glusterfs_opts,
|
libvirt_volume_glusterfs_opts,
|
||||||
libvirt_volume_iscsi_opts,
|
libvirt_volume_iscsi_opts,
|
||||||
libvirt_volume_iser_opts,
|
libvirt_volume_iser_opts,
|
||||||
|
libvirt_volume_net_opts,
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
@@ -11,16 +11,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo_config import cfg
|
|
||||||
|
|
||||||
|
import nova.conf
|
||||||
from nova.tests.unit.virt.libvirt.volume import test_volume
|
from nova.tests.unit.virt.libvirt.volume import test_volume
|
||||||
from nova.virt.libvirt import host
|
from nova.virt.libvirt import host
|
||||||
from nova.virt.libvirt.volume import net
|
from nova.virt.libvirt.volume import net
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = nova.conf.CONF
|
||||||
CONF.import_opt('rbd_user', 'nova.virt.libvirt.volume.net', group='libvirt')
|
|
||||||
CONF.import_opt('rbd_secret_uuid', 'nova.virt.libvirt.volume.net',
|
|
||||||
group='libvirt')
|
|
||||||
|
|
||||||
|
|
||||||
class LibvirtNetVolumeDriverTestCase(
|
class LibvirtNetVolumeDriverTestCase(
|
||||||
|
@@ -45,9 +45,6 @@ from nova.virt.libvirt.storage import rbd_utils
|
|||||||
from nova.virt.libvirt import utils as libvirt_utils
|
from nova.virt.libvirt import utils as libvirt_utils
|
||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
CONF.import_opt('rbd_user', 'nova.virt.libvirt.volume.net', group='libvirt')
|
|
||||||
CONF.import_opt('rbd_secret_uuid', 'nova.virt.libvirt.volume.net',
|
|
||||||
group='libvirt')
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
IMAGE_API = image.API()
|
IMAGE_API = image.API()
|
||||||
|
@@ -10,23 +10,14 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
import nova.conf
|
||||||
|
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova.i18n import _
|
from nova.i18n import _
|
||||||
from nova import utils
|
from nova import utils
|
||||||
from nova.virt.libvirt.volume import volume as libvirt_volume
|
from nova.virt.libvirt.volume import volume as libvirt_volume
|
||||||
|
|
||||||
volume_opts = [
|
|
||||||
cfg.StrOpt('rbd_user',
|
|
||||||
help='The RADOS client name for accessing rbd volumes'),
|
|
||||||
cfg.StrOpt('rbd_secret_uuid',
|
|
||||||
help='The libvirt UUID of the secret for the rbd_user '
|
|
||||||
'volumes'),
|
|
||||||
]
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = nova.conf.CONF
|
||||||
CONF.register_opts(volume_opts, 'libvirt')
|
|
||||||
|
|
||||||
|
|
||||||
class LibvirtNetVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
|
class LibvirtNetVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
|
||||||
|
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import nova.virt.libvirt.volume.net
|
|
||||||
import nova.virt.libvirt.volume.nfs
|
import nova.virt.libvirt.volume.nfs
|
||||||
import nova.virt.libvirt.volume.quobyte
|
import nova.virt.libvirt.volume.quobyte
|
||||||
import nova.virt.libvirt.volume.remotefs
|
import nova.virt.libvirt.volume.remotefs
|
||||||
@@ -29,7 +28,6 @@ def list_opts():
|
|||||||
return [
|
return [
|
||||||
('libvirt',
|
('libvirt',
|
||||||
itertools.chain(
|
itertools.chain(
|
||||||
nova.virt.libvirt.volume.net.volume_opts,
|
|
||||||
nova.virt.libvirt.volume.nfs.volume_opts,
|
nova.virt.libvirt.volume.nfs.volume_opts,
|
||||||
nova.virt.libvirt.volume.quobyte.volume_opts,
|
nova.virt.libvirt.volume.quobyte.volume_opts,
|
||||||
nova.virt.libvirt.volume.remotefs.libvirt_opts,
|
nova.virt.libvirt.volume.remotefs.libvirt_opts,
|
||||||
|
Reference in New Issue
Block a user