Add flake8-import-order extension to tox.ini
This package adds 3 new flake8 warnings
* ``I100``: Your import statements are in the wrong order.
* ``I101``: The names in your from import are in the wrong order.
* ``I201``: Missing newline between sections or imports.
Change-Id: I4feabcd4db583d213e0e4d414eee267b0ddb8870
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 c6e21d7..686ae14 100644
--- a/manila_tempest_tests/tests/api/admin/test_admin_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_admin_actions.py
@@ -14,11 +14,11 @@
# under the License.
import ddt
+from tempest import config
import testtools
+from testtools import testcase as tc
from manila_tempest_tests.tests.api import base
-from tempest import config
-from testtools import testcase as tc
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/admin/test_quotas_negative.py b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
index e039045..b928d2b 100644
--- a/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
@@ -14,13 +14,14 @@
# under the License.
import ddt
-import manila_tempest_tests.tests.api.test_replication_negative as rep_neg_test
from tempest import config
from tempest.lib import exceptions as lib_exc
import testtools
from testtools import testcase as tc
from manila_tempest_tests.tests.api import base
+from manila_tempest_tests.tests.api import test_replication_negative as \
+ rep_neg_test
from manila_tempest_tests import utils
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/admin/test_share_group_types.py b/manila_tempest_tests/tests/api/admin/test_share_group_types.py
index d05c079..d6dcc72 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_group_types.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_group_types.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import ddt
import itertools
+
+import ddt
from tempest import config
from tempest.lib.common.utils import data_utils
from testtools import testcase as tc
@@ -23,6 +24,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
LATEST_MICROVERSION = CONF.share.max_api_microversion
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 f5fd840..a234adf 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py
@@ -16,13 +16,13 @@
import ddt
from tempest import config
from tempest.lib.common.utils import data_utils
-
from testtools import testcase as tc
from manila_tempest_tests.common import constants
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
index 5c57aa9..85fa059 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
@@ -17,13 +17,13 @@
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions as lib_exc
-
from testtools import testcase as tc
from manila_tempest_tests.common import constants
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 8b01cef..717228c 100755
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -19,7 +19,6 @@
from oslo_log import log
import six
-
from tempest import config
from tempest.lib.common import cred_client
from tempest.lib.common.utils import data_utils
@@ -31,6 +30,7 @@
from manila_tempest_tests import share_exceptions
from manila_tempest_tests import utils
+
CONF = config.CONF
LOG = log.getLogger(__name__)
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index 97780ad..f3e1280 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -13,13 +13,15 @@
# License for the specific language governing permissions and limitations
# under the License.
-import ddt
import itertools
-from manila_tempest_tests import utils
+
+import ddt
from tempest import config
from testtools import testcase as tc
from manila_tempest_tests.tests.api import base
+from manila_tempest_tests import utils
+
CONF = config.CONF
PRE_SHARE_REPLICAS_MICROVERSION = "2.52"
diff --git a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
index ea9e5dd..d4e7fa5 100644
--- a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
+++ b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
@@ -14,7 +14,6 @@
# under the License.
import ddt
-
from tempest import config
from tempest.lib.common.utils import data_utils
from testtools import testcase as tc
@@ -24,6 +23,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/test_revert_to_snapshot_negative.py b/manila_tempest_tests/tests/api/test_revert_to_snapshot_negative.py
index 34b0530..1b2f49d 100644
--- a/manila_tempest_tests/tests/api/test_revert_to_snapshot_negative.py
+++ b/manila_tempest_tests/tests/api/test_revert_to_snapshot_negative.py
@@ -14,7 +14,6 @@
# under the License.
import ddt
-
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions
@@ -24,6 +23,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/test_rules.py b/manila_tempest_tests/tests/api/test_rules.py
index 337eca8..dd7ccc9 100644
--- a/manila_tempest_tests/tests/api/test_rules.py
+++ b/manila_tempest_tests/tests/api/test_rules.py
@@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
+import itertools
import ddt
-import itertools
from tempest import config
from tempest.lib import exceptions as lib_exc
import testtools
@@ -24,6 +24,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
LATEST_MICROVERSION = CONF.share.max_api_microversion
diff --git a/manila_tempest_tests/tests/api/test_share_groups_negative.py b/manila_tempest_tests/tests/api/test_share_groups_negative.py
index a0a6b4b..9a2d18c 100644
--- a/manila_tempest_tests/tests/api/test_share_groups_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_groups_negative.py
@@ -16,13 +16,13 @@
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions as lib_exc
-
from testtools import testcase as tc
from manila_tempest_tests.common import constants
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py b/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
index 4836e74..cfc3f5c 100644
--- a/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
@@ -14,7 +14,6 @@
# under the License.
import ddt
-
from tempest import config
from tempest.lib import exceptions as lib_exc
import testtools
@@ -24,6 +23,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/api/test_share_types_negative.py b/manila_tempest_tests/tests/api/test_share_types_negative.py
index 7ba6f86..7cdfbbf 100644
--- a/manila_tempest_tests/tests/api/test_share_types_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_types_negative.py
@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import ddt
import random
+
+import ddt
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions as lib_exc
@@ -22,6 +23,7 @@
from manila_tempest_tests.tests.api import base
+
CONF = config.CONF
LATEST_MICROVERSION = CONF.share.max_api_microversion
diff --git a/manila_tempest_tests/tests/api/test_snapshot_rules.py b/manila_tempest_tests/tests/api/test_snapshot_rules.py
index 0323916..309996c 100644
--- a/manila_tempest_tests/tests/api/test_snapshot_rules.py
+++ b/manila_tempest_tests/tests/api/test_snapshot_rules.py
@@ -13,15 +13,15 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
-
import ddt
+import six
from tempest import config
from testtools import testcase as tc
from manila_tempest_tests.tests.api import base
from manila_tempest_tests import utils
+
CONF = config.CONF
diff --git a/manila_tempest_tests/tests/scenario/manager.py b/manila_tempest_tests/tests/scenario/manager.py
index c83dfe6..1fa03f4 100644
--- a/manila_tempest_tests/tests/scenario/manager.py
+++ b/manila_tempest_tests/tests/scenario/manager.py
@@ -21,7 +21,6 @@
from oslo_utils import netutils
from oslo_utils import uuidutils
import six
-
from tempest.common import compute
from tempest.common import image as common_image
from tempest.common.utils.linux import remote_client
@@ -32,14 +31,14 @@
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions as lib_exc
-import tempest.test
+from tempest import test
CONF = config.CONF
LOG = log.getLogger(__name__)
-class ScenarioTest(tempest.test.BaseTestCase):
+class ScenarioTest(test.BaseTestCase):
"""Base class for scenario tests. Uses tempest own clients. """
credentials = ['primary']
diff --git a/manila_tempest_tests/tests/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py
index 10074b1..62f851c 100644
--- a/manila_tempest_tests/tests/scenario/manager_share.py
+++ b/manila_tempest_tests/tests/scenario/manager_share.py
@@ -13,9 +13,15 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempfile import mkstemp
+
from oslo_log import log
import six
from six.moves.urllib.request import urlopen
+from tempest.common import waiters
+from tempest import config
+from tempest.lib.common.utils import data_utils
+from tempest.lib import exceptions
from manila_tempest_tests.common import constants
from manila_tempest_tests.common import remote_client
@@ -23,12 +29,6 @@
from manila_tempest_tests.tests.scenario import manager
from manila_tempest_tests import utils
-from tempest.common import waiters
-from tempest import config
-from tempest.lib.common.utils import data_utils
-from tempest.lib import exceptions
-
-from tempfile import mkstemp
CONF = config.CONF
LOG = log.getLogger(__name__)
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 ef73919..3cdc3ae 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -14,7 +14,6 @@
# under the License.
import ddt
-
from oslo_log import log as logging
from tempest import config
from tempest.lib import exceptions
@@ -26,6 +25,7 @@
from manila_tempest_tests.tests.scenario import manager_share as manager
from manila_tempest_tests import utils
+
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/manila_tempest_tests/tests/scenario/test_share_extend.py b/manila_tempest_tests/tests/scenario/test_share_extend.py
index e0a1e4a..823e3c9 100644
--- a/manila_tempest_tests/tests/scenario/test_share_extend.py
+++ b/manila_tempest_tests/tests/scenario/test_share_extend.py
@@ -11,10 +11,9 @@
# under the License.
import ddt
-import six
-
from oslo_log import log as logging
from oslo_utils import units
+import six
from tempest import config
from tempest.lib import exceptions
from testtools import testcase as tc
@@ -23,6 +22,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests.tests.scenario import manager_share as manager
+
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py b/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
index d58378c..1005740 100644
--- a/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
+++ b/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
@@ -11,7 +11,6 @@
# under the License.
import ddt
-
from oslo_log import log as logging
from tempest import config
from tempest.lib import exceptions
@@ -22,6 +21,7 @@
from manila_tempest_tests.tests.scenario import manager_share as manager
from manila_tempest_tests import utils
+
CONF = config.CONF
LOG = logging.getLogger(__name__)
diff --git a/manila_tempest_tests/tests/scenario/test_share_shrink.py b/manila_tempest_tests/tests/scenario/test_share_shrink.py
index 785c6ce..1d0e028 100644
--- a/manila_tempest_tests/tests/scenario/test_share_shrink.py
+++ b/manila_tempest_tests/tests/scenario/test_share_shrink.py
@@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-import six
import time
from oslo_log import log as logging
+import six
from tempest import config
from tempest.lib import exceptions
import testtools
@@ -23,6 +23,7 @@
from manila_tempest_tests.tests.api import base
from manila_tempest_tests.tests.scenario import manager_share as manager
+
CONF = config.CONF
LOG = logging.getLogger(__name__)