Merge "Add share_size config option"
diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py
index 9d0ed83..e2b98a3 100644
--- a/manila_tempest_tests/config.py
+++ b/manila_tempest_tests/config.py
@@ -17,8 +17,6 @@
 
 from oslo_config import cfg
 
-from tempest import config  # noqa
-
 service_available_group = cfg.OptGroup(name="service_available",
                                        title="Available OpenStack Services")
 
diff --git a/manila_tempest_tests/services/share/json/shares_client.py b/manila_tempest_tests/services/share/json/shares_client.py
index 2ad7c21..2a48005 100644
--- a/manila_tempest_tests/services/share/json/shares_client.py
+++ b/manila_tempest_tests/services/share/json/shares_client.py
@@ -19,7 +19,7 @@
 import six
 from six.moves.urllib import parse as urlparse
 
-from tempest import config  # noqa
+from tempest import config
 from tempest.lib.common import rest_client
 from tempest.lib.common.utils import data_utils
 from tempest.lib import exceptions
diff --git a/manila_tempest_tests/tests/api/admin/test_admin_actions.py b/manila_tempest_tests/tests/api/admin/test_admin_actions.py
index bc89642..40b2460 100644
--- a/manila_tempest_tests/tests/api/admin/test_admin_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_admin_actions.py
@@ -13,9 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from tempest import config
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_migration.py b/manila_tempest_tests/tests/api/admin/test_migration.py
index f808a44..a5ceaa4 100644
--- a/manila_tempest_tests/tests/api/admin/test_migration.py
+++ b/manila_tempest_tests/tests/api/admin/test_migration.py
@@ -13,8 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest import test  # noqa
+from tempest import config
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 from manila_tempest_tests import utils
diff --git a/manila_tempest_tests/tests/api/admin/test_migration_negative.py b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
index 348e5fa..127be01 100644
--- a/manila_tempest_tests/tests/api/admin/test_migration_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
@@ -13,9 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_multi_backend.py b/manila_tempest_tests/tests/api/admin/test_multi_backend.py
index 57fb9fd..20659b1 100644
--- a/manila_tempest_tests/tests/api/admin/test_multi_backend.py
+++ b/manila_tempest_tests/tests/api/admin/test_multi_backend.py
@@ -13,9 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib.common.utils import data_utils  # noqa
-from tempest import test  # noqa
+from tempest import config
+from tempest.lib.common.utils import data_utils
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py
index 2fa6be9..7e1449a 100644
--- a/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py
+++ b/manila_tempest_tests/tests/api/admin/test_scheduler_stats.py
@@ -12,9 +12,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+from tempest import config
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_security_services.py b/manila_tempest_tests/tests/api/admin/test_security_services.py
index 79169ff..6ba04be 100644
--- a/manila_tempest_tests/tests/api/admin/test_security_services.py
+++ b/manila_tempest_tests/tests/api/admin/test_security_services.py
@@ -13,7 +13,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 from manila_tempest_tests.tests.api import test_security_services
diff --git a/manila_tempest_tests/tests/api/admin/test_share_networks.py b/manila_tempest_tests/tests/api/admin/test_share_networks.py
index b3df760..1c11647 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_networks.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_networks.py
@@ -13,7 +13,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 from manila_tempest_tests.tests.api import test_share_networks
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers.py b/manila_tempest_tests/tests/api/admin/test_share_servers.py
index 9509cb1..e08a7a4 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers.py
@@ -15,10 +15,10 @@
 
 import re
 
-import six  # noqa
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+import six
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types.py b/manila_tempest_tests/tests/api/admin/test_share_types.py
index 5dc462d..d55b01e 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types.py
@@ -14,10 +14,10 @@
 #    under the License.
 
 import ddt
-from tempest import config  # noqa
-from tempest.lib.common.utils import data_utils  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+from tempest import config
+from tempest.lib.common.utils import data_utils
+from tempest.lib import exceptions as lib_exc
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 from manila_tempest_tests import utils
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
index 7ee3f7b..f550ca6 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
@@ -15,8 +15,8 @@
 
 import copy
 
