diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-11-14 17:27:58 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-11-16 11:37:52 -0600 |
| commit | 2b02beaa5182e678d9da00402a7c4f137710f813 (patch) | |
| tree | 99a6883d59820098e99e0e8cb6f6898e16cc2654 /openstackclient/shell.py | |
| parent | f5a2811b6546007eac055151e320005c0d4410d0 (diff) | |
| download | python-openstackclient-2b02beaa5182e678d9da00402a7c4f137710f813.tar.gz | |
Liberalize version matching a bit
For class-loading purposes we can just use the major version,
so accept that. Only Identity and Compute were affected; Compute
is included just to be pedantically complete.
For command groups we also just use the major version so fix
Compute and the version option handling.
Change the internal default for Identity to a simple '2' so it
is also consistent with the rest of the world.
Then comes microversioning...
Closes-Bug: #1292638
Change-Id: Ibaf823b31caa288a83de38d2c258860b128b87d8
Diffstat (limited to 'openstackclient/shell.py')
| -rw-r--r-- | openstackclient/shell.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index 1198bae1..ac5556af 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -255,7 +255,8 @@ class OpenStackShell(app.App): if version_opt: api = mod.API_NAME self.api_version[api] = version_opt - version = '.v' + version_opt.replace('.', '_') + # Command groups deal only with major versions + version = '.v' + version_opt.replace('.', '_').split('_')[0] cmd_group = 'openstack.' + api.replace('-', '_') + version self.command_manager.add_command_group(cmd_group) self.log.debug( |
