Merge "Add MapR-FS native driver"
diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py
index 1cd553e..aebe125 100644
--- a/manila_tempest_tests/config.py
+++ b/manila_tempest_tests/config.py
@@ -30,7 +30,7 @@
                help="The minimum api microversion is configured to be the "
                     "value of the minimum microversion supported by Manila."),
     cfg.StrOpt("max_api_microversion",
-               default="2.25",
+               default="2.26",
                help="The maximum api microversion is configured to be the "
                     "value of the latest microversion supported by Manila."),
     cfg.StrOpt("region",
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 1ecb728..4459f59 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -221,6 +221,12 @@
         return client
 
     @classmethod
+    def skip_checks(cls):
+        super(BaseSharesTest, cls).skip_checks()
+        if not CONF.service_available.manila:
+            raise cls.skipException("Manila support is required")
+
+    @classmethod
     def verify_nonempty(cls, *args):
         if not all(args):
             msg = "Missing API credentials in configuration."
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index a7540ed..83c776f 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import ddt
+import itertools
 from tempest import config
 from testtools import testcase as tc
 
@@ -65,27 +66,23 @@
         self.assertGreater(int(quotas["snapshots"]), -2)
         self.assertGreater(int(quotas["share_networks"]), -2)
 
+    @ddt.data(
+        *itertools.product(set(("2.25", CONF.share.max_api_microversion)),
+                           (True, False))
+    )
+    @ddt.unpack
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     @base.skip_if_microversion_not_supported("2.25")
-    def test_show_quotas_detail(self):
-        quotas = self.shares_v2_client.detail_quotas(self.tenant_id)
+    def test_show_quotas_detail(self, microversion, with_user):
+        quota_args = {"tenant_id": self.tenant_id, "version": microversion, }
+        if with_user:
+            quota_args.update({"user_id": self.user_id})
+        quotas = self.shares_v2_client.detail_quotas(**quota_args)
         quota_keys = list(quotas.keys())
         for outer in ('gigabytes', 'snapshot_gigabytes', 'shares',
                       'snapshots', 'share_networks'):
             self.assertIn(outer, quota_keys)
+            outer_keys = list(quotas[outer].keys())
             for inner in ('in_use', 'limit', 'reserved'):
-                self.assertIn(inner, list(quotas[outer].keys()))
-                self.assertGreater(int(quotas[outer][inner]), -2)
-
-    @tc.attr(base.TAG_POSITIVE, base.TAG_API)
-    @base.skip_if_microversion_not_supported("2.25")
-    def test_show_quotas_detail_for_user(self):
-        quotas = self.shares_v2_client.detail_quotas(self.tenant_id,
-                                                     self.user_id)
-        quota_keys = list(quotas.keys())
-        for outer in ('gigabytes', 'snapshot_gigabytes', 'shares',
-                      'snapshots', 'share_networks'):
-            self.assertIn(outer, quota_keys)
-            for inner in ('in_use', 'limit', 'reserved'):
-                self.assertIn(inner, list(quotas[outer].keys()))
+                self.assertIn(inner, outer_keys)
                 self.assertGreater(int(quotas[outer][inner]), -2)
diff --git a/manila_tempest_tests/tests/api/test_quotas_negative.py b/manila_tempest_tests/tests/api/test_quotas_negative.py
index ca9882e..2e850fb 100644
--- a/manila_tempest_tests/tests/api/test_quotas_negative.py
+++ b/manila_tempest_tests/tests/api/test_quotas_negative.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import ddt
 from tempest import config
 from tempest.lib import exceptions as lib_exc
 from testtools import testcase as tc
@@ -22,6 +23,7 @@
 CONF = config.CONF
 
 
+@ddt.ddt
 class SharesQuotasNegativeTest(base.BaseSharesTest):
 
     @classmethod
@@ -48,3 +50,11 @@
                           self.shares_v2_client.update_quotas,
                           self.shares_v2_client.tenant_id,
                           shares=9)
+
+    @ddt.data("2.6", "2.7", "2.24")
+    @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
+    def test_get_quotas_detail_with_wrong_version(self, microversion):
+        self.assertRaises(lib_exc.NotFound,
+                          self.shares_v2_client.detail_quotas,
+                          self.shares_v2_client.tenant_id,
+                          version=microversion)
diff --git a/manila_tempest_tests/tests/api/test_share_networks_negative.py b/manila_tempest_tests/tests/api/test_share_networks_negative.py
index 4c40857..0ec9407 100644
--- a/manila_tempest_tests/tests/api/test_share_networks_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_networks_negative.py
@@ -118,7 +118,6 @@
         new_sn = self.create_share_network(
             neutron_net_id=share_network['neutron_net_id'],
             neutron_subnet_id=share_network['neutron_subnet_id'],
-            nova_net_id=share_network['nova_net_id'],
             cleanup_in_class=False)
 
         # Create share with share network
diff --git a/manila_tempest_tests/tests/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py
index 01be412..e019733 100644
--- a/manila_tempest_tests/tests/scenario/manager_share.py
+++ b/manila_tempest_tests/tests/scenario/manager_share.py
@@ -50,6 +50,12 @@
         cls.shares_admin_v2_client = shares_v2_client.SharesV2Client(
             cls.os_admin.auth_provider)
 
+    @classmethod
+    def skip_checks(cls):
+        super(ShareScenarioTest, cls).skip_checks()
+        if not CONF.service_available.manila:
+            raise cls.skipException("Manila support is required")
+
     def _create_share(self, share_protocol=None, size=None, name=None,
                       snapshot_id=None, description=None, metadata=None,
                       share_network_id=None, share_type_id=None,