Validate endpoint_type option at loading
... instead of documenting the supported values, so that more explicit error is presented to users. Also drop redundant description about the default values. The default values are added to sample config files generated, so don't have to be explained in help texts. Change-Id: I12b201da3e742b55f6cfcf71bdd4413cbf3ee4e5 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -24,7 +24,8 @@ aetos_client = cfg.OptGroup(name='aetos_client',
|
||||
AETOS_CLIENT_OPTS = [
|
||||
cfg.StrOpt('interface',
|
||||
default='public',
|
||||
choices=['internal', 'public', 'admin'],
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help="Type of endpoint to use in keystoneclient."),
|
||||
cfg.StrOpt('region_name',
|
||||
help="Region in Identity service catalog to use for "
|
||||
|
||||
@@ -27,9 +27,9 @@ CINDER_CLIENT_OPTS = [
|
||||
help='Version of Cinder API to use in cinderclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in cinderclient. '
|
||||
'Supported values: internalURL, publicURL, adminURL. '
|
||||
'The default is publicURL.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in cinderclient.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
@@ -27,9 +27,9 @@ GLANCE_CLIENT_OPTS = [
|
||||
help='Version of Glance API to use in glanceclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in glanceclient. '
|
||||
'Supported values: internalURL, publicURL, adminURL. '
|
||||
'The default is publicURL.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in glanceclient.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
@@ -27,9 +27,9 @@ GNOCCHI_CLIENT_OPTS = [
|
||||
help='Version of Gnocchi API to use in gnocchiclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='public',
|
||||
help='Type of endpoint to use in gnocchi client. '
|
||||
'Supported values: internal, public, admin. '
|
||||
'The default is public.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in gnocchi client.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')
|
||||
|
||||
@@ -27,9 +27,9 @@ IRONIC_CLIENT_OPTS = [
|
||||
help='Version of Ironic API to use in ironicclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in ironicclient. '
|
||||
'Supported values: internalURL, publicURL, adminURL. '
|
||||
'The default is publicURL.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in ironicclient.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
@@ -27,9 +27,9 @@ MONASCA_CLIENT_OPTS = [
|
||||
help='Version of Monasca API to use in monascaclient.'),
|
||||
cfg.StrOpt('interface',
|
||||
default='internal',
|
||||
help='Type of interface used for monasca endpoint. '
|
||||
'Supported values: internal, public, admin. '
|
||||
'The default is internal.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of interface used for monasca endpoint.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
@@ -27,9 +27,9 @@ NEUTRON_CLIENT_OPTS = [
|
||||
help='Version of Neutron API to use in neutronclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in neutronclient. '
|
||||
'Supported values: internalURL, publicURL, adminURL. '
|
||||
'The default is publicURL.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in neutronclient.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
@@ -38,9 +38,9 @@ for the compute API microversion history.
|
||||
""" % clients.MIN_NOVA_API_VERSION),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in novaclient. '
|
||||
'Supported values: internalURL, publicURL, adminURL. '
|
||||
'The default is publicURL.'),
|
||||
choices=['public', 'internal', 'admin',
|
||||
'publicURL', 'internalURL', 'adminURL'],
|
||||
help='Type of endpoint to use in novaclient.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
Reference in New Issue
Block a user