Centralize config options - [console]
Nova style refactor of config options in Ironic. Partial-Bug: #1561100 Change-Id: Id3ed2021ec2f236eb501c3b2a3d4e1cf5b19062a
This commit is contained in:
parent
130eb1a2fa
commit
5f59a264c5
@ -120,8 +120,9 @@
|
||||
# Note: This option can be changed without restarting.
|
||||
#debug = false
|
||||
|
||||
# If set to false, the logging level will be set to WARNING
|
||||
# instead of the default INFO level. (boolean value)
|
||||
# DEPRECATED: If set to false, the logging level will be set
|
||||
# to WARNING instead of the default INFO level. (boolean
|
||||
# value)
|
||||
# This option is deprecated for removal.
|
||||
# Its value may be silently ignored in the future.
|
||||
#verbose = true
|
||||
@ -1330,8 +1331,8 @@
|
||||
# Determines the frequency at which the list of revoked tokens
|
||||
# is retrieved from the Identity service (in seconds). A high
|
||||
# number of revocation events combined with a low cache
|
||||
# duration may significantly reduce performance. (integer
|
||||
# value)
|
||||
# duration may significantly reduce performance. Only valid
|
||||
# for PKI tokens. (integer value)
|
||||
#revocation_cache_time = 10
|
||||
|
||||
# (Optional) If defined, indicate whether token data should be
|
||||
|
@ -0,0 +1,22 @@
|
||||
# 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 oslo_config import cfg
|
||||
|
||||
from ironic.conf import console
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
console.register_opts(CONF)
|
44
ironic/conf/console.py
Normal file
44
ironic/conf/console.py
Normal file
@ -0,0 +1,44 @@
|
||||
# Copyright 2016 Intel Corporation
|
||||
# Copyright 2014 International Business Machines Corporation
|
||||
# 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
|
||||
|
||||
from ironic.common.i18n import _
|
||||
|
||||
opts = [
|
||||
cfg.StrOpt('terminal',
|
||||
default='shellinaboxd',
|
||||
help=_('Path to serial console terminal program')),
|
||||
cfg.StrOpt('terminal_cert_dir',
|
||||
help=_('Directory containing the terminal SSL cert(PEM) for '
|
||||
'serial console access')),
|
||||
cfg.StrOpt('terminal_pid_dir',
|
||||
help=_('Directory for holding terminal pid files. '
|
||||
'If not specified, the temporary directory '
|
||||
'will be used.')),
|
||||
cfg.IntOpt('subprocess_checking_interval',
|
||||
default=1,
|
||||
help=_('Time interval (in seconds) for checking the status of '
|
||||
'console subprocess.')),
|
||||
cfg.IntOpt('subprocess_timeout',
|
||||
default=10,
|
||||
help=_('Time (in seconds) to wait for the console subprocess '
|
||||
'to start.')),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(opts, group='console')
|
@ -36,7 +36,6 @@ import ironic.drivers.modules.agent_client
|
||||
import ironic.drivers.modules.amt.common
|
||||
import ironic.drivers.modules.amt.power
|
||||
import ironic.drivers.modules.cimc.power
|
||||
import ironic.drivers.modules.console_utils
|
||||
import ironic.drivers.modules.deploy_utils
|
||||
import ironic.drivers.modules.iboot
|
||||
import ironic.drivers.modules.ilo.common
|
||||
@ -86,7 +85,7 @@ _opts = [
|
||||
('conductor', itertools.chain(
|
||||
ironic.conductor.base_manager.conductor_opts,
|
||||
ironic.conductor.manager.conductor_opts)),
|
||||
('console', ironic.drivers.modules.console_utils.opts),
|
||||
('console', ironic.conf.console.opts),
|
||||
('database', ironic.db.sqlalchemy.models.sql_opts),
|
||||
('deploy', ironic.drivers.modules.deploy_utils.deploy_opts),
|
||||
('dhcp', ironic.common.dhcp_factory.dhcp_provider_opts),
|
||||
|
@ -28,7 +28,6 @@ import time
|
||||
|
||||
from ironic_lib import utils as ironic_utils
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import loopingcall
|
||||
from oslo_utils import netutils
|
||||
@ -37,32 +36,9 @@ from ironic.common import exception
|
||||
from ironic.common.i18n import _
|
||||
from ironic.common.i18n import _LW
|
||||
from ironic.common import utils
|
||||
from ironic.conf import CONF
|
||||
|
||||
|
||||
opts = [
|
||||
cfg.StrOpt('terminal',
|
||||
default='shellinaboxd',
|
||||
help=_('Path to serial console terminal program')),
|
||||
cfg.StrOpt('terminal_cert_dir',
|
||||
help=_('Directory containing the terminal SSL cert(PEM) for '
|
||||
'serial console access')),
|
||||
cfg.StrOpt('terminal_pid_dir',
|
||||
help=_('Directory for holding terminal pid files. '
|
||||
'If not specified, the temporary directory '
|
||||
'will be used.')),
|
||||
cfg.IntOpt('subprocess_checking_interval',
|
||||
default=1,
|
||||
help=_('Time interval (in seconds) for checking the status of '
|
||||
'console subprocess.')),
|
||||
cfg.IntOpt('subprocess_timeout',
|
||||
default=10,
|
||||
help=_('Time (in seconds) to wait for the console subprocess '
|
||||
'to start.')),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(opts, group='console')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user