summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Kumar <chkumar@redhat.com>2018-06-06 13:54:35 +0530
committerChandan Kumar <chkumar@redhat.com>2018-06-06 19:04:22 +0530
commitc9f0b5d46b17bc55182489150bd6cc6a0399d204 (patch)
treefce924e16a810e8a71b298fe853ec229adbefe01
parent5ddcc7eefaefb4ef178081ec4838e8f450c6c1dd (diff)
Added support of volume api_v3 clientHEADmaster
* 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
Notes
Notes (review): Code-Review+1: Arx Cruz <arxcruz@redhat.com> Code-Review+2: Douglas Mendizábal <douglas@redrobot.io> Code-Review+2: Ade Lee <alee@redhat.com> Workflow+1: Ade Lee <alee@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 06 Jun 2018 17:17:05 +0000 Reviewed-on: https://review.openstack.org/572697 Project: openstack/barbican-tempest-plugin Branch: refs/heads/master
-rw-r--r--barbican_tempest_plugin/tests/scenario/barbican_manager.py10
-rw-r--r--barbican_tempest_plugin/tests/scenario/manager.py8
2 files changed, 9 insertions, 9 deletions
diff --git a/barbican_tempest_plugin/tests/scenario/barbican_manager.py b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
index 2cf7a7f..8e5d7c4 100644
--- a/barbican_tempest_plugin/tests/scenario/barbican_manager.py
+++ b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
@@ -81,16 +81,16 @@ class BarbicanScenarioTest(mgr.ScenarioTest):
81 ) 81 )
82 82
83 if CONF.compute_feature_enabled.attach_encrypted_volume: 83 if CONF.compute_feature_enabled.attach_encrypted_volume:
84 if CONF.volume_feature_enabled.api_v2: 84 if CONF.volume_feature_enabled.api_v1:
85 cls.admin_volume_types_client =\ 85 cls.admin_volume_types_client =\
86 os_adm.volume_types_v2_client 86 os_adm.volume_types_client
87 cls.admin_encryption_types_client =\ 87 cls.admin_encryption_types_client =\
88 os_adm.encryption_types_v2_client 88 os_adm.encryption_types_client
89 else: 89 else:
90 cls.admin_volume_types_client =\ 90 cls.admin_volume_types_client =\
91 os_adm.volume_types_client 91 os_adm.volume_types_v2_client
92 cls.admin_encryption_types_client =\ 92 cls.admin_encryption_types_client =\
93 os_adm.encryption_types_client 93 os_adm.encryption_types_v2_client
94 94
95 def _get_uuid(self, href): 95 def _get_uuid(self, href):
96 return href.split('/')[-1] 96 return href.split('/')[-1]
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 @@ class ScenarioTest(manager.NetworkScenarioTest):
75 cls.security_group_rules_client = ( 75 cls.security_group_rules_client = (
76 cls.os_primary.security_group_rules_client) 76 cls.os_primary.security_group_rules_client)
77 77
78 if CONF.volume_feature_enabled.api_v2: 78 if CONF.volume_feature_enabled.api_v1:
79 cls.volumes_client = cls.os_primary.volumes_v2_client
80 cls.snapshots_client = cls.os_primary.snapshots_v2_client
81 else:
82 cls.volumes_client = cls.os_primary.volumes_client 79 cls.volumes_client = cls.os_primary.volumes_client
83 cls.snapshots_client = cls.os_primary.snapshots_client 80 cls.snapshots_client = cls.os_primary.snapshots_client
81 else:
82 cls.volumes_client = cls.os_primary.volumes_client_latest
83 cls.snapshots_client = cls.os_primary.snapshots_client_latest
84 84
85 # ## Test functions library 85 # ## Test functions library
86 # 86 #