Fully support os-endpoint-type
Fix Change-Id: I98a8507f2369deff6a6f7f8f08271b169fe651ad for bug #1454436 doesnt allow OS_ENDPOINT_TYPE environment variable to be used as a default for --os-endpoint-type as argparse takes the first definition of the default expression for dest=os_endpoint_type Closes-bug: 1500489 Change-Id: I76cc963b10bc7a549fe5a0cd2c73dfc6a30bb759
This commit is contained in:
@@ -161,20 +161,10 @@ class OpenStackCinderShell(object):
|
||||
parser.add_argument('--volume_service_name',
|
||||
help=argparse.SUPPRESS)
|
||||
|
||||
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',
|
||||
dest='os_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=utils.env('OS_ENDPOINT_TYPE',
|
||||
default=DEFAULT_CINDER_ENDPOINT_TYPE)),
|
||||
help='Endpoint type, which is publicURL or '
|
||||
'internalURL. '
|
||||
@@ -183,6 +173,13 @@ class OpenStackCinderShell(object):
|
||||
+ DEFAULT_CINDER_ENDPOINT_TYPE + '.')
|
||||
parser.add_argument('--os_endpoint_type',
|
||||
help=argparse.SUPPRESS)
|
||||
parser.add_argument('--endpoint-type',
|
||||
metavar='<endpoint-type>',
|
||||
dest='endpoint_type',
|
||||
help='DEPRECATED! Use --os-endpoint-type.')
|
||||
parser.add_argument('--endpoint_type',
|
||||
dest='endpoint_type',
|
||||
help=argparse.SUPPRESS)
|
||||
|
||||
parser.add_argument('--os-volume-api-version',
|
||||
metavar='<volume-api-ver>',
|
||||
|
Reference in New Issue
Block a user