Config options: centralize remotefs libvirt options (end)
The config options of the "nova.conf" section "libvirt" got moved to the new central location "nova/conf/libvirt.py". This is the last patch in a long-chain patchs. The next chain of patch-set will focus on improve libvirt help texts. Change-Id: Ieaa9092dcb53c405b60ff4f4c9ea68f8d90e8435 Co-Authored-by: Markus Zoeller <mzoeller@de.ibm.com> Implements: blueprint centralize-config-options-newton
This commit is contained in:
@@ -8,7 +8,6 @@ namespace = nova.cache_utils
|
||||
namespace = nova.cells
|
||||
namespace = nova.compute
|
||||
namespace = nova.network
|
||||
namespace = nova.virt
|
||||
namespace = oslo.cache
|
||||
namespace = oslo.log
|
||||
namespace = oslo.messaging
|
||||
|
||||
@@ -390,6 +390,14 @@ libvirt_volume_smbfs_opts = [
|
||||
'libvirt-qemu uid and gid must be specified.'),
|
||||
]
|
||||
|
||||
libvirt_remotefs_opts = [
|
||||
cfg.StrOpt('remote_filesystem_transport',
|
||||
default='ssh',
|
||||
choices=('ssh', 'rsync'),
|
||||
help='Use ssh or rsync transport for creating, copying, '
|
||||
'removing files on the remote host.'),
|
||||
]
|
||||
|
||||
ALL_OPTS = list(itertools.chain(
|
||||
libvirt_general_opts,
|
||||
libvirt_imagebackend_opts,
|
||||
@@ -407,6 +415,7 @@ ALL_OPTS = list(itertools.chain(
|
||||
libvirt_volume_quobyte_opts,
|
||||
libvirt_volume_scality_opts,
|
||||
libvirt_volume_smbfs_opts,
|
||||
libvirt_remotefs_opts
|
||||
))
|
||||
|
||||
|
||||
@@ -415,8 +424,5 @@ def register_opts(conf):
|
||||
conf.register_opts(ALL_OPTS, group=libvirt_group)
|
||||
|
||||
|
||||
# TODO(hieulq): if not using group name, oslo config will generate duplicate
|
||||
# config section. This need to be remove when completely move all libvirt
|
||||
# options to this place.
|
||||
def list_opts():
|
||||
return {libvirt_group.name: ALL_OPTS}
|
||||
return {libvirt_group: ALL_OPTS}
|
||||
|
||||
@@ -19,26 +19,17 @@ import os
|
||||
import tempfile
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
|
||||
import nova.conf
|
||||
from nova.i18n import _LE, _LW
|
||||
from nova import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
libvirt_opts = [
|
||||
cfg.StrOpt('remote_filesystem_transport',
|
||||
default='ssh',
|
||||
choices=('ssh', 'rsync'),
|
||||
help='Use ssh or rsync transport for creating, copying, '
|
||||
'removing files on the remote host.'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(libvirt_opts, 'libvirt')
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
|
||||
def mount_share(mount_path, export_path,
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import itertools
|
||||
|
||||
import nova.virt.libvirt.volume.remotefs
|
||||
import nova.virt.xenapi.agent
|
||||
import nova.virt.xenapi.vmops
|
||||
|
||||
|
||||
def list_opts():
|
||||
return [
|
||||
('libvirt',
|
||||
itertools.chain(
|
||||
nova.virt.libvirt.volume.remotefs.libvirt_opts,
|
||||
)),
|
||||
]
|
||||
Reference in New Issue
Block a user