diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index c5be1f3..abf3c6b 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -61,12 +61,20 @@
             cls.volumes_extension_client = cls.os.volumes_extension_client
             cls.availability_zone_client = (
                 cls.os.volume_availability_zone_client)
+            # Special fields and resp code for cinder v1
+            cls.special_fields = {'name_field': 'display_name',
+                                  'descrip_field': 'display_description',
+                                  'create_resp': 200}
 
         elif cls._api_version == 2:
             if not CONF.volume_feature_enabled.api_v2:
                 msg = "Volume API v2 is disabled"
                 raise cls.skipException(msg)
             cls.volumes_client = cls.os.volumes_v2_client
+            # Special fields and resp code for cinder v2
+            cls.special_fields = {'name_field': 'name',
+                                  'descrip_field': 'description',
+                                  'create_resp': 202}
 
         else:
             msg = ("Invalid Cinder API version (%s)" % cls._api_version)
@@ -82,15 +90,15 @@
     @classmethod
     def create_volume(cls, size=1, **kwargs):
         """Wrapper utility that returns a test volume."""
-        vol_name = data_utils.rand_name('Volume')
-        if cls._api_version == 1:
-            resp, volume = cls.volumes_client.create_volume(
-                size, display_name=vol_name, **kwargs)
-            assert 200 == resp.status
-        elif cls._api_version == 2:
-            resp, volume = cls.volumes_client.create_volume(
-                size, name=vol_name, **kwargs)
-            assert 202 == resp.status
+        name = data_utils.rand_name('Volume')
+
+        name_field = cls.special_fields['name_field']
+        expect_status = cls.special_fields['create_resp']
+
+        kwargs[name_field] = name
+        resp, volume = cls.volumes_client.create_volume(size, **kwargs)
+        assert expect_status == resp.status
+
         cls.volumes.append(volume)
         cls.volumes_client.wait_for_volume_status(volume['id'], 'available')
         return volume
diff --git a/tempest/api/volume/test_volume_metadata.py b/tempest/api/volume/test_volume_metadata.py
index 0d57d47..0505f19 100644
--- a/tempest/api/volume/test_volume_metadata.py
+++ b/tempest/api/volume/test_volume_metadata.py
@@ -19,13 +19,12 @@
 from tempest import test
 
 
-class VolumeMetadataTest(base.BaseVolumeV1Test):
-    _interface = "json"
+class VolumesV2MetadataTest(base.BaseVolumeTest):
 
     @classmethod
     @test.safe_setup
     def setUpClass(cls):
-        super(VolumeMetadataTest, cls).setUpClass()
+        super(VolumesV2MetadataTest, cls).setUpClass()
         # Create a volume
         cls.volume = cls.create_volume()
         cls.volume_id = cls.volume['id']
@@ -33,7 +32,7 @@
     def tearDown(self):
         # Update the metadata to {}
         self.volumes_client.update_volume_metadata(self.volume_id, {})
-        super(VolumeMetadataTest, self).tearDown()
+        super(VolumesV2MetadataTest, self).tearDown()
 
     @test.attr(type='gate')
     def test_create_get_delete_volume_metadata(self):
@@ -117,5 +116,13 @@
         self.assertThat(body.items(), matchers.ContainsAll(expect.items()))
 
 
-class VolumeMetadataTestXML(VolumeMetadataTest):
+class VolumesV2MetadataTestXML(VolumesV2MetadataTest):
+    _interface = "xml"
+
+
+class VolumesV1MetadataTest(VolumesV2MetadataTest):
+    _api_version = 1
+
+
+class VolumesV1MetadataTestXML(VolumesV1MetadataTest):
     _interface = "xml"
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index 82d1364..bf61222 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -23,12 +23,11 @@
 CONF = config.CONF
 
 
-class VolumesTransfersTest(base.BaseVolumeV1Test):
-    _interface = "json"
+class VolumesV2TransfersTest(base.BaseVolumeTest):
 
     @classmethod
     def setUpClass(cls):
-        super(VolumesTransfersTest, cls).setUpClass()
+        super(VolumesV2TransfersTest, cls).setUpClass()
 
         # Add another tenant to test volume-transfer
         if CONF.compute.allow_tenant_isolation:
@@ -110,5 +109,13 @@
         self.client.wait_for_volume_status(volume['id'], 'available')
 
 
