Fix import order to comply with import ordering rules.
Fixes pep8 failures TEMPEST N306 and N301.
Change-Id: I87d6ef4058170da73ff64d4e4a4caf43f8a18046
diff --git a/tempest/tests/boto/__init__.py b/tempest/tests/boto/__init__.py
index 11fa077..fdcd3cd 100644
--- a/tempest/tests/boto/__init__.py
+++ b/tempest/tests/boto/__init__.py
@@ -15,16 +15,18 @@
# License for the specific language governing permissions and limitations
# under the License.
-import tempest.config
-from tempest.common.utils.file_utils import have_effective_read_access
-import os
-import tempest.openstack
-import re
-import keystoneclient.exceptions
-import boto.exception
import logging
+import os
+import re
import urlparse
+import boto.exception
+import keystoneclient.exceptions
+
+from tempest.common.utils.file_utils import have_effective_read_access
+import tempest.config
+import tempest.openstack
+
A_I_IMAGES_READY = False # ari,ami,aki
S3_CAN_CONNECT_ERROR = "Unknown Error"
EC2_CAN_CONNECT_ERROR = "Unknown Error"
diff --git a/tempest/tests/boto/test_ec2_instance_run.py b/tempest/tests/boto/test_ec2_instance_run.py
index e5c61fb..023e3d0 100644
--- a/tempest/tests/boto/test_ec2_instance_run.py
+++ b/tempest/tests/boto/test_ec2_instance_run.py
@@ -15,21 +15,23 @@
# License for the specific language governing permissions and limitations
# under the License.
-import nose
-from nose.plugins.attrib import attr
-import unittest2 as unittest
-from tempest.testboto import BotoTestCase
-from tempest.tests.boto.utils.s3 import s3_upload_dir
-import tempest.tests.boto
-from tempest.common.utils.data_utils import rand_name
-from tempest.exceptions import EC2RegisterImageException
-from tempest.tests.boto.utils.wait import state_wait, re_search_wait
-from tempest import openstack
-from tempest.common.utils.linux.remote_client import RemoteClient
-from boto.s3.key import Key
from contextlib import closing
import logging
+from boto.s3.key import Key
+import nose
+from nose.plugins.attrib import attr
+import unittest2 as unittest
+
+from tempest.common.utils.data_utils import rand_name
+from tempest.common.utils.linux.remote_client import RemoteClient
+from tempest.exceptions import EC2RegisterImageException
+from tempest import openstack
+from tempest.testboto import BotoTestCase
+import tempest.tests.boto
+from tempest.tests.boto.utils.s3 import s3_upload_dir
+from tempest.tests.boto.utils.wait import re_search_wait
+from tempest.tests.boto.utils.wait import state_wait
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_ec2_keys.py b/tempest/tests/boto/test_ec2_keys.py
index 79d0b2b..b9e5508 100644
--- a/tempest/tests/boto/test_ec2_keys.py
+++ b/tempest/tests/boto/test_ec2_keys.py
@@ -15,12 +15,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.testboto import BotoTestCase
+
from tempest.common.utils.data_utils import rand_name
from tempest import openstack
+from tempest.testboto import BotoTestCase
def compare_key_pairs(a, b):
diff --git a/tempest/tests/boto/test_ec2_network.py b/tempest/tests/boto/test_ec2_network.py
index accf677..c67b3aa 100644
--- a/tempest/tests/boto/test_ec2_network.py
+++ b/tempest/tests/boto/test_ec2_network.py
@@ -17,8 +17,9 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.testboto import BotoTestCase
+
from tempest import openstack
+from tempest.testboto import BotoTestCase
@attr("EC2")
diff --git a/tempest/tests/boto/test_ec2_security_groups.py b/tempest/tests/boto/test_ec2_security_groups.py
index 3d50e8b..72e8267 100644
--- a/tempest/tests/boto/test_ec2_security_groups.py
+++ b/tempest/tests/boto/test_ec2_security_groups.py
@@ -17,9 +17,10 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.testboto import BotoTestCase
+
from tempest.common.utils.data_utils import rand_name
from tempest import openstack
+from tempest.testboto import BotoTestCase
@attr("EC2")
diff --git a/tempest/tests/boto/test_ec2_volumes.py b/tempest/tests/boto/test_ec2_volumes.py
index 8b7e6be..8d16206 100644
--- a/tempest/tests/boto/test_ec2_volumes.py
+++ b/tempest/tests/boto/test_ec2_volumes.py
@@ -15,14 +15,15 @@
# License for the specific language governing permissions and limitations
# under the License.
-
-from nose.plugins.attrib import attr
-from tempest.testboto import BotoTestCase
-from tempest import openstack
-import unittest2 as unittest
import logging
import time
+from nose.plugins.attrib import attr
+import unittest2 as unittest
+
+from tempest import openstack
+from tempest.testboto import BotoTestCase
+
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_s3_buckets.py b/tempest/tests/boto/test_s3_buckets.py
index 56cf52c..ce4b210 100644
--- a/tempest/tests/boto/test_s3_buckets.py
+++ b/tempest/tests/boto/test_s3_buckets.py
@@ -17,9 +17,10 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.testboto import BotoTestCase
+
from tempest.common.utils.data_utils import rand_name
from tempest import openstack
+from tempest.testboto import BotoTestCase
@attr("S3")
diff --git a/tempest/tests/boto/test_s3_ec2_images.py b/tempest/tests/boto/test_s3_ec2_images.py
index eeb7039..4990be6 100644
--- a/tempest/tests/boto/test_s3_ec2_images.py
+++ b/tempest/tests/boto/test_s3_ec2_images.py
@@ -15,19 +15,21 @@
# License for the specific language governing permissions and limitations
# under the License.
+from contextlib import closing
+import logging
+import os
+
+from boto.s3.key import Key
+import nose
from nose.plugins.attrib import attr
import unittest2 as unittest
+
+from tempest.common.utils.data_utils import rand_name
from tempest import openstack
from tempest.testboto import BotoTestCase
import tempest.tests.boto
-from tempest.tests.boto.utils.wait import state_wait
from tempest.tests.boto.utils.s3 import s3_upload_dir
-from tempest.common.utils.data_utils import rand_name
-from contextlib import closing
-from boto.s3.key import Key
-import logging
-import nose
-import os
+from tempest.tests.boto.utils.wait import state_wait
@attr("S3", "EC2")
diff --git a/tempest/tests/boto/test_s3_objects.py b/tempest/tests/boto/test_s3_objects.py
index c31ad6e..cfb1ad5 100644
--- a/tempest/tests/boto/test_s3_objects.py
+++ b/tempest/tests/boto/test_s3_objects.py
@@ -15,14 +15,16 @@
# License for the specific language governing permissions and limitations
# under the License.
+from contextlib import closing
+
+from boto.s3.key import Key
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.testboto import BotoTestCase
+
from tempest.common.utils.data_utils import rand_name
from tempest import openstack
+from tempest.testboto import BotoTestCase
from tempest.tests import boto
-from boto.s3.key import Key
-from contextlib import closing
@attr("S3")
diff --git a/tempest/tests/boto/utils/s3.py b/tempest/tests/boto/utils/s3.py
index 70d9263..4c3229b 100644
--- a/tempest/tests/boto/utils/s3.py
+++ b/tempest/tests/boto/utils/s3.py
@@ -15,13 +15,13 @@
# License for the specific language governing permissions and limitations
# under the License.
-import boto
-from boto.s3.key import Key
from contextlib import closing
+import logging
import os
import re
-import logging
+import boto
+from boto.s3.key import Key
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/utils/wait.py b/tempest/tests/boto/utils/wait.py
index 38b6ba1..951b5bf 100644
--- a/tempest/tests/boto/utils/wait.py
+++ b/tempest/tests/boto/utils/wait.py
@@ -15,12 +15,14 @@
# License for the specific language governing permissions and limitations
# under the License.
-import tempest.config
-import time
-from unittest2 import TestCase
import logging
import re
+import time
+
from boto.exception import BotoServerError
+from unittest2 import TestCase
+
+import tempest.config
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index dc9248d..e5de0cb 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -19,8 +19,8 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest.tests.compute import base
from tempest.tests import compute
+from tempest.tests.compute import base
class FlavorsAdminTestBase(object):
diff --git a/tempest/tests/compute/admin/test_quotas.py b/tempest/tests/compute/admin/test_quotas.py
index 98ca169..75684a0 100644
--- a/tempest/tests/compute/admin/test_quotas.py
+++ b/tempest/tests/compute/admin/test_quotas.py
@@ -17,9 +17,9 @@
from nose.plugins.attrib import attr
-from tempest.tests.compute.base import BaseComputeTest
-from tempest.services.compute.admin.json import quotas_client as adm_quotas
from tempest import exceptions
+from tempest.services.compute.admin.json import quotas_client as adm_quotas
+from tempest.tests.compute.base import BaseComputeTest
class QuotasTest(BaseComputeTest):
diff --git a/tempest/tests/compute/base.py b/tempest/tests/compute/base.py
index bb2ff8b..eb8b443 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/tests/compute/base.py
@@ -18,13 +18,13 @@
import logging
import time
-import unittest2 as unittest
import nose
+import unittest2 as unittest
+from tempest.common.utils.data_utils import rand_name
from tempest import config
from tempest import exceptions
from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
__all__ = ['BaseComputeTest', 'BaseComputeTestJSON', 'BaseComputeTestXML',
'BaseComputeAdminTestJSON', 'BaseComputeAdminTestXML']
diff --git a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
index 7d30eeb..c988e06 100644
--- a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
@@ -18,9 +18,9 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import openstack
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
+from tempest import openstack
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/floating_ips/test_list_floating_ips.py b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
index 34d7369..6f74f74 100644
--- a/tempest/tests/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/images/test_images.py b/tempest/tests/compute/images/test_images.py
index 5937811..b048c58 100644
--- a/tempest/tests/compute/images/test_images.py
+++ b/tempest/tests/compute/images/test_images.py
@@ -15,16 +15,17 @@
# License for the specific language governing permissions and limitations
# under the License.
+import nose
from nose.plugins.attrib import attr
import unittest2 as unittest
-import nose
-from tempest.common.utils.data_utils import rand_name, parse_image_id
+from tempest.common.utils.data_utils import parse_image_id
+from tempest.common.utils.data_utils import rand_name
import tempest.config
from tempest import exceptions
from tempest import openstack
-from tempest.tests.compute import base
from tempest.tests import compute
+from tempest.tests.compute import base
class ImagesTestBase(object):
diff --git a/tempest/tests/compute/images/test_list_image_filters.py b/tempest/tests/compute/images/test_list_image_filters.py
index b6be358..c27d381 100644
--- a/tempest/tests/compute/images/test_list_image_filters.py
+++ b/tempest/tests/compute/images/test_list_image_filters.py
@@ -17,8 +17,9 @@
from nose.plugins.attrib import attr
+from tempest.common.utils.data_utils import parse_image_id
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
-from tempest.common.utils.data_utils import rand_name, parse_image_id
from tempest.tests.compute.base import BaseComputeTest
diff --git a/tempest/tests/compute/images/test_list_images.py b/tempest/tests/compute/images/test_list_images.py
index ca8ec18..838c3a3 100644
--- a/tempest/tests/compute/images/test_list_images.py
+++ b/tempest/tests/compute/images/test_list_images.py
@@ -17,8 +17,9 @@
from nose.plugins.attrib import attr
+from tempest.common.utils.data_utils import parse_image_id
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
-from tempest.common.utils.data_utils import rand_name, parse_image_id
from tempest.tests.compute.base import BaseComputeTest
diff --git a/tempest/tests/compute/keypairs/test_keypairs.py b/tempest/tests/compute/keypairs/test_keypairs.py
index 9d297f6..43ad076 100644
--- a/tempest/tests/compute/keypairs/test_keypairs.py
+++ b/tempest/tests/compute/keypairs/test_keypairs.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute.base import BaseComputeTestJSON
from tempest.tests.compute.base import BaseComputeTestXML
diff --git a/tempest/tests/compute/security_groups/test_security_group_rules.py b/tempest/tests/compute/security_groups/test_security_group_rules.py
index ea23cf5..ab5af92 100644
--- a/tempest/tests/compute/security_groups/test_security_group_rules.py
+++ b/tempest/tests/compute/security_groups/test_security_group_rules.py
@@ -17,8 +17,8 @@
from nose.plugins.attrib import attr
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/security_groups/test_security_groups.py b/tempest/tests/compute/security_groups/test_security_groups.py
index 81e84ce..1c0cc94 100644
--- a/tempest/tests/compute/security_groups/test_security_groups.py
+++ b/tempest/tests/compute/security_groups/test_security_groups.py
@@ -17,8 +17,8 @@
from nose.plugins.attrib import attr
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/servers/test_console_output.py b/tempest/tests/compute/servers/test_console_output.py
index b08dcc2..e88aac9 100644
--- a/tempest/tests/compute/servers/test_console_output.py
+++ b/tempest/tests/compute/servers/test_console_output.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute.base import BaseComputeTest
diff --git a/tempest/tests/compute/servers/test_create_server.py b/tempest/tests/compute/servers/test_create_server.py
index 461f5e4..8964fc2 100644
--- a/tempest/tests/compute/servers/test_create_server.py
+++ b/tempest/tests/compute/servers/test_create_server.py
@@ -20,11 +20,12 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-import tempest.config
+
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
-from tempest.tests.compute import base
+import tempest.config
from tempest.tests import compute
+from tempest.tests.compute import base
class ServersTest(object):
diff --git a/tempest/tests/compute/servers/test_disk_config.py b/tempest/tests/compute/servers/test_disk_config.py
index 1273fe4..638e093 100644
--- a/tempest/tests/compute/servers/test_disk_config.py
+++ b/tempest/tests/compute/servers/test_disk_config.py
@@ -19,10 +19,10 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest import exceptions
from tempest.tests import compute
+from tempest.tests.compute.base import BaseComputeTest
class TestServerDiskConfig(BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_list_server_filters.py b/tempest/tests/compute/servers/test_list_server_filters.py
index 5e4b267..3aeb8e8 100644
--- a/tempest/tests/compute/servers/test_list_server_filters.py
+++ b/tempest/tests/compute/servers/test_list_server_filters.py
@@ -15,15 +15,16 @@
# License for the specific language governing permissions and limitations
# under the License.
-import nose.plugins.skip
+
+import nose
from nose.plugins.attrib import attr
+import nose.plugins.skip
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
from tempest.tests import utils
-import nose
class ListServerFiltersTest(object):
diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/tests/compute/servers/test_list_servers_negative.py
index b2d053d..f891c49 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/tests/compute/servers/test_list_servers_negative.py
@@ -18,14 +18,14 @@
import re
import sys
-import unittest2 as unittest
import nose
+import unittest2 as unittest
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
from tempest.tests import compute
+from tempest.tests.compute.base import BaseComputeTest
class ListServersNegativeTest(BaseComputeTest):
diff --git a/tempest/tests/compute/servers/test_server_actions.py b/tempest/tests/compute/servers/test_server_actions.py
index dd6b02f..835afb0 100644
--- a/tempest/tests/compute/servers/test_server_actions.py
+++ b/tempest/tests/compute/servers/test_server_actions.py
@@ -21,12 +21,12 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-import tempest.config
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
-from tempest.tests.compute import base
+import tempest.config
+from tempest import exceptions
from tempest.tests import compute
+from tempest.tests.compute import base
class ServerActionsTestBase(object):
diff --git a/tempest/tests/compute/servers/test_server_addresses.py b/tempest/tests/compute/servers/test_server_addresses.py
index 164548d..745a9d8 100644
--- a/tempest/tests/compute/servers/test_server_addresses.py
+++ b/tempest/tests/compute/servers/test_server_addresses.py
@@ -17,8 +17,8 @@
from nose.plugins.attrib import attr
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute.base import BaseComputeTest
diff --git a/tempest/tests/compute/servers/test_server_personality.py b/tempest/tests/compute/servers/test_server_personality.py
index 75457d1..3003a52 100644
--- a/tempest/tests/compute/servers/test_server_personality.py
+++ b/tempest/tests/compute/servers/test_server_personality.py
@@ -19,8 +19,8 @@
from nose.plugins.attrib import attr
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/servers/test_servers_negative.py b/tempest/tests/compute/servers/test_servers_negative.py
index fb88d1e..60f3daf 100644
--- a/tempest/tests/compute/servers/test_servers_negative.py
+++ b/tempest/tests/compute/servers/test_servers_negative.py
@@ -17,13 +17,13 @@
import sys
+import nose
from nose.plugins.attrib import attr
import unittest2 as unittest
-import nose
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
from tempest.tests.compute.base import BaseComputeTest
diff --git a/tempest/tests/compute/servers/test_servers_whitebox.py b/tempest/tests/compute/servers/test_servers_whitebox.py
index 980f6cf..b3665dd 100644
--- a/tempest/tests/compute/servers/test_servers_whitebox.py
+++ b/tempest/tests/compute/servers/test_servers_whitebox.py
@@ -15,12 +15,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest import exceptions
-from tempest import whitebox
-from tempest.tests.identity.base import BaseIdentityAdminTest
+import nose
from nose.plugins.attrib import attr
-import nose
+from tempest import exceptions
+from tempest.tests.identity.base import BaseIdentityAdminTest
+from tempest import whitebox
@attr(type='whitebox')
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/tests/compute/test_authorization.py
index 0d08c18..beff07f 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -16,15 +16,16 @@
# under the License.
from nose.plugins.attrib import attr
-from nose.tools import raises
from nose import SkipTest
+from nose.tools import raises
import unittest2 as unittest
-from tempest import openstack
-from tempest.common.utils.data_utils import rand_name, parse_image_id
+from tempest.common.utils.data_utils import parse_image_id
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
-from tempest.tests.compute.base import BaseComputeTest
+from tempest import openstack
from tempest.tests import compute
+from tempest.tests.compute.base import BaseComputeTest
class AuthorizationTest(BaseComputeTest):
diff --git a/tempest/tests/compute/test_live_block_migration.py b/tempest/tests/compute/test_live_block_migration.py
index 92c2cf6..48d374f 100644
--- a/tempest/tests/compute/test_live_block_migration.py
+++ b/tempest/tests/compute/test_live_block_migration.py
@@ -15,19 +15,19 @@
# License for the specific language governing permissions and limitations
# under the License.
-import nose
-import unittest2 as unittest
-from nose.plugins.attrib import attr
import random
import string
-from tempest.tests.compute import base
+import nose
+from nose.plugins.attrib import attr
+import unittest2 as unittest
+
from tempest.common.utils.linux.remote_client import RemoteClient
from tempest import config
from tempest import exceptions
-
from tempest.services.compute.json.hosts_client import HostsClientJSON
from tempest.services.compute.json.servers_client import ServersClientJSON
+from tempest.tests.compute import base
@attr(category='live-migration')
diff --git a/tempest/tests/compute/volumes/test_attach_volume.py b/tempest/tests/compute/volumes/test_attach_volume.py
index cb695c1..b95a9fd 100644
--- a/tempest/tests/compute/volumes/test_attach_volume.py
+++ b/tempest/tests/compute/volumes/test_attach_volume.py
@@ -18,9 +18,9 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-import tempest.config
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
+import tempest.config
from tempest import openstack
from tempest.tests.compute import base
diff --git a/tempest/tests/compute/volumes/test_volumes_negative.py b/tempest/tests/compute/volumes/test_volumes_negative.py
index fa14640..6994ab1 100644
--- a/tempest/tests/compute/volumes/test_volumes_negative.py
+++ b/tempest/tests/compute/volumes/test_volumes_negative.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
from nose.tools import raises
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.compute import base
diff --git a/tempest/tests/identity/admin/test_roles.py b/tempest/tests/identity/admin/test_roles.py
index 637cee5..0e1da7d 100644
--- a/tempest/tests/identity/admin/test_roles.py
+++ b/tempest/tests/identity/admin/test_roles.py
@@ -17,8 +17,8 @@
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.identity import base
diff --git a/tempest/tests/identity/admin/test_services.py b/tempest/tests/identity/admin/test_services.py
index da697ab..6baa7c2 100644
--- a/tempest/tests/identity/admin/test_services.py
+++ b/tempest/tests/identity/admin/test_services.py
@@ -17,8 +17,8 @@
import nose
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.identity import base
diff --git a/tempest/tests/identity/admin/test_tenants.py b/tempest/tests/identity/admin/test_tenants.py
index 1b4ec18..226aae6 100644
--- a/tempest/tests/identity/admin/test_tenants.py
+++ b/tempest/tests/identity/admin/test_tenants.py
@@ -17,8 +17,8 @@
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.identity import base
diff --git a/tempest/tests/identity/admin/test_users.py b/tempest/tests/identity/admin/test_users.py
index a724ce9..e2938bd 100644
--- a/tempest/tests/identity/admin/test_users.py
+++ b/tempest/tests/identity/admin/test_users.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
import unittest2 as unittest
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.identity import base
diff --git a/tempest/tests/network/base.py b/tempest/tests/network/base.py
index 887056e..78a69f8 100644
--- a/tempest/tests/network/base.py
+++ b/tempest/tests/network/base.py
@@ -18,9 +18,9 @@
import nose
import unittest2 as unittest
+from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
from tempest import openstack
-from tempest.common.utils.data_utils import rand_name
class BaseNetworkTest(unittest.TestCase):
diff --git a/tempest/tests/object_storage/test_container_services.py b/tempest/tests/object_storage/test_container_services.py
index e57256b..b99859e 100644
--- a/tempest/tests/object_storage/test_container_services.py
+++ b/tempest/tests/object_storage/test_container_services.py
@@ -16,7 +16,9 @@
# under the License.
from nose.plugins.attrib import attr
-from tempest.common.utils.data_utils import rand_name, arbitrary_string
+
+from tempest.common.utils.data_utils import arbitrary_string
+from tempest.common.utils.data_utils import rand_name
from tempest.tests.object_storage import base
diff --git a/tempest/tests/object_storage/test_object_services.py b/tempest/tests/object_storage/test_object_services.py
index 97b7e0d..3be2bee 100644
--- a/tempest/tests/object_storage/test_object_services.py
+++ b/tempest/tests/object_storage/test_object_services.py
@@ -16,7 +16,9 @@
# under the License.
from nose.plugins.attrib import attr
-from tempest.common.utils.data_utils import rand_name, arbitrary_string
+
+from tempest.common.utils.data_utils import arbitrary_string
+from tempest.common.utils.data_utils import rand_name
from tempest.tests.object_storage import base
diff --git a/tempest/tests/volume/base.py b/tempest/tests/volume/base.py
index 6af4bbf..f28be7d 100644
--- a/tempest/tests/volume/base.py
+++ b/tempest/tests/volume/base.py
@@ -17,14 +17,14 @@
import logging
import time
-import nose
+import nose
import unittest2 as unittest
-from tempest import config
-from tempest import openstack
from tempest.common.utils.data_utils import rand_name
+from tempest import config
from tempest import exceptions
+from tempest import openstack
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/volume/test_volumes_negative.py b/tempest/tests/volume/test_volumes_negative.py
index bf7e5f0..2c8b006 100644
--- a/tempest/tests/volume/test_volumes_negative.py
+++ b/tempest/tests/volume/test_volumes_negative.py
@@ -18,8 +18,8 @@
from nose.plugins.attrib import attr
from nose.tools import raises
-from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
+from tempest import exceptions
from tempest.tests.volume import base