Moving skip conditions under skip_check classmethod

Skipping conditions shouldn't be under resource_setup
classmethod. This method is used to create resources
for test methods.

Change-Id: I477d64cbda446c53f749d9f36acfbd2d198a5272
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage.py b/manila_tempest_tests/tests/api/admin/test_share_manage.py
index 09bbdb7..9905eeb 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py
@@ -40,17 +40,14 @@
         super(ManageNFSShareTest, cls).skip_checks()
         if not CONF.share.run_manage_unmanage_tests:
             raise cls.skipException('Manage/unmanage tests are disabled.')
-
-    @classmethod
-    def resource_setup(cls):
         if cls.protocol not in CONF.share.enable_protocols:
             message = "%s tests are disabled" % cls.protocol
             raise cls.skipException(message)
-
         utils.skip_if_manage_not_supported_for_version()
 
+    @classmethod
+    def resource_setup(cls):
         super(ManageNFSShareTest, cls).resource_setup()
-
         # Create share type
         cls.st_name = data_utils.rand_name("manage-st-name")
         cls.extra_specs = {
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
index cc97dd6..0aeb88f 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
@@ -39,17 +39,15 @@
         super(ManageNFSShareNegativeTest, cls).skip_checks()
         if not CONF.share.run_manage_unmanage_tests:
             raise cls.skipException('Manage/unmanage tests are disabled.')
-
-    @classmethod
-    def resource_setup(cls):
         if cls.protocol not in CONF.share.enable_protocols:
             message = "%s tests are disabled" % cls.protocol
             raise cls.skipException(message)
 
         utils.skip_if_manage_not_supported_for_version()
 
+    @classmethod
+    def resource_setup(cls):
         super(ManageNFSShareNegativeTest, cls).resource_setup()
-
         # Create share type
         cls.st_name = data_utils.rand_name("manage-st-name")
         cls.extra_specs = {
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index 958cb63..64d734f 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -33,10 +33,14 @@
 class SharesQuotasTest(base.BaseSharesTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(SharesQuotasTest, cls).skip_checks()
         if not CONF.share.run_quota_tests:
             msg = "Quota tests are disabled."
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
         super(SharesQuotasTest, cls).resource_setup()
         cls.user_id = cls.shares_v2_client.user_id
         cls.tenant_id = cls.shares_v2_client.tenant_id
diff --git a/manila_tempest_tests/tests/api/test_quotas_negative.py b/manila_tempest_tests/tests/api/test_quotas_negative.py
index 6b6f1b2..42c9ea7 100644
--- a/manila_tempest_tests/tests/api/test_quotas_negative.py
+++ b/manila_tempest_tests/tests/api/test_quotas_negative.py
@@ -28,11 +28,11 @@
 class SharesQuotasNegativeTest(base.BaseSharesTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(SharesQuotasNegativeTest, cls).skip_checks()
         if not CONF.share.run_quota_tests:
             msg = "Quota tests are disabled."
             raise cls.skipException(msg)
-        super(SharesQuotasNegativeTest, cls).resource_setup()
 
     @decorators.idempotent_id('d0dfe81d-8e8c-4847-a55f-95ba8a3d922c')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
diff --git a/manila_tempest_tests/tests/api/test_rules_negative.py b/manila_tempest_tests/tests/api/test_rules_negative.py
index 63ffb91..574adbc 100644
--- a/manila_tempest_tests/tests/api/test_rules_negative.py
+++ b/manila_tempest_tests/tests/api/test_rules_negative.py
@@ -467,8 +467,8 @@
     # Tests independent from rule type and share protocol
 
     @classmethod
-    def resource_setup(cls):
-        super(ShareRulesNegativeTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(ShareRulesNegativeTest, cls).skip_checks()
         if not (any(p in CONF.share.enable_ip_rules_for_protocols
                     for p in cls.protocols) or
                 any(p in CONF.share.enable_user_rules_for_protocols
@@ -479,6 +479,10 @@
                     for p in cls.protocols)):
             cls.message = "Rule tests are disabled"
             raise cls.skipException(cls.message)
+
+    @classmethod
+    def resource_setup(cls):
+        super(ShareRulesNegativeTest, cls).resource_setup()
         # create share type
         cls.share_type = cls._create_share_type()
         cls.share_type_id = cls.share_type['id']
diff --git a/manila_tempest_tests/tests/api/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py
index 48461b1..76204df 100644
--- a/manila_tempest_tests/tests/api/test_shares.py
+++ b/manila_tempest_tests/tests/api/test_shares.py
@@ -30,11 +30,15 @@
     protocol = "nfs"
 
     @classmethod
-    def resource_setup(cls):
-        super(SharesNFSTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(SharesNFSTest, cls).skip_checks()
         if cls.protocol not in CONF.share.enable_protocols:
             message = "%s tests are disabled" % cls.protocol
             raise cls.skipException(message)
+
+    @classmethod
+    def resource_setup(cls):
+        super(SharesNFSTest, cls).resource_setup()
         # create share_type
         cls.share_type = cls._create_share_type()
         cls.share_type_id = cls.share_type['id']