Do not set default versions in parsed args
Setting default versions in parsed args makes it so OCC cannot tell if the argument was parsed, an environment variable was set or it is just defaulted. In order to set api versions from OCC, it will have to be defaulted after processing OCC. Closes-Bug: #1453229 Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
This commit is contained in:
doc/source
openstackclient
@ -297,7 +297,9 @@ class OpenStackShell(app.App):
|
||||
|
||||
# Loop through extensions to get API versions
|
||||
for mod in clientmanager.PLUGIN_MODULES:
|
||||
version_opt = getattr(self.options, mod.API_VERSION_OPTION, None)
|
||||
default_version = getattr(mod, 'DEFAULT_API_VERSION', None)
|
||||
option = mod.API_VERSION_OPTION.replace('os_', '')
|
||||
version_opt = self.cloud.config.get(option, default_version)
|
||||
if version_opt:
|
||||
api = mod.API_NAME
|
||||
self.api_version[api] = version_opt
|
||||
|
Reference in New Issue
Block a user