Merge "Move ironic options to common/ironic"
This commit is contained in:
commit
2c88f06560
@ -1,6 +1,7 @@
|
||||
[DEFAULT]
|
||||
output_file = example.conf
|
||||
namespace = ironic_inspector
|
||||
namespace = ironic_inspector.common.ironic
|
||||
namespace = ironic_inspector.common.swift
|
||||
namespace = ironic_inspector.plugins.discovery
|
||||
namespace = keystonemiddleware.auth_token
|
||||
|
@ -324,7 +324,7 @@
|
||||
[ironic]
|
||||
|
||||
#
|
||||
# From ironic_inspector
|
||||
# From ironic_inspector.common.ironic
|
||||
#
|
||||
|
||||
# Keystone authentication endpoint for accessing Ironic API. Use
|
||||
|
@ -29,6 +29,68 @@ SET_CREDENTIALS_VALID_STATES = {'enroll'}
|
||||
# 1.11 is API version, which support 'enroll' state
|
||||
DEFAULT_IRONIC_API_VERSION = '1.11'
|
||||
|
||||
IRONIC_GROUP = 'ironic'
|
||||
|
||||
IRONIC_OPTS = [
|
||||
cfg.StrOpt('os_auth_url',
|
||||
default='',
|
||||
help='Keystone authentication endpoint for accessing Ironic '
|
||||
'API. Use [keystone_authtoken]/auth_uri for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_username',
|
||||
default='',
|
||||
help='User name for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_user for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_password',
|
||||
default='',
|
||||
help='Password for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_password for keystone '
|
||||
'authentication.',
|
||||
secret=True,
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_tenant_name',
|
||||
default='',
|
||||
help='Tenant name for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_tenant_name for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('identity_uri',
|
||||
default='',
|
||||
help='Keystone admin endpoint. '
|
||||
'DEPRECATED: use [keystone_authtoken]/identity_uri.',
|
||||
deprecated_group='discoverd',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('auth_strategy',
|
||||
default='keystone',
|
||||
choices=('keystone', 'noauth'),
|
||||
help='Method to use for authentication: noauth or keystone.'),
|
||||
cfg.StrOpt('ironic_url',
|
||||
default='http://localhost:6385/',
|
||||
help='Ironic API URL, used to set Ironic API URL when '
|
||||
'auth_strategy option is noauth to work with standalone '
|
||||
'Ironic without keystone.'),
|
||||
cfg.StrOpt('os_service_type',
|
||||
default='baremetal',
|
||||
help='Ironic service type.'),
|
||||
cfg.StrOpt('os_endpoint_type',
|
||||
default='internalURL',
|
||||
help='Ironic endpoint type.'),
|
||||
cfg.IntOpt('retry_interval',
|
||||
default=2,
|
||||
help='Interval between retries in case of conflict error '
|
||||
'(HTTP 409).'),
|
||||
cfg.IntOpt('max_retries',
|
||||
default=30,
|
||||
help='Maximum number of retries in case of conflict error '
|
||||
'(HTTP 409).'),
|
||||
]
|
||||
|
||||
|
||||
CONF.register_opts(IRONIC_OPTS, group=IRONIC_GROUP)
|
||||
|
||||
|
||||
def get_ipmi_address(node):
|
||||
ipmi_fields = ['ipmi_address'] + CONF.ipmi_address_fields
|
||||
@ -108,3 +170,7 @@ def dict_to_capabilities(caps_dict):
|
||||
return ','.join(["%s:%s" % (key, value)
|
||||
for key, value in caps_dict.items()
|
||||
if value is not None])
|
||||
|
||||
|
||||
def list_opts():
|
||||
return [(IRONIC_GROUP, IRONIC_OPTS)]
|
||||
|
@ -19,64 +19,6 @@ VALID_KEEP_PORTS_VALUES = ('all', 'present', 'added')
|
||||
VALID_STORE_DATA_VALUES = ('none', 'swift')
|
||||
|
||||
|
||||
IRONIC_OPTS = [
|
||||
cfg.StrOpt('os_auth_url',
|
||||
default='',
|
||||
help='Keystone authentication endpoint for accessing Ironic '
|
||||
'API. Use [keystone_authtoken]/auth_uri for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_username',
|
||||
default='',
|
||||
help='User name for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_user for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_password',
|
||||
default='',
|
||||
help='Password for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_password for keystone '
|
||||
'authentication.',
|
||||
secret=True,
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('os_tenant_name',
|
||||
default='',
|
||||
help='Tenant name for accessing Ironic API. '
|
||||
'Use [keystone_authtoken]/admin_tenant_name for keystone '
|
||||
'authentication.',
|
||||
deprecated_group='discoverd'),
|
||||
cfg.StrOpt('identity_uri',
|
||||
default='',
|
||||
help='Keystone admin endpoint. '
|
||||
'DEPRECATED: use [keystone_authtoken]/identity_uri.',
|
||||
deprecated_group='discoverd',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('auth_strategy',
|
||||
default='keystone',
|
||||
choices=('keystone', 'noauth'),
|
||||
help='Method to use for authentication: noauth or keystone.'),
|
||||
cfg.StrOpt('ironic_url',
|
||||
default='http://localhost:6385/',
|
||||
help='Ironic API URL, used to set Ironic API URL when '
|
||||
'auth_strategy option is noauth to work with standalone '
|
||||
'Ironic without keystone.'),
|
||||
cfg.StrOpt('os_service_type',
|
||||
default='baremetal',
|
||||
help='Ironic service type.'),
|
||||
cfg.StrOpt('os_endpoint_type',
|
||||
default='internalURL',
|
||||
help='Ironic endpoint type.'),
|
||||
cfg.IntOpt('retry_interval',
|
||||
default=2,
|
||||
help='Interval between retries in case of conflict error '
|
||||
'(HTTP 409).'),
|
||||
cfg.IntOpt('max_retries',
|
||||
default=30,
|
||||
help='Maximum number of retries in case of conflict error '
|
||||
'(HTTP 409).'),
|
||||
]
|
||||
|
||||
|
||||
FIREWALL_OPTS = [
|
||||
cfg.BoolOpt('manage_firewall',
|
||||
default=True,
|
||||
@ -263,7 +205,6 @@ SERVICE_OPTS = [
|
||||
cfg.CONF.register_opts(SERVICE_OPTS)
|
||||
cfg.CONF.register_opts(FIREWALL_OPTS, group='firewall')
|
||||
cfg.CONF.register_opts(PROCESSING_OPTS, group='processing')
|
||||
cfg.CONF.register_opts(IRONIC_OPTS, group='ironic')
|
||||
cfg.CONF.register_opts(DISCOVERD_OPTS, group='discoverd')
|
||||
|
||||
|
||||
@ -271,7 +212,6 @@ def list_opts():
|
||||
return [
|
||||
('', SERVICE_OPTS),
|
||||
('firewall', FIREWALL_OPTS),
|
||||
('ironic', IRONIC_OPTS),
|
||||
('processing', PROCESSING_OPTS),
|
||||
('discoverd', DISCOVERD_OPTS),
|
||||
]
|
||||
|
@ -55,6 +55,7 @@ ironic_inspector.rules.actions =
|
||||
extend-attribute = ironic_inspector.plugins.rules:ExtendAttributeAction
|
||||
oslo.config.opts =
|
||||
ironic_inspector = ironic_inspector.conf:list_opts
|
||||
ironic_inspector.common.ironic = ironic_inspector.common.ironic:list_opts
|
||||
ironic_inspector.common.swift = ironic_inspector.common.swift:list_opts
|
||||
ironic_inspector.plugins.discovery = ironic_inspector.plugins.discovery:list_opts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user