File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,10 +42,12 @@ def make_client(instance):
4242 except ImportError :
4343 from novaclient .v1_1 .contrib import list_extensions
4444
45- compute_client = nova_client .get_client_class (
46- instance ._api_version [API_NAME ],
47- )
48- LOG .debug ('Instantiating compute client: %s' , compute_client )
45+ if _compute_api_version is not None :
46+ version = _compute_api_version
47+ else :
48+ version = instance ._api_version [API_NAME ]
49+
50+ LOG .debug ('Instantiating compute client for V%s' % version )
4951
5052 # Set client http_log_debug to True if verbosity level is high enough
5153 http_log_debug = utils .get_effective_log_level () <= logging .DEBUG
@@ -55,10 +57,8 @@ def make_client(instance):
5557 # Remember interface only if it is set
5658 kwargs = utils .build_kwargs_dict ('endpoint_type' , instance ._interface )
5759
58- if _compute_api_version is not None :
59- kwargs .update ({'api_version' : _compute_api_version })
60-
61- client = compute_client (
60+ client = nova_client .Client (
61+ version ,
6262 session = instance .session ,
6363 extensions = extensions ,
6464 http_log_debug = http_log_debug ,
You can’t perform that action at this time.
0 commit comments