Reuse v2 extension client for cinder v3
Now(Pike) Cinder versions are like - V1: Deprecated - V2: Deprecated - V3: Current So users should be able to disable cinder v2 API on Tempest config. This patch makes verify_tempest_config reuse v2 extension client for v3 also. In addition, this patch removes v1 extension client usage on verify_tempest_config because Tempest doesn't contain v1 tests at all and we don't need to verify the v1 extensions at all. Change-Id: I3ef5a82a70fa9e4b862f50a85f93351888ed6bcd
This commit is contained in:
parent
345dc6cda4
commit
8b876dd453
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- verify_tempest_config command starts using extension_client of
|
||||
cinder v2 API only, because cinder v3 API is current and v2 and
|
||||
v1 are deprecated and v3 extension API is the same as v2. Then
|
||||
we can reuse the v2 client for v3 API also.
|
@ -167,15 +167,13 @@ def verify_api_versions(os, service, update):
|
||||
def get_extension_client(os, service):
|
||||
extensions_client = {
|
||||
'nova': os.extensions_client,
|
||||
'cinder': os.volumes_extension_client,
|
||||
'neutron': os.network_extensions_client,
|
||||
'swift': os.capabilities_client,
|
||||
# NOTE: Cinder v3 API is current and v2 and v1 are deprecated.
|
||||
# V3 extension API is the same as v2, so we reuse the v2 client
|
||||
# for v3 API also.
|
||||
'cinder': os.volumes_v2_extension_client,
|
||||
}
|
||||
# NOTE (e0ne): Use Cinder API v2 by default because v1 is deprecated
|
||||
if CONF.volume_feature_enabled.api_v2:
|
||||
extensions_client['cinder'] = os.volumes_v2_extension_client
|
||||
else:
|
||||
extensions_client['cinder'] = os.volumes_extension_client
|
||||
|
||||
if service not in extensions_client:
|
||||
print('No tempest extensions client for %s' % service)
|
||||
|
Loading…
Reference in New Issue
Block a user