File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727API_NAME = 'compute'
2828API_VERSIONS = {
2929 '1.1' : 'novaclient.v1_1.client.Client' ,
30+ '1' : 'novaclient.v1_1.client.Client' ,
3031 '2' : 'novaclient.v1_1.client.Client' ,
3132}
3233
Original file line number Diff line number Diff line change 1515
1616import logging
1717
18- from keystoneclient .v2_0 import client as identity_client_v2_0
18+ from keystoneclient .v2_0 import client as identity_client_v2
1919from openstackclient .api import auth
2020from openstackclient .common import utils
2121
2222LOG = logging .getLogger (__name__ )
2323
24- DEFAULT_IDENTITY_API_VERSION = '2.0 '
24+ DEFAULT_IDENTITY_API_VERSION = '2'
2525API_VERSION_OPTION = 'os_identity_api_version'
2626API_NAME = 'identity'
2727API_VERSIONS = {
28- '2.0' : 'openstackclient.identity.client.IdentityClientv2_0' ,
28+ '2.0' : 'openstackclient.identity.client.IdentityClientv2' ,
29+ '2' : 'openstackclient.identity.client.IdentityClientv2' ,
2930 '3' : 'keystoneclient.v3.client.Client' ,
3031}
3132
3233# Translate our API version to auth plugin version prefix
3334AUTH_VERSIONS = {
3435 '2.0' : 'v2' ,
36+ '2' : 'v2' ,
3537 '3' : 'v3' ,
3638}
3739
@@ -66,7 +68,7 @@ def build_option_parser(parser):
6668 return auth .build_auth_plugins_option_parser (parser )
6769
6870
69- class IdentityClientv2_0 ( identity_client_v2_0 .Client ):
71+ class IdentityClientv2 ( identity_client_v2 .Client ):
7072 """Tweak the earlier client class to deal with some changes"""
7173 def __getattr__ (self , name ):
7274 # Map v3 'projects' back to v2 'tenants'
Original file line number Diff line number Diff line change @@ -255,7 +255,8 @@ def initialize_app(self, argv):
255255 if version_opt :
256256 api = mod .API_NAME
257257 self .api_version [api ] = version_opt
258- version = '.v' + version_opt .replace ('.' , '_' )
258+ # Command groups deal only with major versions
259+ version = '.v' + version_opt .replace ('.' , '_' ).split ('_' )[0 ]
259260 cmd_group = 'openstack.' + api .replace ('-' , '_' ) + version
260261 self .command_manager .add_command_group (cmd_group )
261262 self .log .debug (
Original file line number Diff line number Diff line change 3838
3939
4040DEFAULT_COMPUTE_API_VERSION = "2"
41- DEFAULT_IDENTITY_API_VERSION = "2.0 "
42- DEFAULT_IMAGE_API_VERSION = "v2 "
41+ DEFAULT_IDENTITY_API_VERSION = "2"
42+ DEFAULT_IMAGE_API_VERSION = "2 "
4343DEFAULT_VOLUME_API_VERSION = "1"
4444DEFAULT_NETWORK_API_VERSION = "2"
4545
4646LIB_COMPUTE_API_VERSION = "2"
47- LIB_IDENTITY_API_VERSION = "2.0 "
47+ LIB_IDENTITY_API_VERSION = "2"
4848LIB_IMAGE_API_VERSION = "1"
4949LIB_VOLUME_API_VERSION = "1"
5050LIB_NETWORK_API_VERSION = "2"
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ openstack.compute.v2 =
131131 server_unrescue = openstackclient.compute.v2.server:UnrescueServer
132132 server_unset = openstackclient.compute.v2.server:UnsetServer
133133
134- openstack.identity.v2_0 =
134+ openstack.identity.v2 =
135135 catalog_list = openstackclient.identity.v2_0.catalog:ListCatalog
136136 catalog_show = openstackclient.identity.v2_0.catalog:ShowCatalog
137137
You can’t perform that action at this time.
0 commit comments