Added support of volume api_v3 client
* From rocky release projects are consuming the volume featured enabled v3 API, Since the earlier code has support for v1, v2 and since api_v3 is used in tempest.conf, it will give AttributeError: 'Manager' object has no attribute 'volumes_client'. The above patch fixes the issue. * Keep cinder v1 api as tempest plugin is branchless, it would avoid breakage if someone is still consuming it. Closes-Bug: #1775353 Change-Id: Ia9d070a6033a8192112dbaa1704b1de6838051c5
This commit is contained in:
parent
5ddcc7eefa
commit
c9f0b5d46b
@ -81,16 +81,16 @@ class BarbicanScenarioTest(mgr.ScenarioTest):
|
||||
)
|
||||
|
||||
if CONF.compute_feature_enabled.attach_encrypted_volume:
|
||||
if CONF.volume_feature_enabled.api_v2:
|
||||
cls.admin_volume_types_client =\
|
||||
os_adm.volume_types_v2_client
|
||||
cls.admin_encryption_types_client =\
|
||||
os_adm.encryption_types_v2_client
|
||||
else:
|
||||
if CONF.volume_feature_enabled.api_v1:
|
||||
cls.admin_volume_types_client =\
|
||||
os_adm.volume_types_client
|
||||
cls.admin_encryption_types_client =\
|
||||
os_adm.encryption_types_client
|
||||
else:
|
||||
cls.admin_volume_types_client =\
|
||||
os_adm.volume_types_v2_client
|
||||
cls.admin_encryption_types_client =\
|
||||
os_adm.encryption_types_v2_client
|
||||
|
||||
def _get_uuid(self, href):
|
||||
return href.split('/')[-1]
|
||||
|
@ -75,12 +75,12 @@ class ScenarioTest(manager.NetworkScenarioTest):
|
||||
cls.security_group_rules_client = (
|
||||
cls.os_primary.security_group_rules_client)
|
||||
|
||||
if CONF.volume_feature_enabled.api_v2:
|
||||
cls.volumes_client = cls.os_primary.volumes_v2_client
|
||||
cls.snapshots_client = cls.os_primary.snapshots_v2_client
|
||||
else:
|
||||
if CONF.volume_feature_enabled.api_v1:
|
||||
cls.volumes_client = cls.os_primary.volumes_client
|
||||
cls.snapshots_client = cls.os_primary.snapshots_client
|
||||
else:
|
||||
cls.volumes_client = cls.os_primary.volumes_client_latest
|
||||
cls.snapshots_client = cls.os_primary.snapshots_client_latest
|
||||
|
||||
# ## Test functions library
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user