-class VolumesTransfersTestXML(VolumesTransfersTest):
+class VolumesV2TransfersTestXML(VolumesV2TransfersTest):
+    _interface = "xml"
+
+
+class VolumesV1TransfersTest(VolumesV2TransfersTest):
+    _api_version = 1
+
+
+class VolumesV1TransfersTestXML(VolumesV1TransfersTest):
     _interface = "xml"
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index cfab0bd..6fef564 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -21,13 +21,12 @@
 CONF = config.CONF
 
 
-class VolumesActionsTest(base.BaseVolumeV1Test):
-    _interface = "json"
+class VolumesV2ActionsTest(base.BaseVolumeTest):
 
     @classmethod
     @test.safe_setup
     def setUpClass(cls):
-        super(VolumesActionsTest, cls).setUpClass()
+        super(VolumesV2ActionsTest, cls).setUpClass()
         cls.client = cls.volumes_client
         cls.image_client = cls.os.image_client
 
@@ -47,7 +46,7 @@
         cls.servers_client.delete_server(cls.server['id'])
         cls.servers_client.wait_for_server_termination(cls.server['id'])
 
-        super(VolumesActionsTest, cls).tearDownClass()
+        super(VolumesV2ActionsTest, cls).tearDownClass()
 
     @test.stresstest(class_setup_per='process')
     @test.attr(type='smoke')
@@ -165,5 +164,13 @@
         self.assertEqual(False, bool_flag)
 
 
-class VolumesActionsTestXML(VolumesActionsTest):
+class VolumesV2ActionsTestXML(VolumesV2ActionsTest):
+    _interface = "xml"
+
+
+class VolumesV1ActionsTest(VolumesV2ActionsTest):
+    _api_version = 1
+
+
+class VolumesV1ActionsTestXML(VolumesV1ActionsTest):
     _interface = "xml"
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 2745b95..82208aa 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -23,14 +23,17 @@
 CONF = config.CONF
 
 
-class VolumesGetTest(base.BaseVolumeV1Test):
-    _interface = "json"
+class VolumesV2GetTest(base.BaseVolumeTest):
 
     @classmethod
     def setUpClass(cls):
-        super(VolumesGetTest, cls).setUpClass()
+        super(VolumesV2GetTest, cls).setUpClass()
         cls.client = cls.volumes_client
 
+        cls.name_field = cls.special_fields['name_field']
+        cls.descrip_field = cls.special_fields['descrip_field']
+        cls.create_resp = cls.special_fields['create_resp']
+
     def _delete_volume(self, volume_id):
         resp, _ = self.client.delete_volume(volume_id)
         self.assertEqual(202, resp.status)
@@ -51,24 +54,24 @@
         v_name = data_utils.rand_name('Volume')
         metadata = {'Type': 'Test'}
         # Create a volume
-        resp, volume = self.client.create_volume(display_name=v_name,
-                                                 metadata=metadata,
-                                                 **kwargs)
-        self.assertEqual(200, resp.status)
+        kwargs[self.name_field] = v_name
+        kwargs['metadata'] = metadata
+        resp, volume = self.client.create_volume(**kwargs)
+        self.assertEqual(self.create_resp, resp.status)
         self.assertIn('id', volume)
         self.addCleanup(self._delete_volume, volume['id'])
