Enable some volumes v2 tests by sharing codes part2
1. Rename volumes v1 client to a base client, then create
v1 and v2 clients inheriting base client.
2. create volumes v2 tests using the existent test class.
3. create a new test class for v1, which inherits v2.
This patch includes the following volumes tests:
- test_availability_zone.py
- test_extensions.py
Partially implements: blueprint cinder-v2-api-tests
Change-Id: Ie21ebc184710e9abe894cdc20ed7a39aacc94ded
diff --git a/tempest/services/volume/json/extensions_client.py b/tempest/services/volume/json/extensions_client.py
index 9e182ea..e3ff00b 100644
--- a/tempest/services/volume/json/extensions_client.py
+++ b/tempest/services/volume/json/extensions_client.py
@@ -21,10 +21,10 @@
CONF = config.CONF
-class ExtensionsClientJSON(rest_client.RestClient):
+class BaseExtensionsClientJSON(rest_client.RestClient):
def __init__(self, auth_provider):
- super(ExtensionsClientJSON, self).__init__(auth_provider)
+ super(BaseExtensionsClientJSON, self).__init__(auth_provider)
self.service = CONF.volume.catalog_type
def list_extensions(self):
@@ -32,3 +32,9 @@
resp, body = self.get(url)
body = json.loads(body)
return resp, body['extensions']
+
+
+class ExtensionsClientJSON(BaseExtensionsClientJSON):
+ """
+ Volume V1 extensions client.
+ """