Merge "Centralize config options - [iscsi]"
This commit is contained in:
commit
46dc3959e3
@ -32,6 +32,7 @@ from ironic.conf import ilo
|
||||
from ironic.conf import inspector
|
||||
from ironic.conf import ipmi
|
||||
from ironic.conf import irmc
|
||||
from ironic.conf import iscsi
|
||||
from ironic.conf import keystone
|
||||
from ironic.conf import metrics
|
||||
from ironic.conf import metrics_statsd
|
||||
@ -64,6 +65,7 @@ ilo.register_opts(CONF)
|
||||
inspector.register_opts(CONF)
|
||||
ipmi.register_opts(CONF)
|
||||
irmc.register_opts(CONF)
|
||||
iscsi.register_opts(CONF)
|
||||
keystone.register_opts(CONF)
|
||||
metrics.register_opts(CONF)
|
||||
metrics_statsd.register_opts(CONF)
|
||||
|
30
ironic/conf/iscsi.py
Normal file
30
ironic/conf/iscsi.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2016 Intel Corporation
|
||||
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
||||
# 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.PortOpt('portal_port',
|
||||
default=3260,
|
||||
help=_('The port number on which the iSCSI portal listens '
|
||||
'for incoming connections.')),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(opts, group='iscsi')
|
@ -14,7 +14,6 @@ import itertools
|
||||
|
||||
import ironic.drivers.modules.amt.common
|
||||
import ironic.drivers.modules.amt.power
|
||||
import ironic.drivers.modules.iscsi_deploy
|
||||
|
||||
_default_opt_lists = [
|
||||
ironic.conf.default.api_opts,
|
||||
@ -50,7 +49,7 @@ _opts = [
|
||||
('inspector', ironic.conf.inspector.list_opts()),
|
||||
('ipmi', ironic.conf.ipmi.opts),
|
||||
('irmc', ironic.conf.irmc.opts),
|
||||
('iscsi', ironic.drivers.modules.iscsi_deploy.iscsi_opts),
|
||||
('iscsi', ironic.conf.iscsi.opts),
|
||||
('keystone', ironic.conf.keystone.opts),
|
||||
('metrics', ironic.conf.metrics.opts),
|
||||
('metrics_statsd', ironic.conf.metrics_statsd.opts),
|
||||
|
@ -18,7 +18,6 @@ import os
|
||||
from ironic_lib import disk_utils
|
||||
from ironic_lib import metrics_utils
|
||||
from ironic_lib import utils as ironic_utils
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import fileutils
|
||||
from six.moves.urllib import parse
|
||||
@ -40,15 +39,6 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
METRICS = metrics_utils.get_metrics_logger(__name__)
|
||||
|
||||
iscsi_opts = [
|
||||
cfg.PortOpt('portal_port',
|
||||
default=3260,
|
||||
help=_('The port number on which the iSCSI portal listens '
|
||||
'for incoming connections.')),
|
||||
]
|
||||
|
||||
CONF.register_opts(iscsi_opts, group='iscsi')
|
||||
|
||||
DISK_LAYOUT_PARAMS = ('root_gb', 'swap_mb', 'ephemeral_gb')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user