-from tempest.lib.common.utils import data_utils  # noqa
-from tempest import test  # noqa
+from tempest.lib.common.utils import data_utils
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/admin/test_shares_actions.py b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
index c76fa1a..ed04ffd 100644
--- a/manila_tempest_tests/tests/api/admin/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
@@ -13,10 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib.common.utils import data_utils  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from tempest import config
+from tempest.lib.common.utils import data_utils
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_consistency_groups.py b/manila_tempest_tests/tests/api/test_consistency_groups.py
index 45a462d..3c88554 100644
--- a/manila_tempest_tests/tests/api/test_consistency_groups.py
+++ b/manila_tempest_tests/tests/api/test_consistency_groups.py
@@ -13,10 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_extensions.py b/manila_tempest_tests/tests/api/test_extensions.py
index b9a6c9e..5dde050 100644
--- a/manila_tempest_tests/tests/api/test_extensions.py
+++ b/manila_tempest_tests/tests/api/test_extensions.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_limits.py b/manila_tempest_tests/tests/api/test_limits.py
index 8348b26..88567b5 100644
--- a/manila_tempest_tests/tests/api/test_limits.py
+++ b/manila_tempest_tests/tests/api/test_limits.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_metadata.py b/manila_tempest_tests/tests/api/test_metadata.py
index d075666..bc3efb4 100644
--- a/manila_tempest_tests/tests/api/test_metadata.py
+++ b/manila_tempest_tests/tests/api/test_metadata.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_metadata_negative.py b/manila_tempest_tests/tests/api/test_metadata_negative.py
index 7aec3e5..51f541a 100644
--- a/manila_tempest_tests/tests/api/test_metadata_negative.py
+++ b/manila_tempest_tests/tests/api/test_metadata_negative.py
@@ -14,8 +14,8 @@
 #    under the License.
 
 import ddt
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+from tempest.lib import exceptions as lib_exc
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_replication_negative.py b/manila_tempest_tests/tests/api/test_replication_negative.py
index ca91636..e6a1719 100644
--- a/manila_tempest_tests/tests/api/test_replication_negative.py
+++ b/manila_tempest_tests/tests/api/test_replication_negative.py
@@ -78,7 +78,11 @@
     @test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
     def test_try_add_replica_to_share_with_no_replication_share_type(self):
         # Create share without replication type
-        share = self.create_share()
+        share_type = self.create_share_type(
+            data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX),
+            extra_specs=self.add_required_extra_specs_to_dict(),
+            client=self.admin_client)["share_type"]
+        share = self.create_share(share_type_id=share_type["id"])
         self.assertRaises(lib_exc.BadRequest,
                           self.create_share_replica,
                           share['id'],
diff --git a/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py b/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py
index c9aac84..a23f2a5 100644
--- a/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py
+++ b/manila_tempest_tests/tests/api/test_scheduler_stats_negative.py
@@ -13,8 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
+from tempest.lib import exceptions as lib_exc
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_security_services.py b/manila_tempest_tests/tests/api/test_security_services.py
index bd78fb3..1acf07c 100644
--- a/manila_tempest_tests/tests/api/test_security_services.py
+++ b/manila_tempest_tests/tests/api/test_security_services.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from oslo_log import log  # noqa
-import six  # noqa
-from tempest import config  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from oslo_log import log
+import six
+from tempest import config
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_security_services_mapping.py b/manila_tempest_tests/tests/api/test_security_services_mapping.py
index 33d8ccb..52cbb7f 100644
--- a/manila_tempest_tests/tests/api/test_security_services_mapping.py
+++ b/manila_tempest_tests/tests/api/test_security_services_mapping.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
index 15010da..26e582b 100644
--- a/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
+++ b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
@@ -13,12 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from oslo_log import log  # noqa
-import six  # noqa
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from oslo_log import log
+import six
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_security_services_negative.py b/manila_tempest_tests/tests/api/test_security_services_negative.py
index f7966f5..1b0a4d3 100644
--- a/manila_tempest_tests/tests/api/test_security_services_negative.py
+++ b/manila_tempest_tests/tests/api/test_security_services_negative.py
@@ -13,12 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from oslo_log import log  # noqa
-import six  # noqa
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from oslo_log import log
+import six
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_share_networks.py b/manila_tempest_tests/tests/api/test_share_networks.py
index bd3698b..ef8bb01 100644
--- a/manila_tempest_tests/tests/api/test_share_networks.py
+++ b/manila_tempest_tests/tests/api/test_share_networks.py
@@ -13,10 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import six  # noqa
-from tempest import config  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+import six
+from tempest import config
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
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 f9b341c..0fb618c 100644
--- a/manila_tempest_tests/tests/api/test_share_networks_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_networks_negative.py
@@ -13,10 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
+import testtools
 
 from manila_tempest_tests.tests.api import base
 
diff --git a/manila_tempest_tests/tests/api/test_shares_negative.py b/manila_tempest_tests/tests/api/test_shares_negative.py
index 883d637..fa57ebf 100644
--- a/manila_tempest_tests/tests/api/test_shares_negative.py
+++ b/manila_tempest_tests/tests/api/test_shares_negative.py
@@ -13,10 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest import config  # noqa
-from tempest.lib import exceptions as lib_exc  # noqa
-from tempest import test  # noqa
-import testtools  # noqa
+from tempest import config
+from tempest.lib import exceptions as lib_exc
+from tempest import test
+import testtools
 
 from manila_tempest_tests import share_exceptions
 from manila_tempest_tests.tests.api import base
diff --git a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
index 261a886..a3e0e1f 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -14,11 +14,11 @@
 #    under the License.
 
 from oslo_log import log as logging
-from tempest import config  # noqa
+from tempest import config
 from tempest.lib.common.utils import data_utils
 from tempest.lib.common.utils import test_utils
 from tempest.lib import exceptions
-from tempest import test  # noqa
+from tempest import test
 
 from manila_tempest_tests.tests.api import base
 from manila_tempest_tests.tests.scenario import manager_share as manager