Config options: centralize section "xvp"
The config options of the "nova.conf" section "xvp" now moved to the new central location "nova/conf/xvp.py". Change-Id: I0e93f977e7d4e61fbe482622aa1834d78e2c0b2b Implements: blueprint centralize-config-options-newton
This commit is contained in:
@@ -82,7 +82,7 @@ from nova.conf import vnc
|
||||
from nova.conf import workarounds
|
||||
from nova.conf import wsgi
|
||||
from nova.conf import xenserver
|
||||
# from nova.conf import xvp
|
||||
from nova.conf import xvp
|
||||
# from nova.conf import zookeeper
|
||||
|
||||
CONF = cfg.CONF
|
||||
@@ -149,7 +149,7 @@ vnc.register_opts(CONF)
|
||||
workarounds.register_opts(CONF)
|
||||
wsgi.register_opts(CONF)
|
||||
xenserver.register_opts(CONF)
|
||||
# xvp.register_opts(CONF)
|
||||
xvp.register_opts(CONF)
|
||||
# zookeeper.register_opts(CONF)
|
||||
|
||||
remote_debug.register_cli_opts(CONF)
|
||||
|
||||
58
nova/conf/xvp.py
Normal file
58
nova/conf/xvp.py
Normal file
@@ -0,0 +1,58 @@
|
||||
# Copyright 2016 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 nova import paths
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
xvp_group = cfg.OptGroup(
|
||||
'xvp',
|
||||
title='XVP options')
|
||||
|
||||
xvp_opts = [
|
||||
cfg.StrOpt('console_xvp_conf_template',
|
||||
default=paths.basedir_def('nova/console/xvp.conf.template'),
|
||||
deprecated_group='DEFAULT',
|
||||
help='XVP conf template'),
|
||||
cfg.StrOpt('console_xvp_conf',
|
||||
default='/etc/xvp.conf',
|
||||
deprecated_group='DEFAULT',
|
||||
help='Generated XVP conf file'),
|
||||
cfg.StrOpt('console_xvp_pid',
|
||||
default='/var/run/xvp.pid',
|
||||
deprecated_group='DEFAULT',
|
||||
help='XVP master process pid file'),
|
||||
cfg.StrOpt('console_xvp_log',
|
||||
default='/var/log/xvp.log',
|
||||
deprecated_group='DEFAULT',
|
||||
help='XVP log file'),
|
||||
cfg.IntOpt('console_xvp_multiplex_port',
|
||||
default=5900,
|
||||
deprecated_group='DEFAULT',
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port for XVP to multiplex VNC connections on'),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_group(xvp_group)
|
||||
conf.register_opts(xvp_opts, group=xvp_group)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {
|
||||
xvp_group: xvp_opts
|
||||
}
|
||||
@@ -20,39 +20,17 @@ import signal
|
||||
|
||||
import jinja2
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
import nova.conf
|
||||
from nova import context
|
||||
from nova import db
|
||||
from nova.i18n import _, _LE
|
||||
from nova import paths
|
||||
from nova import utils
|
||||
|
||||
|
||||
xvp_opts = [
|
||||
cfg.StrOpt('console_xvp_conf_template',
|
||||
default=paths.basedir_def('nova/console/xvp.conf.template'),
|
||||
help='XVP conf template'),
|
||||
cfg.StrOpt('console_xvp_conf',
|
||||
default='/etc/xvp.conf',
|
||||
help='Generated XVP conf file'),
|
||||
cfg.StrOpt('console_xvp_pid',
|
||||
default='/var/run/xvp.pid',
|
||||
help='XVP master process pid file'),
|
||||
cfg.StrOpt('console_xvp_log',
|
||||
default='/var/log/xvp.log',
|
||||
help='XVP log file'),
|
||||
cfg.IntOpt('console_xvp_multiplex_port',
|
||||
default=5900,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port for XVP to multiplex VNC connections on'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(xvp_opts)
|
||||
CONF = nova.conf.CONF
|
||||
CONF.import_opt('host', 'nova.netconf')
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import nova.conductor.tasks.live_migrate
|
||||
import nova.conf
|
||||
import nova.console.rpcapi
|
||||
import nova.console.serial
|
||||
import nova.console.xvp
|
||||
import nova.consoleauth.rpcapi
|
||||
import nova.db.api
|
||||
import nova.db.base
|
||||
@@ -43,7 +42,6 @@ def list_opts():
|
||||
[nova.conductor.tasks.live_migrate.migrate_opt],
|
||||
[nova.db.base.db_driver_opt],
|
||||
[nova.servicegroup.api.servicegroup_driver_opt],
|
||||
nova.console.xvp.xvp_opts,
|
||||
nova.db.api.db_opts,
|
||||
nova.db.sqlalchemy.api.db_opts,
|
||||
nova.exception.exc_log_opts,
|
||||
|
||||
Reference in New Issue
Block a user