diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index de235510d0..797238952e 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -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 diff --git a/ironic/conf/__init__.py b/ironic/conf/__init__.py index e69de29bb2..4c18407c7d 100644 --- a/ironic/conf/__init__.py +++ b/ironic/conf/__init__.py @@ -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) diff --git a/ironic/conf/console.py b/ironic/conf/console.py new file mode 100644 index 0000000000..692c0df6bb --- /dev/null +++ b/ironic/conf/console.py @@ -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') diff --git a/ironic/conf/opts.py b/ironic/conf/opts.py index d567c3eda0..fe5a67b2de 100644 --- a/ironic/conf/opts.py +++ b/ironic/conf/opts.py @@ -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), diff --git a/ironic/drivers/modules/console_utils.py b/ironic/drivers/modules/console_utils.py index ca1a4e4b3d..6a54d05696 100644 --- a/ironic/drivers/modules/console_utils.py +++ b/ironic/drivers/modules/console_utils.py @@ -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__)