Import order clean-up
Reorder imports by full module path Change-Id: I50bc2a5ff6cea939049fed8066471b15e84adbe6
This commit is contained in:
parent
1be1394c20
commit
d2cdb6d093
13
HACKING.rst
13
HACKING.rst
@ -30,6 +30,19 @@ Imports
|
||||
-------
|
||||
- Do not make relative imports
|
||||
- Order your imports by the full module path
|
||||
|
||||
Example::
|
||||
|
||||
The following imports,
|
||||
|
||||
from quantum.api import networks
|
||||
from quantum import wsgi
|
||||
|
||||
are considered equivalent for ordering purposes to
|
||||
|
||||
import quantum.api.networks
|
||||
import quantum.wsgi
|
||||
|
||||
- Organize your imports according to the following template
|
||||
|
||||
Example::
|
||||
|
@ -24,11 +24,11 @@ import uuid
|
||||
import eventlet
|
||||
import netaddr
|
||||
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.linux import dhcp
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import exceptions
|
||||
from quantum.common import topics
|
||||
|
@ -18,10 +18,10 @@ import eventlet
|
||||
from quantum.common import topics
|
||||
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.openstack.common.notifier import api
|
||||
from quantum.openstack.common.notifier import rabbit_notifier
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -18,9 +18,9 @@ import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from quantum import context
|
||||
from quantum import wsgi
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum import wsgi
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
from sqlalchemy.orm import exc
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum import context as quantum_context
|
||||
from quantum import manager
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import log as logging
|
||||
|
||||
|
@ -25,11 +25,11 @@ from sqlalchemy.orm import exc
|
||||
from sqlalchemy.orm import scoped_session
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.common import utils
|
||||
from quantum.db import model_base
|
||||
from quantum.db import models_v2
|
||||
from quantum.extensions import securitygroup as ext_sg
|
||||
from quantum.openstack.common import cfg
|
||||
|
||||
|
||||
class SecurityGroup(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):
|
||||
|
@ -20,8 +20,8 @@ import logging
|
||||
from cliff import lister
|
||||
|
||||
from quantumclient.common import utils
|
||||
from quantumclient.quantum.v2_0 import QuantumCommand
|
||||
from quantumclient.quantum.v2_0.port import _format_fixed_ips
|
||||
from quantumclient.quantum.v2_0 import QuantumCommand
|
||||
|
||||
|
||||
class ProbeCommand(QuantumCommand):
|
||||
|
@ -19,9 +19,9 @@ import webob
|
||||
|
||||
from quantum.api.v2 import base
|
||||
from quantum.common import exceptions
|
||||
from quantum.extensions import extensions
|
||||
from quantum.extensions import _quotav2_driver as quotav2_driver
|
||||
from quantum.extensions import _quotav2_model as quotav2_model
|
||||
from quantum.extensions import extensions
|
||||
from quantum.manager import QuantumManager
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum import quota
|
||||
|
@ -31,9 +31,9 @@ import kombu.messaging
|
||||
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common.gettextutils import _
|
||||
from quantum.openstack.common import network_utils
|
||||
from quantum.openstack.common.rpc import amqp as rpc_amqp
|
||||
from quantum.openstack.common.rpc import common as rpc_common
|
||||
from quantum.openstack.common import network_utils
|
||||
|
||||
kombu_opts = [
|
||||
cfg.StrOpt('kombu_ssl_version',
|
||||
|
@ -25,8 +25,8 @@ from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.db import models_v2
|
||||
from quantum.extensions import providernet as provider
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import dispatcher
|
||||
|
@ -22,9 +22,9 @@
|
||||
# @author: Ryota MIBU
|
||||
|
||||
import logging
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import socket
|
||||
|
||||
from quantum.agent.linux import ovs_lib
|
||||
from quantum.common import config as logging_config
|
||||
|
@ -19,8 +19,8 @@ from quantum.api.v2 import attributes
|
||||
from quantum.api.v2 import base
|
||||
from quantum.extensions import extensions
|
||||
from quantum.manager import QuantumManager
|
||||
from quantum import quota
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum import quota
|
||||
|
||||
|
||||
quota_packet_filter_opts = [
|
||||
|
@ -17,17 +17,17 @@
|
||||
|
||||
import logging
|
||||
|
||||
from quantum import context
|
||||
from quantum.common import topics
|
||||
from quantum import context
|
||||
from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import dispatcher
|
||||
from quantum.plugins.nec import ofc_manager
|
||||
from quantum.plugins.nec.common import config
|
||||
from quantum.plugins.nec.common import exceptions as nexc
|
||||
from quantum.plugins.nec.db import api as ndb
|
||||
from quantum.plugins.nec.db import nec_plugin_base
|
||||
from quantum.plugins.nec import ofc_manager
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -15,11 +15,11 @@
|
||||
# under the License.
|
||||
# @author: Ryota MIBU
|
||||
|
||||
from quantum.plugins.nec import drivers
|
||||
from quantum.plugins.nec.common import config
|
||||
from quantum.plugins.nec.common import exceptions as nexc
|
||||
from quantum.plugins.nec.db import api as ndb
|
||||
from quantum.plugins.nec.db import models as nmodels
|
||||
from quantum.plugins.nec import drivers
|
||||
|
||||
|
||||
class OFCManager(object):
|
||||
|
@ -21,10 +21,10 @@ import eventlet
|
||||
import httplib
|
||||
import json
|
||||
import logging
|
||||
import urllib
|
||||
import urlparse
|
||||
import request
|
||||
import time
|
||||
import urllib
|
||||
import urlparse
|
||||
|
||||
import client_eventlet
|
||||
from common import _conn_str
|
||||
|
@ -25,12 +25,12 @@ import time
|
||||
|
||||
import eventlet
|
||||
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import ovs_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.common import constants as q_const
|
||||
from quantum.agent import rpc as agent_rpc
|
||||
from quantum.common import config as logging_config
|
||||
from quantum.common import constants as q_const
|
||||
from quantum.common import topics
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import context
|
||||
|
@ -19,8 +19,8 @@
|
||||
from sqlalchemy.orm import exc
|
||||
|
||||
from quantum.common import exceptions as q_exc
|
||||
from quantum.db import models_v2
|
||||
import quantum.db.api as db
|
||||
from quantum.db import models_v2
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.plugins.openvswitch.common import constants
|
||||
|
@ -31,8 +31,8 @@ from quantum.db import db_base_plugin_v2
|
||||
from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.extensions import providernet as provider
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import dispatcher
|
||||
|
@ -24,8 +24,8 @@ import logging as LOG
|
||||
import sys
|
||||
import time
|
||||
|
||||
from ryu.app import rest_nw_id
|
||||
from ryu.app.client import OFPClient
|
||||
from ryu.app import rest_nw_id
|
||||
from sqlalchemy.ext.sqlsoup import SqlSoup
|
||||
|
||||
from quantum.agent.linux import ovs_lib
|
||||
|
@ -25,15 +25,15 @@ from quantum.common import exceptions as q_exc
|
||||
from quantum.common import topics
|
||||
from quantum.db import api as db
|
||||
from quantum.db import db_base_plugin_v2
|
||||
from quantum.db.dhcp_rpc_base import DhcpRpcCallbackMixin
|
||||
from quantum.db import l3_db
|
||||
from quantum.db import models_v2
|
||||
from quantum.db.dhcp_rpc_base import DhcpRpcCallbackMixin
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import dispatcher
|
||||
from quantum.plugins.ryu import ofp_service_type
|
||||
from quantum.plugins.ryu.common import config
|
||||
from quantum.plugins.ryu.db import api_v2 as db_api_v2
|
||||
from quantum.plugins.ryu import ofp_service_type
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -21,8 +21,8 @@ Policy engine for quantum. Largely copied from nova.
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import cfg
|
||||
import quantum.common.utils as utils
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import policy
|
||||
|
||||
|
@ -23,9 +23,9 @@ import optparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from quantum import service
|
||||
from quantum.common import config
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum import service
|
||||
from quantum.version import version_string
|
||||
|
||||
|
||||
|
@ -25,11 +25,11 @@ from quantum.db import api as db
|
||||
from quantum.db import l3_db
|
||||
from quantum.extensions import _quotav2_model as quotav2_model
|
||||
from quantum.manager import QuantumManager
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.plugins.cisco.common import cisco_constants as const
|
||||
from quantum.plugins.cisco.db import network_db_v2
|
||||
from quantum.plugins.cisco.db import network_models_v2
|
||||
from quantum.plugins.openvswitch import ovs_models_v2
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.tests.unit import test_db_plugin
|
||||
from quantum.wsgi import JSONDeserializer
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
from quantum.common.test_lib import test_config
|
||||
from quantum.tests.unit.metaplugin.test_metaplugin import setup_metaplugin_conf
|
||||
from quantum.tests.unit import test_db_plugin as test_plugin
|
||||
from quantum.tests.unit import test_l3_plugin
|
||||
from quantum.tests.unit.metaplugin.test_metaplugin import setup_metaplugin_conf
|
||||
|
||||
|
||||
class MetaPluginV2DBTestCase(test_plugin.QuantumDbPluginV2TestCase):
|
||||
|
@ -25,6 +25,7 @@ import unittest2 as unittest
|
||||
|
||||
from quantum.common import config
|
||||
from quantum.common.exceptions import NotImplementedError
|
||||
from quantum import context
|
||||
from quantum.db import api as db
|
||||
from quantum.db import models_v2
|
||||
from quantum.extensions.flavor import (FLAVOR_NETWORK, FLAVOR_ROUTER)
|
||||
@ -33,7 +34,6 @@ from quantum.openstack.common import cfg
|
||||
from quantum.plugins.metaplugin.meta_quantum_plugin import MetaPluginV2
|
||||
from quantum.plugins.metaplugin.proxy_quantum_plugin import ProxyPluginV2
|
||||
from quantum.tests.unit.metaplugin import fake_plugin
|
||||
from quantum import context
|
||||
|
||||
CONF_FILE = ""
|
||||
ROOTDIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
@ -19,9 +19,9 @@ import mox
|
||||
import unittest
|
||||
|
||||
from quantum.common import utils
|
||||
from quantum.plugins.nec import drivers
|
||||
from quantum.plugins.nec.db import models as nmodels
|
||||
from quantum.plugins.nec.common import ofc_client as ofc
|
||||
from quantum.plugins.nec.db import models as nmodels
|
||||
from quantum.plugins.nec import drivers
|
||||
|
||||
|
||||
class TestConfig(object):
|
||||
|
@ -19,9 +19,9 @@ import mox
|
||||
import unittest
|
||||
|
||||
from quantum.common import utils
|
||||
from quantum.plugins.nec import drivers
|
||||
from quantum.plugins.nec.db import models as nmodels
|
||||
from quantum.plugins.nec.common import ofc_client
|
||||
from quantum.plugins.nec.db import models as nmodels
|
||||
from quantum.plugins.nec import drivers
|
||||
|
||||
|
||||
class TestConfig(object):
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
import json
|
||||
import logging
|
||||
import uuid
|
||||
import urlparse
|
||||
import uuid
|
||||
|
||||
LOG = logging.getLogger("fake_nvpapiclient")
|
||||
LOG.setLevel(logging.DEBUG)
|
||||
|
@ -25,8 +25,8 @@ from quantum.agent import rpc as agent_rpc
|
||||
from quantum.common import topics
|
||||
from quantum.openstack.common import context
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.plugins.openvswitch import ovs_quantum_plugin as povs
|
||||
from quantum.plugins.openvswitch.common import constants
|
||||
from quantum.plugins.openvswitch import ovs_quantum_plugin as povs
|
||||
|
||||
|
||||
class rpcApiTestCase(unittest2.TestCase):
|
||||
|
@ -21,8 +21,8 @@ import uuid
|
||||
import mock
|
||||
import unittest2 as unittest
|
||||
|
||||
from quantum.agent import dhcp_agent
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent import dhcp_agent
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.common import exceptions
|
||||
from quantum.openstack.common import cfg
|
||||
|
@ -22,9 +22,9 @@ import webob.exc
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.api.v2.router import APIRouter
|
||||
from quantum import context
|
||||
from quantum.common.test_lib import test_config
|
||||
from quantum.common import config
|
||||
from quantum.common.test_lib import test_config
|
||||
from quantum import context
|
||||
from quantum.db import api as db
|
||||
from quantum.db import db_base_plugin_v2
|
||||
from quantum.db import securitygroups_db
|
||||
|
@ -25,6 +25,7 @@ from webtest import TestApp
|
||||
|
||||
from quantum.common import config
|
||||
from quantum.common import exceptions
|
||||
from quantum.db.db_base_plugin_v2 import QuantumDbPluginV2
|
||||
from quantum.extensions import extensions
|
||||
from quantum.extensions.extensions import (
|
||||
ExtensionManager,
|
||||
@ -32,7 +33,6 @@ from quantum.extensions.extensions import (
|
||||
PluginAwareExtensionManager,
|
||||
)
|
||||
from quantum.openstack.common import jsonutils
|
||||
from quantum.db.db_base_plugin_v2 import QuantumDbPluginV2
|
||||
from quantum.tests.unit import BaseTest
|
||||
from quantum.tests.unit.extension_stubs import (
|
||||
ExtensionExpectingPluginInterface,
|
||||
|
@ -17,8 +17,8 @@
|
||||
#
|
||||
# @author: Juliano Martinez, Locaweb.
|
||||
|
||||
import os
|
||||
import inspect
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import mox
|
||||
|
@ -26,8 +26,8 @@ import logging
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
import webtest
|
||||
from webob import exc
|
||||
import webtest
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import config
|
||||
@ -43,8 +43,8 @@ from quantum.extensions import l3
|
||||
from quantum import manager
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.tests.unit import test_api_v2
|
||||
from quantum.tests.unit import test_extensions
|
||||
from quantum.tests.unit import test_db_plugin
|
||||
from quantum.tests.unit import test_extensions
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -22,8 +22,8 @@ import unittest2 as unittest
|
||||
|
||||
import mock
|
||||
|
||||
from quantum.agent.linux import dhcp
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.linux import dhcp
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import jsonutils
|
||||
|
||||
|
@ -20,10 +20,10 @@ import unittest
|
||||
import mock
|
||||
|
||||
from quantum.agent.common import config
|
||||
from quantum.agent.dhcp_agent import DeviceManager
|
||||
from quantum.agent.linux import interface
|
||||
from quantum.agent.linux import ip_lib
|
||||
from quantum.agent.linux import utils
|
||||
from quantum.agent.dhcp_agent import DeviceManager
|
||||
from quantum.extensions.flavor import (FLAVOR_NETWORK)
|
||||
from quantum.openstack.common import cfg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user