Support only volume api_v3 is enabled

Now if we set CONF.volume_feature_enabled.api_v2 to False while
setting CONF.volume_feature_enabled.api_v3 to True, some testcases
can't work properly, e.g., in scenario.manager.py, we have
    "if not client:
        client = self.os_admin.volume_types_v2_client"

In fact, we should support only volume api_v3 is enabled, which means
to run all volume testcases using v3 interfaces(not only those new
functions added in v3).

So this is to transfer all volume v2 clients to using v3 interfaces
if only api_v3 is enabled.

Change-Id: I6924f295bcc84797e3c59f8cc4b68c1e251b931d
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index ea3bb5a..107ff57 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -31,6 +31,11 @@
     """Base test case class for all Cinder API tests."""
 
     _api_version = 2
+    # if api_v2 is not enabled while api_v3 is enabled, the volume v2 classes
+    # should be transferred to volume v3 classes.
+    if (not CONF.volume_feature_enabled.api_v2 and
+        CONF.volume_feature_enabled.api_v3):
+        _api_version = 3
     credentials = ['primary']
 
     @classmethod
diff --git a/tempest/clients.py b/tempest/clients.py
index ca205c8..b06eafb 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -234,7 +234,9 @@
             self.volumes_client = self.volume_v1.VolumesClient()
             self.volumes_extension_client = self.volume_v1.ExtensionsClient()
 
-        if CONF.volume_feature_enabled.api_v2:
+        # if only api_v3 is enabled, all these clients should be available
+        if (CONF.volume_feature_enabled.api_v2 or
+            CONF.volume_feature_enabled.api_v3):
             self.backups_v2_client = self.volume_v2.BackupsClient()
             self.encryption_types_v2_client = \
                 self.volume_v2.EncryptionTypesClient()