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
diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py
index 66d28a5..391fe02 100644
--- a/barbican_tempest_plugin/tests/scenario/manager.py
+++ b/barbican_tempest_plugin/tests/scenario/manager.py
@@ -75,12 +75,12 @@
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
#