From 822e5689218042ee0179b02e19ae24ae858aab8c Mon Sep 17 00:00:00 2001 From: Jay Lau Date: Fri, 25 Apr 2014 17:29:10 +0800 Subject: [PATCH] Adjust import order according to PEP8 imports rule This patch just adjust import order to follow PEP8 imports rule. See http://www.python.org/dev/peps/pep-0008/#imports Imports should be grouped in the following order: 1) Standard library imports 2) Related third party imports 3) Local application/library specific imports Change-Id: Ifb56bbe6ba1ed7682c3326d6429fb34d268e7ea4 --- climate/manager/service.py | 2 +- climate/notification/notifier.py | 3 ++- climate/plugins/instances/vm_plugin.py | 2 +- climate/plugins/oshosts/host_plugin.py | 1 - climate/plugins/oshosts/nova_inventory.py | 3 +-- climate/policy.py | 1 + 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/climate/manager/service.py b/climate/manager/service.py index 734dfd53..0293e39a 100644 --- a/climate/manager/service.py +++ b/climate/manager/service.py @@ -14,9 +14,9 @@ # limitations under the License. import datetime -import eventlet import six +import eventlet from oslo.config import cfg from stevedore import enabled diff --git a/climate/notification/notifier.py b/climate/notification/notifier.py index 8690b24a..e03241a4 100644 --- a/climate/notification/notifier.py +++ b/climate/notification/notifier.py @@ -13,10 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -from climate.openstack.common import log from oslo.config import cfg from oslo import messaging +from climate.openstack.common import log + notification_opts = [ cfg.StrOpt('publisher_id', default="climate.lease", diff --git a/climate/plugins/instances/vm_plugin.py b/climate/plugins/instances/vm_plugin.py index 28a65505..46caef6d 100644 --- a/climate/plugins/instances/vm_plugin.py +++ b/climate/plugins/instances/vm_plugin.py @@ -14,6 +14,7 @@ # limitations under the License. import eventlet +from novaclient import exceptions as nova_exceptions from oslo.config import cfg from climate import exceptions as climate_exceptions @@ -21,7 +22,6 @@ from climate.openstack.common import log as logging from climate.plugins import base from climate.plugins import instances as plugin from climate.utils.openstack import nova -from novaclient import exceptions as nova_exceptions LOG = logging.getLogger(__name__) diff --git a/climate/plugins/oshosts/host_plugin.py b/climate/plugins/oshosts/host_plugin.py index 6d0340cc..0803d5f4 100644 --- a/climate/plugins/oshosts/host_plugin.py +++ b/climate/plugins/oshosts/host_plugin.py @@ -22,7 +22,6 @@ import uuid from oslo.config import cfg from climate import context - from climate.db import api as db_api from climate.db import exceptions as db_ex from climate.db import utils as db_utils diff --git a/climate/plugins/oshosts/nova_inventory.py b/climate/plugins/oshosts/nova_inventory.py index 30ec5de7..4304506d 100644 --- a/climate/plugins/oshosts/nova_inventory.py +++ b/climate/plugins/oshosts/nova_inventory.py @@ -13,9 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from oslo.config import cfg - from novaclient import exceptions as nova_exceptions +from oslo.config import cfg from climate import context from climate.manager import exceptions as manager_exceptions diff --git a/climate/policy.py b/climate/policy.py index 794a7d3c..64f4c9c6 100644 --- a/climate/policy.py +++ b/climate/policy.py @@ -16,6 +16,7 @@ """Policy Engine For Climate.""" import functools + from oslo.config import cfg from climate import context