diff --git a/cinder/api/openstack/common.py b/cinder/api/openstack/common.py index 6e264eedd..04ec611fa 100644 --- a/cinder/api/openstack/common.py +++ b/cinder/api/openstack/common.py @@ -15,19 +15,14 @@ # License for the specific language governing permissions and limitations # under the License. -import functools import os import re import urlparse import webob -from xml.dom import minidom -from cinder.api.openstack import wsgi -from cinder.api.openstack import xmlutil from cinder import flags from cinder.openstack.common import log as logging -from cinder import quota LOG = logging.getLogger(__name__) diff --git a/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py b/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py index 10baa2fb7..348ca510a 100644 --- a/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py +++ b/cinder/api/openstack/volume/contrib/extended_snapshot_attributes.py @@ -20,7 +20,6 @@ from cinder.api.openstack import extensions from cinder.api.openstack import wsgi from cinder.api.openstack import xmlutil from cinder import volume -from cinder import db from cinder import exception from cinder import flags from cinder.openstack.common import log as logging diff --git a/cinder/api/openstack/volume/contrib/volume_actions.py b/cinder/api/openstack/volume/contrib/volume_actions.py index 2afa244b4..30fb1c250 100644 --- a/cinder/api/openstack/volume/contrib/volume_actions.py +++ b/cinder/api/openstack/volume/contrib/volume_actions.py @@ -13,7 +13,6 @@ # under the License. import webob -from webob import exc from xml.dom import minidom from cinder.api.openstack import extensions @@ -22,7 +21,6 @@ from cinder.api.openstack import xmlutil from cinder import volume from cinder import exception from cinder import flags -from cinder import utils from cinder.openstack.common import log as logging from cinder.openstack.common.rpc import common as rpc_common diff --git a/cinder/api/openstack/wsgi.py b/cinder/api/openstack/wsgi.py index 831440861..a44a6fa93 100644 --- a/cinder/api/openstack/wsgi.py +++ b/cinder/api/openstack/wsgi.py @@ -18,8 +18,6 @@ import inspect from xml.dom import minidom from xml.parsers import expat -import math -import time from lxml import etree import webob diff --git a/cinder/api/sizelimit.py b/cinder/api/sizelimit.py index 2115f7c54..59ea213a1 100644 --- a/cinder/api/sizelimit.py +++ b/cinder/api/sizelimit.py @@ -21,7 +21,6 @@ Request Body limiting middleware. import webob.dec import webob.exc -from cinder import context from cinder import flags from cinder.openstack.common import log as logging from cinder.openstack.common import cfg diff --git a/cinder/db/sqlalchemy/migration.py b/cinder/db/sqlalchemy/migration.py index f7617094b..b694682e8 100644 --- a/cinder/db/sqlalchemy/migration.py +++ b/cinder/db/sqlalchemy/migration.py @@ -18,7 +18,6 @@ import distutils.version as dist_version import os -import sys from cinder.db import migration from cinder.db.sqlalchemy.session import get_engine diff --git a/cinder/db/sqlalchemy/models.py b/cinder/db/sqlalchemy/models.py index 1b7e43f86..120ccb405 100644 --- a/cinder/db/sqlalchemy/models.py +++ b/cinder/db/sqlalchemy/models.py @@ -31,7 +31,6 @@ from cinder.db.sqlalchemy.session import get_session from cinder import exception from cinder import flags -from cinder import utils from cinder.openstack.common import timeutils diff --git a/cinder/openstack/common/notifier/api.py b/cinder/openstack/common/notifier/api.py index c69296681..5479cbeba 100644 --- a/cinder/openstack/common/notifier/api.py +++ b/cinder/openstack/common/notifier/api.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import inspect import uuid from cinder.openstack.common import cfg diff --git a/cinder/openstack/common/rpc/common.py b/cinder/openstack/common/rpc/common.py index 409e0f12d..b14db3cfe 100644 --- a/cinder/openstack/common/rpc/common.py +++ b/cinder/openstack/common/rpc/common.py @@ -19,10 +19,8 @@ import copy import logging -import sys import traceback -from cinder.openstack.common import cfg from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import importutils from cinder.openstack.common import jsonutils diff --git a/cinder/test.py b/cinder/test.py index 63f10970d..dd111e9d9 100644 --- a/cinder/test.py +++ b/cinder/test.py @@ -24,8 +24,6 @@ inline callbacks. """ import functools -import os -import shutil import uuid import unittest @@ -37,7 +35,6 @@ from cinder import flags from cinder.openstack.common import log as logging from cinder.openstack.common import cfg from cinder.openstack.common import timeutils -from cinder import utils from cinder import service from cinder import tests from cinder.tests import fake_flags diff --git a/cinder/testing/runner.py b/cinder/testing/runner.py index 4711d0ce9..d92179f25 100644 --- a/cinder/testing/runner.py +++ b/cinder/testing/runner.py @@ -73,9 +73,7 @@ reldir = os.path.join(os.path.dirname(__file__), '..', '..') absdir = os.path.abspath(reldir) sys.path.insert(0, absdir) -from cinder import flags from cinder.openstack.common import log as logging -from cinder.openstack.common import cfg class _AnsiColorizer(object): diff --git a/cinder/tests/api/openstack/common.py b/cinder/tests/api/openstack/common.py index 2d2d737e1..e03010565 100644 --- a/cinder/tests/api/openstack/common.py +++ b/cinder/tests/api/openstack/common.py @@ -15,8 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import webob - def compare_links(actual, expected): """Compare xml atom links.""" diff --git a/cinder/tests/api/openstack/test_common.py b/cinder/tests/api/openstack/test_common.py index ff153baea..374937db3 100644 --- a/cinder/tests/api/openstack/test_common.py +++ b/cinder/tests/api/openstack/test_common.py @@ -19,15 +19,11 @@ Test suites for 'common' code used throughout the OpenStack HTTP API. """ -from lxml import etree import webob import webob.exc -import xml.dom.minidom as minidom -from cinder import exception from cinder import test from cinder.api.openstack import common -from cinder.api.openstack import xmlutil NS = "{http://docs.openstack.org/compute/api/v1.1}" diff --git a/cinder/tests/api/openstack/test_wsgi.py b/cinder/tests/api/openstack/test_wsgi.py index f9a4a1c92..22bf8691e 100644 --- a/cinder/tests/api/openstack/test_wsgi.py +++ b/cinder/tests/api/openstack/test_wsgi.py @@ -1,15 +1,12 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 import inspect -import json import webob from cinder import exception from cinder import test -from cinder import utils from cinder.api.openstack import wsgi from cinder.tests.api.openstack import fakes -import cinder.context class RequestTest(test.TestCase): diff --git a/cinder/tests/db/fakes.py b/cinder/tests/db/fakes.py index 5cd2284d2..99056ea88 100644 --- a/cinder/tests/db/fakes.py +++ b/cinder/tests/db/fakes.py @@ -19,7 +19,6 @@ """Stubouts, mocks and fixtures for the test suite""" from cinder import db -from cinder import exception class FakeModel(object): diff --git a/cinder/tests/integrated/api/client.py b/cinder/tests/integrated/api/client.py index 1fcd70796..a5c1b1962 100644 --- a/cinder/tests/integrated/api/client.py +++ b/cinder/tests/integrated/api/client.py @@ -15,7 +15,6 @@ # under the License. import httplib -import urllib import urlparse from cinder.openstack.common import log as logging diff --git a/cinder/tests/integrated/test_extensions.py b/cinder/tests/integrated/test_extensions.py index 6423885ae..9c5808106 100644 --- a/cinder/tests/integrated/test_extensions.py +++ b/cinder/tests/integrated/test_extensions.py @@ -15,7 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder.api.openstack.volume import extensions from cinder import flags from cinder.openstack.common import log as logging from cinder.tests.integrated import integrated_helpers diff --git a/cinder/tests/integrated/test_xml.py b/cinder/tests/integrated/test_xml.py index cbbfe9a11..52da4c96c 100644 --- a/cinder/tests/integrated/test_xml.py +++ b/cinder/tests/integrated/test_xml.py @@ -20,7 +20,6 @@ from lxml import etree from cinder.openstack.common import log as logging from cinder.tests.integrated import integrated_helpers from cinder.api.openstack import common -from cinder.api.openstack import xmlutil LOG = logging.getLogger(__name__) diff --git a/cinder/tests/scheduler/fakes.py b/cinder/tests/scheduler/fakes.py index 384dae7ba..97a4f8cd8 100644 --- a/cinder/tests/scheduler/fakes.py +++ b/cinder/tests/scheduler/fakes.py @@ -16,9 +16,7 @@ Fakes For Scheduler tests. """ -import mox -from cinder import db from cinder.scheduler import host_manager diff --git a/cinder/tests/scheduler/test_scheduler.py b/cinder/tests/scheduler/test_scheduler.py index 761698338..f6a74b58d 100644 --- a/cinder/tests/scheduler/test_scheduler.py +++ b/cinder/tests/scheduler/test_scheduler.py @@ -19,21 +19,15 @@ Tests For Scheduler """ -import datetime -import json from cinder import context from cinder import db -from cinder import exception from cinder import flags -from cinder.openstack.common.notifier import api as notifier from cinder.openstack.common import rpc -from cinder.openstack.common.rpc import common as rpc_common from cinder.openstack.common import timeutils from cinder.scheduler import driver from cinder.scheduler import manager from cinder import test -from cinder.tests.scheduler import fakes from cinder import utils FLAGS = flags.FLAGS diff --git a/cinder/tests/test_flags.py b/cinder/tests/test_flags.py index 5bba3e7f8..afb1eab17 100644 --- a/cinder/tests/test_flags.py +++ b/cinder/tests/test_flags.py @@ -17,8 +17,6 @@ # License for the specific language governing permissions and limitations # under the License. -import os -import tempfile from cinder import flags from cinder.openstack.common import cfg diff --git a/cinder/tests/test_migrations.py b/cinder/tests/test_migrations.py index 00502f76d..913baae59 100644 --- a/cinder/tests/test_migrations.py +++ b/cinder/tests/test_migrations.py @@ -27,7 +27,6 @@ if possible. import ConfigParser import commands import os -import unittest import urlparse from migrate.versioning import repository diff --git a/cinder/tests/test_misc.py b/cinder/tests/test_misc.py index e99771655..7dd24ca7c 100644 --- a/cinder/tests/test_misc.py +++ b/cinder/tests/test_misc.py @@ -14,19 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. -import commands -import errno import glob import os -import select -from eventlet import greenpool -from eventlet import greenthread -import lockfile from cinder import exception from cinder import test -from cinder import utils class ExceptionTestCase(test.TestCase): diff --git a/cinder/tests/test_quota.py b/cinder/tests/test_quota.py index 2e709dbe2..b2f636419 100644 --- a/cinder/tests/test_quota.py +++ b/cinder/tests/test_quota.py @@ -24,7 +24,6 @@ from cinder import quota from cinder.openstack.common import rpc from cinder import test from cinder import volume -from cinder.scheduler import driver as scheduler_driver FLAGS = flags.FLAGS diff --git a/cinder/tests/test_storwize_svc.py b/cinder/tests/test_storwize_svc.py index f06080350..22a01a9c8 100644 --- a/cinder/tests/test_storwize_svc.py +++ b/cinder/tests/test_storwize_svc.py @@ -31,7 +31,6 @@ from cinder import exception from cinder.openstack.common import excutils from cinder.openstack.common import log as logging from cinder import test -from cinder import utils from cinder.volume import storwize_svc LOG = logging.getLogger(__name__) diff --git a/cinder/tests/test_test_utils.py b/cinder/tests/test_test_utils.py index 5e9063cc5..06e38a42b 100644 --- a/cinder/tests/test_test_utils.py +++ b/cinder/tests/test_test_utils.py @@ -14,7 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -from cinder import db from cinder import test from cinder.tests import utils as test_utils diff --git a/cinder/tests/test_utils.py b/cinder/tests/test_utils.py index 127053321..ee9779670 100644 --- a/cinder/tests/test_utils.py +++ b/cinder/tests/test_utils.py @@ -19,15 +19,9 @@ import datetime import hashlib import os import os.path -import socket -import shutil import StringIO import tempfile -import eventlet -from eventlet import greenpool -import iso8601 -import lockfile import mox import cinder diff --git a/cinder/volume/netapp.py b/cinder/volume/netapp.py index 5299ff26c..46a3a7809 100644 --- a/cinder/volume/netapp.py +++ b/cinder/volume/netapp.py @@ -24,7 +24,6 @@ ONTAP 7-mode storage systems with installed iSCSI licenses. """ import time -import string import suds from suds import client diff --git a/cinder/volume/storwize_svc.py b/cinder/volume/storwize_svc.py index 92500a53e..ba8f4213d 100644 --- a/cinder/volume/storwize_svc.py +++ b/cinder/volume/storwize_svc.py @@ -49,7 +49,6 @@ from cinder import flags from cinder.openstack.common import cfg from cinder.openstack.common import excutils from cinder.openstack.common import log as logging -from cinder import utils from cinder.volume import san LOG = logging.getLogger(__name__)