enable volumes v2 snapshot tests by sharing codes

1. create volumes v2 tests using the existent test class.
2. create a new test class for v1, which inherits v2.

This patch includes the following volumes tests:
- test_snapshot_metadata.py
- test_volumes_snapshots.py
- test_volumes_snapshots_negative.py

Partially implements: blueprint cinder-v2-api-tests

Change-Id: I5e8a8c71d8c3a3b330a60ab0ea9603f8864518bd
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index 61aa307..ddecda8 100644
--- a/tempest/api/volume/test_volumes_snapshots_negative.py
+++ b/tempest/api/volume/test_volumes_snapshots_negative.py
@@ -21,12 +21,11 @@
 CONF = config.CONF
 
 
-class VolumesSnapshotNegativeTest(base.BaseVolumeV1Test):
-    _interface = "json"
+class VolumesV2SnapshotNegativeTestJSON(base.BaseVolumeTest):
 
     @classmethod
     def setUpClass(cls):
-        super(VolumesSnapshotNegativeTest, cls).setUpClass()
+        super(VolumesV2SnapshotNegativeTestJSON, cls).setUpClass()
 
         if not CONF.volume_feature_enabled.snapshot:
             raise cls.skipException("Cinder volume snapshots are disabled")
@@ -48,5 +47,13 @@
                           None, display_name=s_name)
 
 
-class VolumesSnapshotNegativeTestXML(VolumesSnapshotNegativeTest):
+class VolumesV2SnapshotNegativeTestXML(VolumesV2SnapshotNegativeTestJSON):
+    _interface = "xml"
+
+
+class VolumesV1SnapshotNegativeTestJSON(VolumesV2SnapshotNegativeTestJSON):
+    _api_version = 1
+
+
+class VolumesV1SnapshotNegativeTestXML(VolumesV1SnapshotNegativeTestJSON):
     _interface = "xml"