Fix openstack client for vmware-nsx
Do not use the client to get extensions in case the initialization is not done. This can happen when using openstack client command with --help Change-Id: Iccdc47e3f7c53f6f1aa73bb18f85a522efd85093
This commit is contained in:
parent
1283390df9
commit
f43adec123
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
from osc_lib import utils as osc_utils
|
||||
|
||||
|
||||
cached_extensions = None
|
||||
|
||||
|
||||
@ -24,9 +23,14 @@ def get_extensions(client_manager):
|
||||
global cached_extensions
|
||||
if cached_extensions is not None:
|
||||
return cached_extensions
|
||||
|
||||
extensions = []
|
||||
if not client_manager._auth_setup_completed:
|
||||
# cannot get the extensions from the neutron client
|
||||
return extensions
|
||||
|
||||
# Get supported extensions from the manager
|
||||
data = client_manager.network.extensions()
|
||||
extensions = []
|
||||
for s in data:
|
||||
prop = osc_utils.get_item_properties(
|
||||
s, ('Alias',), formatters={})
|
||||
|
Loading…
Reference in New Issue
Block a user