Vinkesh | Changed import orders according to pep8 recommendations
This commit is contained in:
parent
88c074c0a2
commit
d17344aede
@ -16,18 +16,17 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import imp
|
import imp
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import routes
|
import routes
|
||||||
import logging
|
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
|
|
||||||
from quantum.manager import QuantumManager
|
|
||||||
from quantum.common import exceptions
|
from quantum.common import exceptions
|
||||||
|
from quantum.manager import QuantumManager
|
||||||
from quantum.common import wsgi
|
from quantum.common import wsgi
|
||||||
|
|
||||||
LOG = logging.getLogger('quantum.common.extensions')
|
LOG = logging.getLogger('quantum.common.extensions')
|
||||||
|
@ -21,14 +21,12 @@ Wraps gflags.
|
|||||||
Global flags should be defined here, the rest are defined where they're used.
|
Global flags should be defined here, the rest are defined where they're used.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
import gflags
|
||||||
import os
|
import os
|
||||||
import string
|
import string
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import gflags
|
|
||||||
|
|
||||||
|
|
||||||
class FlagValues(gflags.FlagValues):
|
class FlagValues(gflags.FlagValues):
|
||||||
"""Extension of gflags.FlagValues that allows undefined and runtime flags.
|
"""Extension of gflags.FlagValues that allows undefined and runtime flags.
|
||||||
|
@ -18,8 +18,10 @@
|
|||||||
"""
|
"""
|
||||||
System-level utilities and helper functions.
|
System-level utilities and helper functions.
|
||||||
"""
|
"""
|
||||||
|
import ConfigParser
|
||||||
import datetime
|
import datetime
|
||||||
|
import exceptions as exception
|
||||||
|
import flags
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -27,10 +29,8 @@ import random
|
|||||||
import subprocess
|
import subprocess
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import ConfigParser
|
|
||||||
|
|
||||||
import exceptions as exception
|
|
||||||
import flags
|
|
||||||
from exceptions import ProcessExecutionError
|
from exceptions import ProcessExecutionError
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,17 +22,17 @@ Utility methods for working with WSGI servers
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from xml.dom import minidom
|
|
||||||
|
|
||||||
import eventlet.wsgi
|
import eventlet.wsgi
|
||||||
eventlet.patcher.monkey_patch(all=False, socket=True)
|
eventlet.patcher.monkey_patch(all=False, socket=True)
|
||||||
import routes.middleware
|
import routes.middleware
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
from xml.dom import minidom
|
||||||
|
|
||||||
|
|
||||||
from quantum import utils
|
|
||||||
from quantum.common import exceptions as exception
|
from quantum.common import exceptions as exception
|
||||||
|
from quantum import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger('quantum.common.wsgi')
|
LOG = logging.getLogger('quantum.common.wsgi')
|
||||||
|
|
||||||
|
@ -20,8 +20,10 @@
|
|||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
from sqlalchemy.orm import sessionmaker, exc
|
from sqlalchemy.orm import sessionmaker, exc
|
||||||
|
|
||||||
|
|
||||||
from quantum.db import models
|
from quantum.db import models
|
||||||
|
|
||||||
|
|
||||||
_ENGINE = None
|
_ENGINE = None
|
||||||
_MAKER = None
|
_MAKER = None
|
||||||
BASE = models.BASE
|
BASE = models.BASE
|
||||||
|
@ -19,10 +19,12 @@
|
|||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
from sqlalchemy import Column, String, ForeignKey
|
from sqlalchemy import Column, String, ForeignKey
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
from sqlalchemy.orm import relation, object_mapper
|
from sqlalchemy.orm import relation, object_mapper
|
||||||
|
|
||||||
|
|
||||||
BASE = declarative_base()
|
BASE = declarative_base()
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
import logging
|
import logging
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import tests.unit.testlib_api as testlib
|
|
||||||
|
|
||||||
|
import tests.unit.testlib_api as testlib
|
||||||
from quantum import api as server
|
from quantum import api as server
|
||||||
from quantum.db import api as db
|
from quantum.db import api as db
|
||||||
from quantum.common.wsgi import Serializer
|
from quantum.common.wsgi import Serializer
|
||||||
|
@ -14,12 +14,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
import json
|
import json
|
||||||
import unittest
|
|
||||||
import routes
|
|
||||||
import os.path
|
import os.path
|
||||||
|
import routes
|
||||||
|
import unittest
|
||||||
from tests.unit import BaseTest
|
from tests.unit import BaseTest
|
||||||
|
|
||||||
from webtest import TestApp
|
from webtest import TestApp
|
||||||
|
|
||||||
|
|
||||||
from quantum.common import wsgi
|
from quantum.common import wsgi
|
||||||
from quantum.common import config
|
from quantum.common import config
|
||||||
from quantum.common import extensions
|
from quantum.common import extensions
|
||||||
@ -32,6 +33,7 @@ from quantum.common.extensions import (ExtensionManager,
|
|||||||
PluginAwareExtensionManager,
|
PluginAwareExtensionManager,
|
||||||
ExtensionMiddleware)
|
ExtensionMiddleware)
|
||||||
|
|
||||||
|
|
||||||
test_conf_file = os.path.join(os.path.dirname(__file__), os.pardir,
|
test_conf_file = os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
os.pardir, 'etc', 'quantum.conf.test')
|
os.pardir, 'etc', 'quantum.conf.test')
|
||||||
extensions_path = os.path.join(os.path.dirname(__file__), "extensions")
|
extensions_path = os.path.join(os.path.dirname(__file__), "extensions")
|
||||||
|
Loading…
Reference in New Issue
Block a user