-        self.assertIn('display_name', volume)
-        self.assertEqual(volume['display_name'], v_name,
+        self.client.wait_for_volume_status(volume['id'], 'available')
+        self.assertIn(self.name_field, volume)
+        self.assertEqual(volume[self.name_field], v_name,
                          "The created volume name is not equal "
                          "to the requested name")
         self.assertTrue(volume['id'] is not None,
                         "Field volume id is empty or not found.")
-        self.client.wait_for_volume_status(volume['id'], 'available')
         # Get Volume information
         resp, fetched_volume = self.client.get_volume(volume['id'])
         self.assertEqual(200, resp.status)
         self.assertEqual(v_name,
-                         fetched_volume['display_name'],
+                         fetched_volume[self.name_field],
                          'The fetched Volume name is different '
                          'from the created Volume')
         self.assertEqual(volume['id'],
@@ -90,27 +93,25 @@
 
         # Update Volume
         # Test volume update when display_name is same with original value
-        resp, update_volume = \
-            self.client.update_volume(volume['id'],
-                                      display_name=v_name)
+        params = {self.name_field: v_name}
+        resp, update_volume = self.client.update_volume(volume['id'], **params)
         self.assertEqual(200, resp.status)
         # Test volume update when display_name is new
         new_v_name = data_utils.rand_name('new-Volume')
         new_desc = 'This is the new description of volume'
-        resp, update_volume = \
-            self.client.update_volume(volume['id'],
-                                      display_name=new_v_name,
-                                      display_description=new_desc)
+        params = {self.name_field: new_v_name,
+                  self.descrip_field: new_desc}
+        resp, update_volume = self.client.update_volume(volume['id'], **params)
         # Assert response body for update_volume method
         self.assertEqual(200, resp.status)
-        self.assertEqual(new_v_name, update_volume['display_name'])
-        self.assertEqual(new_desc, update_volume['display_description'])
+        self.assertEqual(new_v_name, update_volume[self.name_field])
+        self.assertEqual(new_desc, update_volume[self.descrip_field])
         # Assert response body for get_volume method
         resp, updated_volume = self.client.get_volume(volume['id'])
         self.assertEqual(200, resp.status)
         self.assertEqual(volume['id'], updated_volume['id'])
-        self.assertEqual(new_v_name, updated_volume['display_name'])
-        self.assertEqual(new_desc, updated_volume['display_description'])
+        self.assertEqual(new_v_name, updated_volume[self.name_field])
+        self.assertEqual(new_desc, updated_volume[self.descrip_field])
         self.assertThat(updated_volume['metadata'].items(),
                         matchers.ContainsAll(metadata.items()),
                         'The fetched Volume metadata misses data '
@@ -120,20 +121,18 @@
         # then test volume update if display_name is duplicated
         new_volume = {}
         new_v_desc = data_utils.rand_name('@#$%^* description')
-        resp, new_volume = \
-            self.client.create_volume(
-                size=1,
-                display_description=new_v_desc,
-                availability_zone=volume['availability_zone'])
-        self.assertEqual(200, resp.status)
+        params = {self.descrip_field: new_v_desc,
+                  'availability_zone': volume['availability_zone']}
+        resp, new_volume = self.client.create_volume(size=1, **params)
+        self.assertEqual(self.create_resp, resp.status)
         self.assertIn('id', new_volume)
         self.addCleanup(self._delete_volume, new_volume['id'])
         self.client.wait_for_volume_status(new_volume['id'], 'available')
-        resp, update_volume = \
-            self.client.update_volume(
-                new_volume['id'],
-                display_name=volume['display_name'],
-                display_description=volume['display_description'])
+
+        params = {self.name_field: volume[self.name_field],
+                  self.descrip_field: volume[self.descrip_field]}
+        resp, update_volume = self.client.update_volume(new_volume['id'],
+                                                        **params)
         self.assertEqual(200, resp.status)
 
         # NOTE(jdg): Revert back to strict true/false checking
@@ -159,5 +158,13 @@
         self._volume_create_get_update_delete(source_volid=origin['id'])
 
 
-class VolumesGetTestXML(VolumesGetTest):
+class VolumesV2GetTestXML(VolumesV2GetTest):
+    _interface = "xml"
+
+
+class VolumesV1GetTest(VolumesV2GetTest):
+    _api_version = 1
+
+
+class VolumesV1GetTestXML(VolumesV1GetTest):
     _interface = "xml"
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index bc5b1dc..8bd4c88 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -21,15 +21,16 @@
 from tempest import test
 
 
-class VolumesNegativeTest(base.BaseVolumeV1Test):
-    _interface = 'json'
+class VolumesV2NegativeTest(base.BaseVolumeTest):
 
     @classmethod
     @test.safe_setup
     def setUpClass(cls):
-        super(VolumesNegativeTest, cls).setUpClass()
+        super(VolumesV2NegativeTest, cls).setUpClass()
         cls.client = cls.volumes_client
 
+        cls.name_field = cls.special_fields['name_field']
+
         # Create a test shared instance and volume for attach/detach tests
         cls.volume = cls.create_volume()
         cls.mountpoint = "/dev/vdc"
@@ -237,7 +238,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
-        params = {'display_name': v_name}
+        params = {self.name_field: v_name}
         resp, fetched_volume = self.client.list_volumes(params)
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(fetched_volume))
@@ -245,7 +246,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_detail_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
-        params = {'display_name': v_name}
+        params = {self.name_field: v_name}
         resp, fetched_volume = self.client.list_volumes_with_detail(params)
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(fetched_volume))
@@ -265,5 +266,14 @@
         self.assertEqual(0, len(fetched_volume))
 
 
-class VolumesNegativeTestXML(VolumesNegativeTest):
+class VolumesV2NegativeTestXML(VolumesV2NegativeTest):
+    _interface = 'xml'
+
+
+class VolumesV1NegativeTest(VolumesV2NegativeTest):
+    _api_version = 1
+    _name = 'display_name'
+
+
+class VolumesV1NegativeTestXML(VolumesV1NegativeTest):
     _interface = 'xml'
