Fix cinder command execution issue with a token
This commit fixes the issue where the following error occurs when executing cinder commands using a token: > ERROR: argument --os-token: conflicting option string: --os-token This issue arises because `os_token` is added to the parser in `keystoneauth1.loading.register_auth_argparse_arguments()`, and then `os_token` is set again by `parser.add_argument('--os-token')`. Closes-Bug: #2061349 Change-Id: I8d1ff0f202bec24ed2982108b6cbba1b7981b356
This commit is contained in:
parent
4e71afe6ab
commit
585c14fdf0
@ -331,10 +331,7 @@ class OpenStackCinderShell(object):
|
||||
parser.add_argument('--os_region_name',
|
||||
help=argparse.SUPPRESS)
|
||||
|
||||
parser.add_argument(
|
||||
'--os-token', metavar='<token>',
|
||||
default=utils.env('OS_TOKEN'),
|
||||
help=_('Defaults to env[OS_TOKEN].'))
|
||||
parser.set_defaults(os_token=utils.env('OS_TOKEN'))
|
||||
parser.add_argument(
|
||||
'--os_token',
|
||||
help=argparse.SUPPRESS)
|
||||
|
Loading…
Reference in New Issue
Block a user