summaryrefslogtreecommitdiff
path: root/cinderclient/shell.py
diff options
context:
space:
mode:
authorTom Hancock <tom.hancock@hp.com>2015-09-28 15:53:45 +0100
committerTom Hancock <tom.hancock@hp.com>2015-09-28 16:36:09 +0100
commita3610f045d70fd0a03e7ed05e8a542ac8c345e81 (patch)
tree408fd4f1cf3c31f79b5684f835d21076b0239969 /cinderclient/shell.py
parent029b51d37899518f1cdc40a737394fdfd6771df5 (diff)
downloadpython-cinderclient-a3610f045d70fd0a03e7ed05e8a542ac8c345e81.tar.gz
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
Diffstat (limited to 'cinderclient/shell.py')
-rw-r--r--cinderclient/shell.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/cinderclient/shell.py b/cinderclient/shell.py
index 7215c1b..e770320 100644
--- a/cinderclient/shell.py
+++ b/cinderclient/shell.py
@@ -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>',