File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616import logging
1717from typing import TYPE_CHECKING , Any
1818
19- if TYPE_CHECKING :
20- from manilaclient import client
21-
2219from osc_lib import exceptions
2320from osc_lib import utils
2421
2522from openstackclient .i18n import _
2623
24+ if TYPE_CHECKING :
25+ from manilaclient import client
26+
2727LOG = logging .getLogger (__name__ )
2828
2929# global variables used when building the shell
3737
3838def make_client (instance : Any ) -> 'client.Client' :
3939 """Returns a manilaclient.client.Client instance."""
40- from manilaclient import api_versions
40+ # Defer client imports until we actually need them
4141 from manilaclient import client
4242
43- check_version = instance ._api_version [API_NAME ]
44- if check_version .isdigit ():
45- check_version = f"{ check_version } .0"
46-
47- version = api_versions .get_api_version (check_version )
43+ if _share_api_version is not None :
44+ version = _share_api_version
45+ else :
46+ from manilaclient import api_versions
4847
49- instance .setup_auth ()
48+ check_version = instance ._api_version [API_NAME ]
49+ version = api_versions .get_api_version (check_version )
5050
5151 LOG .debug ('Instantiating Shared File System client: %s' , client .Client )
5252 LOG .debug ('Shared File System API version: %s' , version )
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ osc-lib>=4.6.0 # Apache-2.0
1010oslo.i18n >= 3.15.3 # Apache-2.0
1111python-keystoneclient >= 3.22.0 # Apache-2.0
1212python-cinderclient >= 3.3.0 # Apache-2.0
13- python-manilaclient >= 5.7 .0 # Apache-2.0
13+ python-manilaclient >= 6.0 .0 # Apache-2.0
1414requests >= 2.27.0 # Apache-2.0
1515stevedore >= 2.0.1 # Apache-2.0
You can’t perform that action at this time.
0 commit comments