Make sure test use the latest volume clients

Compute and scenario test use volume v2, but they should use
the latest available API version instead.

Change-Id: I09cfb726fe87b8e6a4f6ead7c955c77d60043d8b
This commit is contained in:
Andrea Frittoli 2017-08-04 10:46:10 +01:00
parent 28ab763712
commit a6b301595a
3 changed files with 8 additions and 4 deletions

View File

@ -97,8 +97,8 @@ class BaseV2ComputeTest(api_version_utils.BaseMicroversionTest,
cls.security_group_default_rules_client = (
cls.os_primary.security_group_default_rules_client)
cls.versions_client = cls.os_primary.compute_versions_client
cls.volumes_client = cls.os_primary.volumes_v2_client
if CONF.service_available.cinder:
cls.volumes_client = cls.os_primary.volumes_client_latest
@classmethod
def resource_setup(cls):

View File

@ -263,6 +263,7 @@ class Manager(clients.ServiceClients):
# Set default client for users that don't need explicit version
self.volumes_client_latest = self.volumes_v2_client
self.snapshots_client_latest = self.snapshots_v2_client
if CONF.volume_feature_enabled.api_v3:
self.backups_v3_client = self.volume_v3.BackupsClient()
@ -277,6 +278,7 @@ class Manager(clients.ServiceClients):
# Set default client for users that don't need explicit version
self.volumes_client_latest = self.volumes_v3_client
self.snapshots_client_latest = self.snapshots_v3_client
def _set_object_storage_clients(self):
# NOTE(andreaf) Load configuration from config. Once object storage

View File

@ -79,8 +79,10 @@ class ScenarioTest(tempest.test.BaseTestCase):
cls.security_groups_client = cls.os_primary.security_groups_client
cls.security_group_rules_client = (
cls.os_primary.security_group_rules_client)
cls.volumes_client = cls.os_primary.volumes_v2_client
cls.snapshots_client = cls.os_primary.snapshots_v2_client
# Use the latest available volume clients
if CONF.service_available.cinder:
cls.volumes_client = cls.os_primary.volumes_client_latest
cls.snapshots_client = cls.os_primary.snapshots_client_latest
# ## Test functions library
#