Fix import order to comply with import ordering rules.

Fixes pep8 failures TEMPEST N306 and N301.

Change-Id: I87d6ef4058170da73ff64d4e4a4caf43f8a18046
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