Add --os-endpoint-type to match other services

Cinder uses the parameter '--endpoint-type' but other services
 (Glance, Nova, Swift) use '--os-endpoint-type'. (Neutron has deprecated
 'endpoint-type' in favor or 'os-endpoint-type' as well.
'--endpoint-type' should be deprecated and 'os-endpoint-type' should
be added.

Change-Id: I0ac6573be35c86b9f764a39f1e60486d2345f51b
Closes-Bug: #1453901
This commit is contained in:
scottda
2015-05-12 13:21:35 +00:00
parent 17bccf1a06
commit 24aff3b796

View File

@@ -164,14 +164,24 @@ class OpenStackCinderShell(object):
parser.add_argument('--endpoint-type',
metavar='<endpoint-type>',
dest='os_endpoint_type',
default=utils.env('CINDER_ENDPOINT_TYPE',
default=DEFAULT_CINDER_ENDPOINT_TYPE),
help='DEPRECATED! Use --os-endpoint-type.')
parser.add_argument('--endpoint_type',
help=argparse.SUPPRESS)
parser.add_argument('--os-endpoint-type',
metavar='<os-endpoint-type>',
default=utils.env('OS_ENDPOINT_TYPE',
default=utils.env('CINDER_ENDPOINT_TYPE',
default=DEFAULT_CINDER_ENDPOINT_TYPE)),
help='Endpoint type, which is publicURL or '
'internalURL. '
'Default=nova env[CINDER_ENDPOINT_TYPE] or '
'Default=env[OS_ENDPOINT_TYPE] or '
'nova env[CINDER_ENDPOINT_TYPE] or '
+ DEFAULT_CINDER_ENDPOINT_TYPE + '.')
parser.add_argument('--endpoint_type',
parser.add_argument('--os_endpoint_type',
help=argparse.SUPPRESS)
parser.add_argument('--os-volume-api-version',
@@ -587,7 +597,7 @@ class OpenStackCinderShell(object):
args.os_username, args.os_password,
args.os_tenant_name, args.os_auth_url,
args.os_region_name, args.os_tenant_id,
args.endpoint_type, args.insecure,
args.os_endpoint_type, args.insecure,
args.service_type, args.service_name,
args.volume_service_name,
args.bypass_url, args.os_cacert,
@@ -597,9 +607,6 @@ class OpenStackCinderShell(object):
else:
auth_plugin = None
if not endpoint_type:
endpoint_type = DEFAULT_CINDER_ENDPOINT_TYPE
if not service_type:
service_type = DEFAULT_CINDER_SERVICE_TYPE
service_type = utils.get_service_type(args.func) or service_type