Reorder imports by full import path

Fixes bug #1019463

Change-Id: I3fb44cbacb09457ea34571222e0a8e8d4b8d7c87
This commit is contained in:
Zhongyue Luo 2012-06-30 08:41:01 +08:00
parent a404d6b390
commit 878b25ea2e
28 changed files with 54 additions and 55 deletions

View File

@ -19,8 +19,8 @@ import logging
import webob.exc
from glance import registry
from glance.common import exception
from glance import registry
LOG = logging.getLogger(__name__)

View File

@ -38,17 +38,17 @@ import glance.api.v1
from glance.api.v1 import controller
from glance.api.v1 import filters
from glance.common import exception
from glance.common import wsgi
from glance.common import utils
from glance.common import wsgi
from glance import notifier
from glance.openstack.common import cfg
from glance import registry
from glance.store import (create_stores,
get_from_backend,
get_size_from_backend,
schedule_delete_from_backend,
get_store_from_location,
get_store_from_scheme)
from glance import registry
from glance import notifier
LOG = logging.getLogger(__name__)

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from glance.api.v2 import images
from glance.api.v2 import image_access
from glance.api.v2 import images
from glance.common import wsgi

View File

@ -31,8 +31,8 @@ import sys
import time
import eventlet
import eventlet.greenio
from eventlet.green import socket, ssl
import eventlet.greenio
import eventlet.wsgi
import routes
import routes.middleware

View File

