Merge "Make Ironic options definitions consistent"
This commit is contained in:
commit
3b87313eb4
@ -2,7 +2,6 @@
|
|||||||
# needs:check_deprecation_status
|
# needs:check_deprecation_status
|
||||||
# needs:check_opt_group_and_type
|
# needs:check_opt_group_and_type
|
||||||
# needs:fix_opt_description_indentation
|
# needs:fix_opt_description_indentation
|
||||||
# needs:fix_opt_registration_consistency
|
|
||||||
|
|
||||||
|
|
||||||
# Copyright 2015 Intel Corporation
|
# Copyright 2015 Intel Corporation
|
||||||
@ -26,75 +25,56 @@ ironic_group = cfg.OptGroup(
|
|||||||
'ironic',
|
'ironic',
|
||||||
title='Ironic Options')
|
title='Ironic Options')
|
||||||
|
|
||||||
api_version = cfg.IntOpt(
|
ironic_options = [
|
||||||
'api_version',
|
cfg.IntOpt('api_version',
|
||||||
default=1,
|
default=1,
|
||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
help='Version of Ironic API service endpoint. '
|
help='Version of Ironic API service endpoint. '
|
||||||
'DEPRECATED: Setting the API version is not possible anymore.')
|
'DEPRECATED: Setting the API version is not possible anymore.'),
|
||||||
|
cfg.StrOpt(
|
||||||
api_endpoint = cfg.StrOpt(
|
'api_endpoint',
|
||||||
'api_endpoint',
|
help='URL for Ironic API endpoint.'),
|
||||||
help='URL for Ironic API endpoint.')
|
cfg.StrOpt(
|
||||||
|
'admin_username',
|
||||||
admin_username = cfg.StrOpt(
|
help='Ironic keystone admin name'),
|
||||||
'admin_username',
|
cfg.StrOpt(
|
||||||
help='Ironic keystone admin name')
|
'admin_password',
|
||||||
|
secret=True,
|
||||||
admin_password = cfg.StrOpt(
|
help='Ironic keystone admin password.'),
|
||||||
'admin_password',
|
cfg.StrOpt(
|
||||||
secret=True,
|
'admin_auth_token',
|
||||||
help='Ironic keystone admin password.')
|
secret=True,
|
||||||
|
deprecated_for_removal=True,
|
||||||
admin_auth_token = cfg.StrOpt(
|
help='Ironic keystone auth token.'
|
||||||
'admin_auth_token',
|
'DEPRECATED: use admin_username, admin_password, and '
|
||||||
secret=True,
|
'admin_tenant_name instead'),
|
||||||
deprecated_for_removal=True,
|
cfg.StrOpt(
|
||||||
help='Ironic keystone auth token.'
|
'admin_url',
|
||||||
'DEPRECATED: use admin_username, admin_password, and '
|
help='Keystone public API endpoint.'),
|
||||||
'admin_tenant_name instead')
|
cfg.StrOpt(
|
||||||
|
'cafile',
|
||||||
admin_url = cfg.StrOpt(
|
help='PEM encoded Certificate Authority to use when verifying HTTPs '
|
||||||
'admin_url',
|
'connections.'),
|
||||||
help='Keystone public API endpoint.')
|
cfg.StrOpt(
|
||||||
|
'admin_tenant_name',
|
||||||
cafile = cfg.StrOpt(
|
help='Ironic keystone tenant name.'),
|
||||||
'cafile',
|
cfg.IntOpt(
|
||||||
help='PEM encoded Certificate Authority to use when verifying HTTPs '
|
'api_max_retries',
|
||||||
'connections.')
|
default=60,
|
||||||
|
help='How many retries when a request does conflict. '
|
||||||
admin_tenant_name = cfg.StrOpt(
|
'If <= 0, only try once, no retries.'),
|
||||||
'admin_tenant_name',
|
cfg.IntOpt(
|
||||||
help='Ironic keystone tenant name.')
|
'api_retry_interval',
|
||||||
|
default=2,
|
||||||
api_max_retries = cfg.IntOpt(
|
help='How often to retry in seconds when a request '
|
||||||
'api_max_retries',
|
'does conflict'),
|
||||||
default=60,
|
]
|
||||||
help=('How many retries when a request does conflict. '
|
|
||||||
'If <= 0, only try once, no retries.'))
|
|
||||||
|
|
||||||
api_retry_interval = cfg.IntOpt(
|
|
||||||
'api_retry_interval',
|
|
||||||
default=2,
|
|
||||||
help='How often to retry in seconds when a request '
|
|
||||||
'does conflict')
|
|
||||||
|
|
||||||
ALL_OPTS = [api_version,
|
|
||||||
api_endpoint,
|
|
||||||
admin_username,
|
|
||||||
admin_password,
|
|
||||||
admin_auth_token,
|
|
||||||
admin_url,
|
|
||||||
cafile,
|
|
||||||
admin_tenant_name,
|
|
||||||
api_max_retries,
|
|
||||||
api_retry_interval]
|
|
||||||
|
|
||||||
|
|
||||||
def register_opts(conf):
|
def register_opts(conf):
|
||||||
conf.register_group(ironic_group)
|
conf.register_group(ironic_group)
|
||||||
conf.register_opts(ALL_OPTS, group=ironic_group)
|
conf.register_opts(ironic_options, group=ironic_group)
|
||||||
|
|
||||||
|
|
||||||
def list_opts():
|
def list_opts():
|
||||||
return {ironic_group: ALL_OPTS}
|
return {ironic_group: ironic_options}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user