diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 591347e..825b6e0 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -288,7 +288,7 @@
                       share_network_id=None, share_type_id=None,
                       consistency_group_id=None, client=None,
                       cleanup_in_class=True, is_public=False, **kwargs):
-        client = client or cls.shares_client
+        client = client or cls.shares_v2_client
         description = description or "Tempest's share"
         share_network_id = share_network_id or client.share_network_id or None
         metadata = metadata or {}
@@ -358,7 +358,7 @@
                     "Expected only 'args' and 'kwargs' keys. "
                     "Provided %s" % list(d))
             d["kwargs"]["client"] = d["kwargs"].get(
-                "client", cls.shares_client)
+                "client", cls.shares_v2_client)
             d["share"] = cls._create_share(*d["args"], **d["kwargs"])
             d["cnt"] = 0
             d["available"] = False
diff --git a/manila_tempest_tests/tests/api/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py
index b5c7e01..27ce1c0 100644
--- a/manila_tempest_tests/tests/api/test_shares.py
+++ b/manila_tempest_tests/tests/api/test_shares.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import six
 from tempest import config  # noqa
 from tempest import test  # noqa
 from tempest_lib import exceptions as lib_exc  # noqa
@@ -35,17 +36,19 @@
             raise cls.skipException(message)
         cls.share = cls.create_share(cls.protocol)
 
-    @test.attr(type=["gate", ])
-    def test_create_delete_share(self):
+    def _create_delete_share(self, version):
 
         # create share
-        share = self.create_share(self.protocol)
+        share = self.create_share(
+            self.protocol, version=six.text_type(version))
         detailed_elements = {'name', 'id', 'availability_zone',
                              'description', 'export_location', 'project_id',
                              'host', 'created_at', 'share_proto', 'metadata',
                              'size', 'snapshot_id', 'share_network_id',
                              'status', 'share_type', 'volume_type', 'links',
                              'is_public'}
+        if version > 2.2:
+            detailed_elements.add('snapshot_support')
         self.assertTrue(detailed_elements.issubset(share.keys()),
                         'At least one expected element missing from share '
                         'response. Expected %(expected)s, got %(actual)s.' % {
@@ -61,6 +64,14 @@
                           share['id'])
 
     @test.attr(type=["gate", ])
+    def test_create_delete_share_without_snapshot_support_feature(self):
+        self._create_delete_share(2.1)
+
+    @test.attr(type=["gate", ])
+    def test_create_delete_share_with_snapshot_support_feature(self):
+        self._create_delete_share(2.2)
+
+    @test.attr(type=["gate", ])
     @testtools.skipUnless(CONF.share.run_snapshot_tests,
                           "Snapshot tests are disabled.")
     def test_create_delete_snapshot(self):
diff --git a/manila_tempest_tests/tests/api/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py
index 94754a8..58ddbfe 100644
--- a/manila_tempest_tests/tests/api/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/test_shares_actions.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import six
 from tempest import config  # noqa
 from tempest import test  # noqa
 from tempest_lib.common.utils import data_utils  # noqa
@@ -71,34 +72,45 @@
                 snapshot_id=cls.snap['id'],
             ))
 
-    @test.attr(type=["gate", ])
-    def test_get_share(self):
+    def _get_share(self, version):
 
         # get share
-        share = self.shares_client.get_share(self.shares[0]['id'])
+        share = self.shares_v2_client.get_share(
+            self.shares[0]['id'], version=six.text_type(version))
 
         # verify keys
         expected_keys = ["status", "description", "links", "availability_zone",
                          "created_at", "export_location", "share_proto",
                          "name", "snapshot_id", "id", "size"]
-        actual_keys = share.keys()
+        if version > 2.1:
+            expected_keys.append("snapshot_support")
+        actual_keys = list(share.keys())
         [self.assertIn(key, actual_keys) for key in expected_keys]
 
         # verify values
         msg = "Expected name: '%s', actual name: '%s'" % (self.share_name,
                                                           share["name"])
-        self.assertEqual(self.share_name, str(share["name"]), msg)
+        self.assertEqual(self.share_name, six.text_type(share["name"]), msg)
 
         msg = "Expected description: '%s', "\
               "actual description: '%s'" % (self.share_desc,
                                             share["description"])
-        self.assertEqual(self.share_desc, str(share["description"]), msg)
+        self.assertEqual(
+            self.share_desc, six.text_type(share["description"]), msg)
 
         msg = "Expected size: '%s', actual size: '%s'" % (self.share_size,
                                                           share["size"])
         self.assertEqual(self.share_size, int(share["size"]), msg)
 
     @test.attr(type=["gate", ])
+    def test_get_share_no_snapshot_support_key(self):
+        self._get_share(2.1)
+
+    @test.attr(type=["gate", ])
+    def test_get_share_with_snapshot_support_key(self):
+        self._get_share(2.2)
+
+    @test.attr(type=["gate", ])
     def test_list_shares(self):
 
         # list shares
@@ -114,11 +126,11 @@
             msg = "expected id lists %s times in share list" % (len(gen))
             self.assertEqual(1, len(gen), msg)
 
-    @test.attr(type=["gate", ])
-    def test_list_shares_with_detail(self):
+    def _list_shares_with_detail(self, version):
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail()
+        shares = self.shares_v2_client.list_shares_with_detail(
+            version=six.text_type(version))
 
         # verify keys
         keys = [
@@ -126,6 +138,8 @@
             "created_at", "export_location", "share_proto", "host",
             "name", "snapshot_id", "id", "size", "project_id",
         ]
+        if version > 2.1:
+            keys.append("snapshot_support")
         [self.assertIn(key, sh.keys()) for sh in shares for key in keys]
 
         # our shares in list and have no duplicates
@@ -135,6 +149,14 @@
             self.assertEqual(1, len(gen), msg)
 
     @test.attr(type=["gate", ])
+    def test_list_shares_with_detail_without_snapshot_support_key(self):
+        self._list_shares_with_detail(2.1)
+
+    @test.attr(type=["gate", ])
+    def test_list_shares_with_detail_and_snapshot_support_key(self):
+        self._list_shares_with_detail(2.2)
+
+    @test.attr(type=["gate", ])
     def test_list_shares_with_detail_filter_by_metadata(self):
         filters = {'metadata': self.metadata}
 