@ -20,15 +20,15 @@
SQLAlchemy models for glance data
"""
from sqlalchemy.orm import relationship, backref, object_mapper
from sqlalchemy import Column, Integer, String, BigInteger
from sqlalchemy import ForeignKey, DateTime, Boolean, Text
from sqlalchemy import UniqueConstraint
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import ForeignKey, DateTime, Boolean, Text
from sqlalchemy.orm import relationship, backref, object_mapper
from sqlalchemy import UniqueConstraint
import glance.db.sqlalchemy.api
from glance.common import utils
import glance.db.sqlalchemy.api
from glance.openstack.common import timeutils
BASE = declarative_base()

View File

@ -29,11 +29,11 @@ from glance.image_cache import base
from glance import registry
import glance.store
import glance.store.filesystem
from glance.store import get_from_backend
import glance.store.http
import glance.store.rbd
import glance.store.s3
import glance.store.swift
from glance.store import get_from_backend
LOG = logging.getLogger(__name__)

View File

@ -26,8 +26,8 @@ from webob import exc
from glance.common import exception
from glance.common import utils
from glance.common import wsgi
from glance.openstack.common import cfg
import glance.db
from glance.openstack.common import cfg
from glance.openstack.common import timeutils

View File

@ -17,9 +17,9 @@
"""Storage backend for S3 or Storage Servers that follow the S3 Protocol"""
import logging
import hashlib
import httplib
import logging
import re
import tempfile
import urlparse

View File

@ -18,18 +18,18 @@
import calendar
import eventlet
import logging
import time
import os
import time
from glance.common import utils
from glance.openstack.common import cfg
from glance import registry
from glance.registry import client
from glance import store
import glance.store.filesystem
import glance.store.http
import glance.store.s3
import glance.store.swift
from glance import registry
from glance import store
from glance.common import utils
from glance.openstack.common import cfg
from glance.registry import client
LOG = logging.getLogger(__name__)

View File

@ -28,10 +28,10 @@ import time
from glance.openstack.common import timeutils
from glance.tests import functional
from glance.tests.utils import execute, requires, minimal_add_command
from glance.tests.functional.store_utils import (setup_http,
teardown_http,
get_http_uri)
from glance.tests.utils import execute, requires, minimal_add_command
class TestBinGlance(functional.FunctionalTest):

View File

@ -18,9 +18,8 @@
import httplib2
import os
import time
import socket
import signal
import socket
import sys
import time

View File

@ -46,7 +46,6 @@ import json
import tempfile
from glance.tests import functional
from glance.tests.utils import skip_if_disabled, requires
from glance.tests.functional.store_utils import (setup_swift,
teardown_swift,
get_swift_uri,
@ -56,6 +55,7 @@ from glance.tests.functional.store_utils import (setup_swift,
setup_http,
teardown_http,
get_http_uri)
from glance.tests.utils import skip_if_disabled, requires
FIVE_KB = 5 * 1024

View File

@ -38,8 +38,8 @@ found, or creating the pool fails, all the test cases are skipped.
import ConfigParser
import os
from glance.tests.functional.v1 import test_api
from glance.store.rbd import DEFAULT_POOL, DEFAULT_CONFFILE, DEFAULT_USER
from glance.tests.functional.v1 import test_api
class TestRBD(test_api.TestApi):

View File

@ -37,10 +37,6 @@ import httplib2
from glance.common import crypt
from glance.common import utils
from glance.tests.functional.v1 import test_api
from glance.tests.utils import (skip_if_disabled,
requires,
minimal_headers)
from glance.tests.functional.store_utils import (setup_s3,
teardown_s3,
get_s3_uri,
@ -50,6 +46,10 @@ from glance.tests.functional.store_utils import (setup_s3,
setup_http,
teardown_http,
get_http_uri)
from glance.tests.functional.v1 import test_api
from glance.tests.utils import (skip_if_disabled,
requires,
minimal_headers)
FIVE_KB = 5 * 1024

View File

@ -36,10 +36,8 @@ import httplib2
import json
from glance.common import crypt
import glance.store.swift # Needed to register driver for location
from glance.store.location import get_location_from_uri
from glance.tests.functional.v1 import test_api
from glance.tests.utils import skip_if_disabled, requires, minimal_headers
import glance.store.swift # Needed to register driver for location
from glance.tests.functional.store_utils import (setup_swift,
get_swift_uri,
setup_s3,
@ -48,6 +46,8 @@ from glance.tests.functional.store_utils import (setup_swift,
setup_http,
teardown_http,
get_http_uri)
from glance.tests.functional.v1 import test_api
from glance.tests.utils import skip_if_disabled, requires, minimal_headers
FIVE_KB = 5 * 1024
FIVE_MB = 5 * 1024 * 1024

View File

@ -19,8 +19,8 @@ import json
import requests
from glance.tests import functional
from glance.common import utils
from glance.tests import functional
TENANT1 = utils.generate_uuid()

View File

@ -21,10 +21,10 @@ import shutil
import stubout
from glance import store
from glance.openstack.common import cfg
from glance.store import location
from glance import store
from glance.store import filesystem
from glance.store import location
from glance.tests import stubs
from glance.tests import utils as test_utils

View File

@ -16,8 +16,8 @@
# under the License.
from glance.common import context
from glance.tests import utils
from glance.tests.unit import utils as unit_utils
from glance.tests import utils
def _fake_image(owner, is_public):

View File

@ -18,13 +18,13 @@
"""Tests the filesystem backend store"""
import errno
import StringIO
import hashlib
import StringIO
from glance.common import exception
from glance.common import utils
from glance.store.location import get_location_from_uri
from glance.store.filesystem import Store, ChunkedFile
from glance.store.location import get_location_from_uri
from glance.tests.unit import base

View File

@ -23,8 +23,8 @@ import StringIO
import stubout
from glance import image_cache
from glance.common import utils
from glance import image_cache
from glance.tests import utils as test_utils
from glance.tests.utils import skip_if_disabled, xattr_writes_supported

View File

@ -34,9 +34,9 @@ from sqlalchemy import *
from sqlalchemy.pool import NullPool
from glance.common import exception
from glance.openstack.common import cfg
import glance.db.sqlalchemy.migration as migration_api
from glance.db.sqlalchemy import models
from glance.openstack.common import cfg
from glance.tests import utils

View File

@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import commands
import datetime
import os
import re
from glance.common import crypt

View File

@ -17,18 +17,18 @@
"""Tests the S3 backend store"""
import StringIO
import hashlib
import StringIO
import stubout
import boto.s3.connection
import stubout
from glance.common import exception
from glance.common import utils
from glance.openstack.common import cfg
from glance.store import UnsupportedBackend
from glance.store.location import get_location_from_uri
from glance.store.s3 import Store, get_s3_location
from glance.store import UnsupportedBackend
from glance.tests.unit import base
from glance.tests import utils as test_utils

View File

@ -17,11 +17,11 @@
from glance.common import exception
import glance.store
import glance.store.location as location
import glance.store.http
import glance.store.filesystem
import glance.store.swift
import glance.store.http
import glance.store.location as location
import glance.store.s3
import glance.store.swift
from glance.tests.unit import base
from glance.tests import utils

View File

@ -17,9 +17,9 @@
"""Tests the Swift backend store"""
import StringIO
import hashlib
import httplib
import StringIO
import tempfile
import urllib
@ -30,8 +30,8 @@ from glance.common import exception
from glance.common import utils
from glance.openstack.common import cfg
from glance.store import BackendException
import glance.store.swift
from glance.store.location import get_location_from_uri
import glance.store.swift
from glance.tests.unit import base
CONF = cfg.CONF

View File

@ -17,9 +17,9 @@
import webob
from glance.common import wsgi
from glance.common import utils
from glance.common import exception
from glance.common import utils
from glance.common import wsgi
from glance.tests import utils as test_utils

View File

@ -21,20 +21,20 @@ import httplib
import json
import routes
from sqlalchemy import exc
import stubout
import webob
from sqlalchemy import exc
from glance.api.v1 import images
from glance.api.v1 import router
from glance.common import context
from glance.common import utils
from glance.openstack.common import timeutils
from glance.registry.api import v1 as rserver
from glance.db.sqlalchemy import api as db_api
from glance.db.sqlalchemy import models as db_models
from glance.tests import utils as test_utils
from glance.openstack.common import timeutils
from glance.registry.api import v1 as rserver
from glance.tests.unit import base
from glance.tests import utils as test_utils
_gen_uuid = utils.generate_uuid

View File

@ -19,8 +19,8 @@ import webob
import glance.api.v2.image_data
from glance.common import utils
import glance.tests.unit.utils as unit_test_utils
from glance.tests.unit import base
import glance.tests.unit.utils as unit_test_utils
import glance.tests.utils as test_utils