config options: centralize section "guestfs"
The config options of the "nova.conf" section "guestfs" got moved to the new central location "nova/conf/guestfs.py". Change-Id: I9db186e7d665fa7ce05e806843592d739fdd9c7c Implements: centralize-config-options-newton
This commit is contained in:
parent
d233772b0d
commit
4f79501215
|
@ -41,7 +41,7 @@ from nova.conf import conductor
|
|||
from nova.conf import ephemeral_storage
|
||||
from nova.conf import floating_ips
|
||||
from nova.conf import glance
|
||||
# from nova.conf import guestfs
|
||||
from nova.conf import guestfs
|
||||
# from nova.conf import host
|
||||
from nova.conf import hyperv
|
||||
# from nova.conf import image
|
||||
|
@ -102,7 +102,7 @@ conductor.register_opts(CONF)
|
|||
ephemeral_storage.register_opts(CONF)
|
||||
floating_ips.register_opts(CONF)
|
||||
glance.register_opts(CONF)
|
||||
# guestfs.register_opts(CONF)
|
||||
guestfs.register_opts(CONF)
|
||||
# host.register_opts(CONF)
|
||||
hyperv.register_opts(CONF)
|
||||
# image.register_opts(CONF)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2015 OpenStack Foundation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
enable_guestfs_debug_opts = cfg.BoolOpt('debug',
|
||||
default=False,
|
||||
help='Enable guestfs debug')
|
||||
|
||||
ALL_OPTS = [enable_guestfs_debug_opts]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(ALL_OPTS, group="guestfs")
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {"guestfs": ALL_OPTS}
|
|
@ -13,11 +13,11 @@
|
|||
# under the License.
|
||||
|
||||
from eventlet import tpool
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
|
||||
import nova.conf
|
||||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova.i18n import _LW
|
||||
|
@ -30,14 +30,7 @@ LOG = logging.getLogger(__name__)
|
|||
guestfs = None
|
||||
forceTCG = False
|
||||
|
||||
guestfs_opts = [
|
||||
cfg.BoolOpt('debug',
|
||||
default=False,
|
||||
help='Enable guestfs debug')
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(guestfs_opts, group='guestfs')
|
||||
CONF = nova.conf.CONF
|
||||
|
||||
|
||||
def force_tcg(force=True):
|
||||
|
|
|
@ -14,7 +14,6 @@ import itertools
|
|||
|
||||
import nova.conf
|
||||
import nova.virt.configdrive
|
||||
import nova.virt.disk.vfs.guestfs
|
||||
import nova.virt.libvirt.driver
|
||||
import nova.virt.libvirt.imagebackend
|
||||
import nova.virt.libvirt.imagecache
|
||||
|
@ -55,7 +54,6 @@ def list_opts():
|
|||
itertools.chain(
|
||||
nova.virt.configdrive.configdrive_opts,
|
||||
)),
|
||||
('guestfs', nova.virt.disk.vfs.guestfs.guestfs_opts),
|
||||
('libvirt',
|
||||
itertools.chain(
|
||||
nova.virt.libvirt.driver.libvirt_opts,
|
||||
|
|
Loading…
Reference in New Issue