diff --git a/contrib/boto_v6/ec2/instance.py b/contrib/boto_v6/ec2/instance.py index 18b5cd33ad35..9208c05ad58e 100644 --- a/contrib/boto_v6/ec2/instance.py +++ b/contrib/boto_v6/ec2/instance.py @@ -3,7 +3,6 @@ Created on 2010/12/20 @author: Nachi Ueno ''' -import boto from boto.resultset import ResultSet from boto.ec2.instance import Reservation from boto.ec2.instance import Group diff --git a/doc/ext/nova_todo.py b/doc/ext/nova_todo.py index a8e81a483354..2bd652071147 100644 --- a/doc/ext/nova_todo.py +++ b/doc/ext/nova_todo.py @@ -2,7 +2,6 @@ # This is a hack of the builtin todo extension, to make the todo_list more user friendly from sphinx.ext.todo import * -from docutils.parsers.rst import directives import re def _(s): @@ -22,12 +21,12 @@ def process_todo_nodes(app, doctree, fromdocname): env.todo_all_todos = [] - # remove the item that was added in the constructor, since I'm tired of + # remove the item that was added in the constructor, since I'm tired of # reading through docutils for the proper way to construct an empty list lists = [] for i in xrange(5): lists.append(nodes.bullet_list("", nodes.Text('',''))) - lists[i].remove(lists[i][0]) + lists[i].remove(lists[i][0]) lists[i]['classes'].append('todo_list') for node in doctree.traverse(todolist): @@ -60,14 +59,14 @@ def process_todo_nodes(app, doctree, fromdocname): para['classes'].append('todo_link') todo_entry = todo_info['todo'] - + env.resolve_references(todo_entry, todo_info['docname'], app.builder) item = nodes.list_item('', para) todo_entry[1]['classes'].append('details') comment = todo_entry[1] - + m = re.match(r"^P(\d)", comment.astext()) priority = 5 if m: diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 9fcaf30d788d..646fd42bd692 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -35,7 +35,6 @@ from nova.compute import instance_types from nova.api.ec2 import inst_state from nova import block_device from nova import compute -from nova.compute import power_state from nova.compute import vm_states from nova import crypto from nova import db diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index dfc174a58554..240bf0d80e5d 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -25,7 +25,6 @@ import webob.dec import webob.exc from nova.api.openstack import wsgi -from nova import flags from nova import log as logging from nova import wsgi as base_wsgi diff --git a/nova/api/openstack/compute/__init__.py b/nova/api/openstack/compute/__init__.py index 69b8daab7004..717f66fd0480 100644 --- a/nova/api/openstack/compute/__init__.py +++ b/nova/api/openstack/compute/__init__.py @@ -20,7 +20,6 @@ WSGI middleware for OpenStack API controllers. """ -import routes import webob.dec import webob.exc diff --git a/nova/api/openstack/compute/contrib/createserverext.py b/nova/api/openstack/compute/contrib/createserverext.py index 25b53a0d673c..05b0c7d9ce4b 100644 --- a/nova/api/openstack/compute/contrib/createserverext.py +++ b/nova/api/openstack/compute/contrib/createserverext.py @@ -17,7 +17,6 @@ from nova.api.openstack import extensions from nova.api.openstack.compute import servers from nova.api.openstack.compute import views -from nova.api.openstack import wsgi class ViewBuilder(views.servers.ViewBuilder): diff --git a/nova/api/openstack/compute/contrib/deferred_delete.py b/nova/api/openstack/compute/contrib/deferred_delete.py index 312c22c80c3d..6c07e8ee65b3 100644 --- a/nova/api/openstack/compute/contrib/deferred_delete.py +++ b/nova/api/openstack/compute/contrib/deferred_delete.py @@ -19,7 +19,6 @@ import webob from nova.api.openstack import common from nova.api.openstack import extensions -from nova.api.openstack.compute import servers from nova import compute from nova import exception from nova import log as logging diff --git a/nova/api/openstack/compute/contrib/keypairs.py b/nova/api/openstack/compute/contrib/keypairs.py index 5ac205df530d..c97fab0f4213 100644 --- a/nova/api/openstack/compute/contrib/keypairs.py +++ b/nova/api/openstack/compute/contrib/keypairs.py @@ -22,7 +22,6 @@ import shutil import tempfile import webob -from webob import exc from nova.api.openstack import wsgi from nova.api.openstack import xmlutil diff --git a/nova/api/openstack/compute/contrib/virtual_storage_arrays.py b/nova/api/openstack/compute/contrib/virtual_storage_arrays.py index 39edd155b0a7..440be6ad470c 100644 --- a/nova/api/openstack/compute/contrib/virtual_storage_arrays.py +++ b/nova/api/openstack/compute/contrib/virtual_storage_arrays.py @@ -30,8 +30,6 @@ from nova.api.openstack import xmlutil from nova import compute from nova.compute import instance_types from nova import network -from nova import db -from nova import quota from nova import exception from nova import flags from nova import log as logging diff --git a/nova/api/openstack/volume/__init__.py b/nova/api/openstack/volume/__init__.py index d83725a1a32d..9e8a5d78905c 100644 --- a/nova/api/openstack/volume/__init__.py +++ b/nova/api/openstack/volume/__init__.py @@ -20,7 +20,6 @@ WSGI middleware for OpenStack Volume API. """ -import routes import webob.dec import webob.exc diff --git a/nova/api/openstack/volume/snapshots.py b/nova/api/openstack/volume/snapshots.py index f6ec3dc5fdd4..d86332ba8367 100644 --- a/nova/api/openstack/volume/snapshots.py +++ b/nova/api/openstack/volume/snapshots.py @@ -19,16 +19,12 @@ from webob import exc import webob from nova.api.openstack import common -from nova.api.openstack import extensions -from nova.api.openstack.compute import servers from nova.api.openstack import wsgi from nova.api.openstack import xmlutil -from nova import compute from nova import exception from nova import flags from nova import log as logging from nova import volume -from nova.volume import volume_types LOG = logging.getLogger("nova.api.openstack.volume.snapshots") diff --git a/nova/api/openstack/volume/types.py b/nova/api/openstack/volume/types.py index 1c6a68b58437..d324914a4de9 100644 --- a/nova/api/openstack/volume/types.py +++ b/nova/api/openstack/volume/types.py @@ -19,10 +19,8 @@ from webob import exc -from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil -from nova import db from nova import exception from nova.volume import volume_types diff --git a/nova/api/openstack/volume/versions.py b/nova/api/openstack/volume/versions.py index 9a29e4adfa6c..d4839ece471a 100644 --- a/nova/api/openstack/volume/versions.py +++ b/nova/api/openstack/volume/versions.py @@ -15,14 +15,10 @@ # License for the specific language governing permissions and limitations # under the License. -from datetime import datetime - -from lxml import etree from nova.api.openstack.compute import versions from nova.api.openstack.volume.views import versions as views_versions from nova.api.openstack import wsgi -from nova.api.openstack import xmlutil VERSIONS = { diff --git a/nova/api/openstack/volume/views/versions.py b/nova/api/openstack/volume/views/versions.py index e446a4b64cbc..2e659af6a80f 100644 --- a/nova/api/openstack/volume/views/versions.py +++ b/nova/api/openstack/volume/views/versions.py @@ -15,7 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import copy import os from nova.api.openstack.compute.views import versions as compute_views diff --git a/nova/api/openstack/volume/volumes.py b/nova/api/openstack/volume/volumes.py index 5e16f4fde849..cdecb967ad20 100644 --- a/nova/api/openstack/volume/volumes.py +++ b/nova/api/openstack/volume/volumes.py @@ -19,7 +19,6 @@ from webob import exc import webob from nova.api.openstack import common -from nova.api.openstack.compute import servers from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova import exception diff --git a/nova/auth/dbdriver.py b/nova/auth/dbdriver.py index c6d81ee0430a..a84e11e6670b 100644 --- a/nova/auth/dbdriver.py +++ b/nova/auth/dbdriver.py @@ -20,8 +20,6 @@ Auth driver using the DB as its backend. """ -import sys - from nova import context from nova import exception from nova import db diff --git a/nova/console/api.py b/nova/console/api.py index aa574132dfb5..4327e9b5a541 100644 --- a/nova/console/api.py +++ b/nova/console/api.py @@ -18,7 +18,6 @@ """Handles ConsoleProxy API requests.""" from nova.db import base -from nova import exception from nova import flags from nova import rpc from nova import utils diff --git a/nova/console/fake.py b/nova/console/fake.py index e2eb886f851c..e87f25a8a459 100644 --- a/nova/console/fake.py +++ b/nova/console/fake.py @@ -17,8 +17,6 @@ """Fake ConsoleProxy driver for tests.""" -from nova import exception - class FakeConsoleProxy(object): """Fake ConsoleProxy driver.""" diff --git a/nova/console/manager.py b/nova/console/manager.py index 2c823b7636c6..bb58bcf1f7cf 100644 --- a/nova/console/manager.py +++ b/nova/console/manager.py @@ -17,7 +17,6 @@ """Console Proxy Service.""" -import functools import socket from nova import exception diff --git a/nova/console/vmrc.py b/nova/console/vmrc.py index fa805e019055..4b7f1cdfc993 100644 --- a/nova/console/vmrc.py +++ b/nova/console/vmrc.py @@ -22,7 +22,6 @@ import json from nova import exception from nova import flags -from nova import log as logging from nova.virt.vmwareapi import vim_util diff --git a/nova/console/xvp.py b/nova/console/xvp.py index 2d6842044dc9..17942321c2c3 100644 --- a/nova/console/xvp.py +++ b/nova/console/xvp.py @@ -17,7 +17,6 @@ """XVP (Xenserver VNC Proxy) driver.""" -import fcntl import os import signal diff --git a/nova/db/sqlalchemy/migrate_repo/versions/020_add_snapshot_id_to_volumes.py b/nova/db/sqlalchemy/migrate_repo/versions/020_add_snapshot_id_to_volumes.py index 10bd9d5c9a8c..dad2a1cd7805 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/020_add_snapshot_id_to_volumes.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/020_add_snapshot_id_to_volumes.py @@ -17,8 +17,6 @@ from sqlalchemy import Column, Table, MetaData, Integer -from nova import log as logging - meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/021_rename_image_ids.py b/nova/db/sqlalchemy/migrate_repo/versions/021_rename_image_ids.py index 73a5e8477b99..4d1089d7f36c 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/021_rename_image_ids.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/021_rename_image_ids.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Integer, MetaData, String, Table +from sqlalchemy import MetaData, Table meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/022_set_engine_mysql_innodb.py b/nova/db/sqlalchemy/migrate_repo/versions/022_set_engine_mysql_innodb.py index 6e590479f917..f9fb64d59ff1 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/022_set_engine_mysql_innodb.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/022_set_engine_mysql_innodb.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import MetaData, Table +from sqlalchemy import MetaData meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/023_add_vm_mode_to_instances.py b/nova/db/sqlalchemy/migrate_repo/versions/023_add_vm_mode_to_instances.py index 0c587f569343..59b552a6d9e9 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/023_add_vm_mode_to_instances.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/023_add_vm_mode_to_instances.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Integer, MetaData, String, Table +from sqlalchemy import Column, MetaData, String, Table meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/030_multi_nic.py b/nova/db/sqlalchemy/migrate_repo/versions/030_multi_nic.py index 7cb68b9c8ea6..f805736d718e 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/030_multi_nic.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/030_multi_nic.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import datetime - from sqlalchemy import * from migrate import * diff --git a/nova/db/sqlalchemy/migrate_repo/versions/031_fk_fixed_ips_virtual_interface_id.py b/nova/db/sqlalchemy/migrate_repo/versions/031_fk_fixed_ips_virtual_interface_id.py index 56e9277172b9..5d1ba546d4a3 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/031_fk_fixed_ips_virtual_interface_id.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/031_fk_fixed_ips_virtual_interface_id.py @@ -13,13 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -import datetime - from sqlalchemy import * from migrate import * from nova import log as logging -from nova import utils meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/035_secondary_dns.py b/nova/db/sqlalchemy/migrate_repo/versions/035_secondary_dns.py index c938eb716c2f..ce1c3d880da5 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/035_secondary_dns.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/035_secondary_dns.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Table, MetaData, Boolean, String +from sqlalchemy import Column, Table, MetaData, String meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/041_add_config_drive_to_instances.py b/nova/db/sqlalchemy/migrate_repo/versions/041_add_config_drive_to_instances.py index d3058f00d802..b647c9eeb8f0 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/041_add_config_drive_to_instances.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/041_add_config_drive_to_instances.py @@ -16,8 +16,6 @@ from sqlalchemy import Column, Integer, MetaData, String, Table -from nova import utils - meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/042_add_volume_types_and_extradata.py b/nova/db/sqlalchemy/migrate_repo/versions/042_add_volume_types_and_extradata.py index a69ca7599a49..805a33b73166 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/042_add_volume_types_and_extradata.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/042_add_volume_types_and_extradata.py @@ -16,7 +16,7 @@ # under the License. from sqlalchemy import Column, DateTime, Integer, MetaData, String, Table -from sqlalchemy import Text, Boolean, ForeignKey +from sqlalchemy import Boolean, ForeignKey from nova import log as logging diff --git a/nova/db/sqlalchemy/migrate_repo/versions/043_add_vsa_data.py b/nova/db/sqlalchemy/migrate_repo/versions/043_add_vsa_data.py index 844643704b99..893668db02ab 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/043_add_vsa_data.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/043_add_vsa_data.py @@ -16,7 +16,7 @@ # under the License. from sqlalchemy import Column, DateTime, Integer, MetaData, String, Table -from sqlalchemy import Text, Boolean, ForeignKey +from sqlalchemy import Boolean from nova import log as logging diff --git a/nova/db/sqlalchemy/migrate_repo/versions/044_update_instance_states.py b/nova/db/sqlalchemy/migrate_repo/versions/044_update_instance_states.py index e58ae53624e7..0484743acbe4 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/044_update_instance_states.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/044_update_instance_states.py @@ -14,7 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -import sqlalchemy from sqlalchemy import MetaData, Table, Column, String from nova.compute import task_states diff --git a/nova/db/sqlalchemy/migrate_repo/versions/045_add_network_priority.py b/nova/db/sqlalchemy/migrate_repo/versions/045_add_network_priority.py index b9b0ea37cec8..8f2cf959136c 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/045_add_network_priority.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/045_add_network_priority.py @@ -17,7 +17,6 @@ from sqlalchemy import * from migrate import * from nova import log as logging -from nova import utils meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/047_remove_instances_fk_from_vif.py b/nova/db/sqlalchemy/migrate_repo/versions/047_remove_instances_fk_from_vif.py index 6487ff6f4416..f79b59d32d5d 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/047_remove_instances_fk_from_vif.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/047_remove_instances_fk_from_vif.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Integer, MetaData, Table +from sqlalchemy import MetaData, Table from migrate import ForeignKeyConstraint from nova import log as logging diff --git a/nova/db/sqlalchemy/migrate_repo/versions/052_kill_export_devices.py b/nova/db/sqlalchemy/migrate_repo/versions/052_kill_export_devices.py index 43a2954e5a98..12e8ca840dd9 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/052_kill_export_devices.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/052_kill_export_devices.py @@ -15,7 +15,7 @@ # under the License. from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer -from sqlalchemy import MetaData, String, Table +from sqlalchemy import MetaData, Table from nova import log as logging meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/058_rename_managed_disk.py b/nova/db/sqlalchemy/migrate_repo/versions/058_rename_managed_disk.py index 7d25adea2f55..6c51371e34f7 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/058_rename_managed_disk.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/058_rename_managed_disk.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Integer, MetaData, String, Table +from sqlalchemy import MetaData, Table meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/060_remove_network_fk_from_vif.py b/nova/db/sqlalchemy/migrate_repo/versions/060_remove_network_fk_from_vif.py index 7b4c470a782c..50ec2315886e 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/060_remove_network_fk_from_vif.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/060_remove_network_fk_from_vif.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Column, Integer, MetaData, Table +from sqlalchemy import MetaData, Table from migrate import ForeignKeyConstraint from nova import log as logging diff --git a/nova/db/sqlalchemy/migrate_repo/versions/062_add_instance_info_cache_table.py b/nova/db/sqlalchemy/migrate_repo/versions/062_add_instance_info_cache_table.py index 99479bbf9a4f..ef06d1345e19 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/062_add_instance_info_cache_table.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/062_add_instance_info_cache_table.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import datetime - from sqlalchemy import * from migrate import * diff --git a/nova/db/sqlalchemy/migrate_repo/versions/064_change_instance_id_to_uuid_in_instance_actions.py b/nova/db/sqlalchemy/migrate_repo/versions/064_change_instance_id_to_uuid_in_instance_actions.py index 1370efb559ab..df9d7302804c 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/064_change_instance_id_to_uuid_in_instance_actions.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/064_change_instance_id_to_uuid_in_instance_actions.py @@ -17,7 +17,6 @@ import sqlalchemy from sqlalchemy import select, Column, ForeignKey, Integer, String -from migrate import ForeignKeyConstraint from nova import log as logging diff --git a/nova/db/sqlalchemy/migrate_repo/versions/066_preload_instance_info_cache_table.py b/nova/db/sqlalchemy/migrate_repo/versions/066_preload_instance_info_cache_table.py index a92dd434b20f..67a618e0cdfa 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/066_preload_instance_info_cache_table.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/066_preload_instance_info_cache_table.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import datetime import json from sqlalchemy import * diff --git a/nova/db/sqlalchemy/migrate_repo/versions/068_add_instance_attribute.py b/nova/db/sqlalchemy/migrate_repo/versions/068_add_instance_attribute.py index 09d88dbab8c3..00e2b19947e2 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/068_add_instance_attribute.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/068_add_instance_attribute.py @@ -13,7 +13,7 @@ # under the License. from sqlalchemy import MetaData -from sqlalchemy import Boolean, String +from sqlalchemy import Boolean from sqlalchemy import Column, Table meta = MetaData() diff --git a/nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py b/nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py index a16cd4dc82e7..476098530f75 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py @@ -16,8 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy import Boolean, Column, DateTime, Integer, MetaData -from sqlalchemy import Table, Text +from sqlalchemy import Column, Integer, MetaData, Table from nova import log as logging meta = MetaData() diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py index 36559fa45ed8..b4545d7aaf0c 100644 --- a/nova/network/quantum/manager.py +++ b/nova/network/quantum/manager.py @@ -25,7 +25,6 @@ from nova import db from nova import exception from nova import flags from nova import log as logging -from nova import manager from nova.network import manager from nova.network.quantum import quantum_connection from nova.network.quantum import melange_ipam_lib diff --git a/nova/network/quantum/nova_ipam_lib.py b/nova/network/quantum/nova_ipam_lib.py index 2831d7c9b4d9..c176b5f96c1a 100644 --- a/nova/network/quantum/nova_ipam_lib.py +++ b/nova/network/quantum/nova_ipam_lib.py @@ -23,8 +23,6 @@ from nova import flags from nova import ipv6 from nova import log as logging from nova.network import manager -from nova.network.quantum import melange_connection as melange -from nova import utils LOG = logging.getLogger("nova.network.quantum.nova_ipam_lib") diff --git a/nova/network/quantum/quantum_connection.py b/nova/network/quantum/quantum_connection.py index d3b403822de9..aa2a30325b8c 100644 --- a/nova/network/quantum/quantum_connection.py +++ b/nova/network/quantum/quantum_connection.py @@ -18,7 +18,6 @@ from nova import flags from nova import log as logging from nova.network.quantum import client as quantum_client -from nova import utils LOG = logging.getLogger("nova.network.quantum.quantum_connection") diff --git a/nova/notifier/test_notifier.py b/nova/notifier/test_notifier.py index d43f43e48672..1fa7a66be61b 100644 --- a/nova/notifier/test_notifier.py +++ b/nova/notifier/test_notifier.py @@ -13,10 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json - from nova import flags -from nova import log as logging FLAGS = flags.FLAGS diff --git a/nova/scheduler/distributed_scheduler.py b/nova/scheduler/distributed_scheduler.py index a7cd97da9f69..754945fe539a 100644 --- a/nova/scheduler/distributed_scheduler.py +++ b/nova/scheduler/distributed_scheduler.py @@ -24,7 +24,6 @@ import operator import M2Crypto -from nova.compute import api as compute_api from novaclient import v1_1 as novaclient from novaclient import exceptions as novaclient_exceptions from nova import crypto @@ -32,10 +31,8 @@ from nova import db from nova import exception from nova import flags from nova import log as logging -from nova import rpc from nova.scheduler import api from nova.scheduler import driver -from nova.scheduler import filters from nova.scheduler import least_cost from nova.scheduler import scheduler_options from nova import utils diff --git a/nova/scheduler/filters/abstract_filter.py b/nova/scheduler/filters/abstract_filter.py index 45fcd3ea1515..2ce2350942b7 100644 --- a/nova/scheduler/filters/abstract_filter.py +++ b/nova/scheduler/filters/abstract_filter.py @@ -14,9 +14,6 @@ # under the License. -import nova.scheduler - - class AbstractHostFilter(object): """Base class for host filters.""" def instance_type_to_filter(self, instance_type): diff --git a/nova/scheduler/filters/all_hosts_filter.py b/nova/scheduler/filters/all_hosts_filter.py index 6ca4c281e2f9..9e3bc5a39741 100644 --- a/nova/scheduler/filters/all_hosts_filter.py +++ b/nova/scheduler/filters/all_hosts_filter.py @@ -14,7 +14,6 @@ # under the License. -import nova.scheduler import abstract_filter diff --git a/nova/scheduler/filters/instance_type_filter.py b/nova/scheduler/filters/instance_type_filter.py index 7e05cb9e7e89..1b490dd5ac0f 100644 --- a/nova/scheduler/filters/instance_type_filter.py +++ b/nova/scheduler/filters/instance_type_filter.py @@ -15,7 +15,6 @@ import logging -import nova.scheduler from nova.scheduler.filters import abstract_filter diff --git a/nova/scheduler/filters/json_filter.py b/nova/scheduler/filters/json_filter.py index 692a330bb927..a64a5f5ed98a 100644 --- a/nova/scheduler/filters/json_filter.py +++ b/nova/scheduler/filters/json_filter.py @@ -17,7 +17,6 @@ import json import operator -import nova.scheduler from nova.scheduler.filters import abstract_filter diff --git a/nova/scheduler/least_cost.py b/nova/scheduler/least_cost.py index 7e12ca390865..bb9c78e80c48 100644 --- a/nova/scheduler/least_cost.py +++ b/nova/scheduler/least_cost.py @@ -25,7 +25,6 @@ is then selected for provisioning. from nova import flags from nova import log as logging -from nova import exception LOG = logging.getLogger('nova.scheduler.least_cost') diff --git a/nova/scheduler/zone_manager.py b/nova/scheduler/zone_manager.py index e7c7b6114f4c..3835b6233c73 100644 --- a/nova/scheduler/zone_manager.py +++ b/nova/scheduler/zone_manager.py @@ -18,7 +18,6 @@ ZoneManager oversees all communications with child Zones. """ import datetime -import thread import traceback import UserDict diff --git a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py index 7c8a8b09f3d4..64b206aef52d 100644 --- a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py +++ b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py @@ -23,10 +23,7 @@ from nova.api import auth from nova.api.openstack import compute from nova.api.openstack.compute import wsgi from nova.api.openstack.compute.contrib import cloudpipe -from nova.auth import manager -from nova.cloudpipe import pipelib from nova import context -from nova import crypto from nova import db from nova import flags from nova import test diff --git a/nova/tests/api/openstack/compute/contrib/test_deferred_delete.py b/nova/tests/api/openstack/compute/contrib/test_deferred_delete.py index 4addcf5c844d..d81ae8ef90b2 100644 --- a/nova/tests/api/openstack/compute/contrib/test_deferred_delete.py +++ b/nova/tests/api/openstack/compute/contrib/test_deferred_delete.py @@ -15,7 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import mox import webob from nova.api.openstack.compute.contrib import deferred_delete diff --git a/nova/tests/api/openstack/compute/contrib/test_floating_ip_dns.py b/nova/tests/api/openstack/compute/contrib/test_floating_ip_dns.py index 3107e50c4dec..9bc6aa6c585a 100644 --- a/nova/tests/api/openstack/compute/contrib/test_floating_ip_dns.py +++ b/nova/tests/api/openstack/compute/contrib/test_floating_ip_dns.py @@ -13,21 +13,15 @@ # License for the specific language governing permissions and limitations # under the License. -import sys - from lxml import etree -import webob import urllib -from nova.api.openstack.compute.contrib import floating_ips from nova.api.openstack.compute.contrib import floating_ip_dns from nova import context from nova import db from nova import network -from nova import rpc from nova import test from nova.tests.api.openstack import fakes -from nova import utils name = "arbitraryname" diff --git a/nova/tests/api/openstack/compute/contrib/test_security_groups.py b/nova/tests/api/openstack/compute/contrib/test_security_groups.py index e4ea99f40da8..76e9cab3f575 100644 --- a/nova/tests/api/openstack/compute/contrib/test_security_groups.py +++ b/nova/tests/api/openstack/compute/contrib/test_security_groups.py @@ -24,7 +24,6 @@ from nova.api.openstack.compute.contrib import security_groups from nova.api.openstack import wsgi import nova.db from nova import exception -from nova import utils from nova import test from nova.tests.api.openstack import fakes diff --git a/nova/tests/api/openstack/compute/test_api.py b/nova/tests/api/openstack/compute/test_api.py index 15768ff333b5..da23ee711023 100644 --- a/nova/tests/api/openstack/compute/test_api.py +++ b/nova/tests/api/openstack/compute/test_api.py @@ -24,7 +24,6 @@ from webob import Request from nova import test from nova.api import openstack as openstack_api -from nova.api.openstack import compute from nova.api.openstack.compute import wsgi from nova.tests.api.openstack import fakes diff --git a/nova/tests/api/openstack/compute/test_consoles.py b/nova/tests/api/openstack/compute/test_consoles.py index f58e76a3f11a..00239d99cbee 100644 --- a/nova/tests/api/openstack/compute/test_consoles.py +++ b/nova/tests/api/openstack/compute/test_consoles.py @@ -17,7 +17,6 @@ # under the License. import datetime -import json from lxml import etree import webob @@ -29,7 +28,6 @@ from nova.compute import vm_states from nova import exception from nova import flags from nova import test -from nova.tests.api.openstack import common from nova.tests.api.openstack import fakes from nova import utils diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py index 8d810c4a0526..77c89d47db6b 100644 --- a/nova/tests/api/openstack/compute/test_servers.py +++ b/nova/tests/api/openstack/compute/test_servers.py @@ -33,7 +33,6 @@ from nova.compute import instance_types from nova.compute import task_states from nova.compute import vm_states import nova.db -from nova.db.sqlalchemy.models import InstanceActions from nova.db.sqlalchemy.models import InstanceMetadata from nova import flags import nova.image.fake diff --git a/nova/tests/api/openstack/volume/test_volumes.py b/nova/tests/api/openstack/volume/test_volumes.py index 2f17c4b223f4..d2738b531ab2 100644 --- a/nova/tests/api/openstack/volume/test_volumes.py +++ b/nova/tests/api/openstack/volume/test_volumes.py @@ -14,17 +14,12 @@ # under the License. import datetime -import json from lxml import etree -import webob -import nova from nova.api.openstack.volume import volumes -from nova.compute import instance_types from nova import flags from nova import test -from nova.tests.api.openstack import fakes FLAGS = flags.FLAGS diff --git a/nova/tests/api/test_wsgi.py b/nova/tests/api/test_wsgi.py index d33268296160..6504e664d6f5 100644 --- a/nova/tests/api/test_wsgi.py +++ b/nova/tests/api/test_wsgi.py @@ -21,13 +21,11 @@ Test WSGI basics and provide some helper functions for other WSGI tests. """ -import json from nova import test import routes import webob -from nova import exception from nova import wsgi diff --git a/nova/tests/db/fakes.py b/nova/tests/db/fakes.py index ef3162eb4ca5..45045989cac7 100644 --- a/nova/tests/db/fakes.py +++ b/nova/tests/db/fakes.py @@ -18,12 +18,8 @@ """Stubouts, mocks and fixtures for the test suite""" -import time - from nova import db from nova import exception -from nova import test -from nova import utils class FakeModel(object): diff --git a/nova/tests/integrated/test_extensions.py b/nova/tests/integrated/test_extensions.py index 70c998ef0485..e30419ed935a 100644 --- a/nova/tests/integrated/test_extensions.py +++ b/nova/tests/integrated/test_extensions.py @@ -15,8 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import os - from nova.api.openstack.compute import extensions from nova import flags from nova.log import logging diff --git a/nova/tests/notifier/test_list_notifier.py b/nova/tests/notifier/test_list_notifier.py index b77720759673..d71bb279f38a 100644 --- a/nova/tests/notifier/test_list_notifier.py +++ b/nova/tests/notifier/test_list_notifier.py @@ -13,15 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -import stubout -import sys - import nova from nova import log as logging import nova.notifier.api from nova.notifier.api import notify -from nova.notifier import log_notifier -from nova.notifier import no_op_notifier +import nova.notifier.log_notifier +import nova.notifier.no_op_notifier from nova.notifier import list_notifier from nova import test @@ -32,7 +29,6 @@ class NotifierListTestCase(test.TestCase): def setUp(self): super(NotifierListTestCase, self).setUp() list_notifier._reset_drivers() - self.stubs = stubout.StubOutForTesting() # Mock log to add one to exception_count when log.exception is called def mock_exception(cls, *args): diff --git a/nova/tests/rpc/test_carrot.py b/nova/tests/rpc/test_carrot.py index fa9f739615b7..2523810d8aa5 100644 --- a/nova/tests/rpc/test_carrot.py +++ b/nova/tests/rpc/test_carrot.py @@ -19,7 +19,6 @@ Unit Tests for remote procedure calls using carrot """ -from nova import context from nova import log as logging from nova.rpc import impl_carrot from nova.tests.rpc import common diff --git a/nova/tests/rpc/test_kombu.py b/nova/tests/rpc/test_kombu.py index dc100cf12aee..255de275ee37 100644 --- a/nova/tests/rpc/test_kombu.py +++ b/nova/tests/rpc/test_kombu.py @@ -19,7 +19,6 @@ Unit Tests for remote procedure calls using kombu """ -from nova import context from nova import log as logging from nova import test from nova.rpc import impl_kombu diff --git a/nova/tests/scheduler/test_distributed_scheduler.py b/nova/tests/scheduler/test_distributed_scheduler.py index 36d2ddc5b04d..412c981c583e 100644 --- a/nova/tests/scheduler/test_distributed_scheduler.py +++ b/nova/tests/scheduler/test_distributed_scheduler.py @@ -22,9 +22,7 @@ import nova.db from nova import context from nova import exception -from nova import rpc from nova import test -from nova.compute import api as compute_api from nova.scheduler import distributed_scheduler from nova.scheduler import least_cost from nova.scheduler import zone_manager diff --git a/nova/tests/scheduler/test_host_filter.py b/nova/tests/scheduler/test_host_filter.py index 62131a625344..797ec3fe9540 100644 --- a/nova/tests/scheduler/test_host_filter.py +++ b/nova/tests/scheduler/test_host_filter.py @@ -22,7 +22,6 @@ import nova from nova import exception from nova import test from nova.scheduler import distributed_scheduler as dist -from nova.scheduler import zone_manager from nova.tests.scheduler import fake_zone_manager as ds_fakes diff --git a/nova/tests/scheduler/test_least_cost.py b/nova/tests/scheduler/test_least_cost.py index 4a3af2eac8ac..65a4268d371b 100644 --- a/nova/tests/scheduler/test_least_cost.py +++ b/nova/tests/scheduler/test_least_cost.py @@ -16,7 +16,6 @@ Tests For Least Cost functions. """ from nova.scheduler import least_cost -from nova.scheduler import zone_manager from nova import test from nova.tests.scheduler import fake_zone_manager diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py index 55096484454a..b612b86aca29 100644 --- a/nova/tests/scheduler/test_scheduler.py +++ b/nova/tests/scheduler/test_scheduler.py @@ -21,7 +21,6 @@ Tests For Scheduler import datetime import mox -import stubout from novaclient import v1_1 as novaclient from novaclient import exceptions as novaclient_exceptions @@ -36,7 +35,6 @@ from nova import rpc from nova import utils from nova.scheduler import api from nova.scheduler import driver -from nova.scheduler import zone_manager from nova.scheduler import manager from nova.scheduler.simple import SimpleScheduler from nova.compute import power_state diff --git a/nova/tests/scheduler/test_vsa_scheduler.py b/nova/tests/scheduler/test_vsa_scheduler.py index 9a74c9948452..cc141897ea12 100644 --- a/nova/tests/scheduler/test_vsa_scheduler.py +++ b/nova/tests/scheduler/test_vsa_scheduler.py @@ -13,12 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -import stubout - import nova from nova import context -from nova import db from nova import exception from nova import flags from nova import log as logging diff --git a/nova/tests/test_adminapi.py b/nova/tests/test_adminapi.py index 41dbc3e925ef..dba2a2780c2f 100644 --- a/nova/tests/test_adminapi.py +++ b/nova/tests/test_adminapi.py @@ -16,8 +16,6 @@ # License for the specific language governing permissions and limitations # under the License. -from eventlet import greenthread - from nova import context from nova import db from nova import flags diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py index cb33df2bb11b..f7548ceb48c9 100644 --- a/nova/tests/test_api.py +++ b/nova/tests/test_api.py @@ -31,7 +31,6 @@ from nova import block_device from nova import context from nova import exception from nova import test -from nova import wsgi from nova.api import auth from nova.api import ec2 from nova.api.ec2 import apirequest diff --git a/nova/tests/test_cfg.py b/nova/tests/test_cfg.py index 440b7acc7e56..f150df31914b 100644 --- a/nova/tests/test_cfg.py +++ b/nova/tests/test_cfg.py @@ -18,7 +18,6 @@ import os import sys import StringIO import tempfile -import unittest import stubout diff --git a/nova/tests/test_flags.py b/nova/tests/test_flags.py index ae0c19ada573..b5fe11983b6c 100644 --- a/nova/tests/test_flags.py +++ b/nova/tests/test_flags.py @@ -21,7 +21,6 @@ import exceptions import os import tempfile -from nova import exception from nova import flags from nova import test diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py index aa277206fafe..2def437312f8 100644 --- a/nova/tests/test_instance_types.py +++ b/nova/tests/test_instance_types.py @@ -23,7 +23,6 @@ from nova import exception from nova import flags from nova import log as logging from nova import test -from nova import utils from nova.compute import instance_types from nova.db.sqlalchemy.session import get_session from nova.db.sqlalchemy import models diff --git a/nova/tests/test_instance_types_extra_specs.py b/nova/tests/test_instance_types_extra_specs.py index fd49c276b3de..999e5a1260fb 100644 --- a/nova/tests/test_instance_types_extra_specs.py +++ b/nova/tests/test_instance_types_extra_specs.py @@ -19,8 +19,6 @@ Unit Tests for instance types extra specs code from nova import context from nova import db from nova import test -from nova.db.sqlalchemy.session import get_session -from nova.db.sqlalchemy import models class InstanceTypeExtraSpecsTestCase(test.TestCase): diff --git a/nova/tests/test_iptables_network.py b/nova/tests/test_iptables_network.py index 478dfa70d7c7..6a0202644289 100644 --- a/nova/tests/test_iptables_network.py +++ b/nova/tests/test_iptables_network.py @@ -17,8 +17,6 @@ # under the License. """Unit Tests for network code.""" -import os - from nova import test from nova.network import linux_net diff --git a/nova/tests/test_ipv6.py b/nova/tests/test_ipv6.py index e1ba4aafb141..f4641c147c1b 100644 --- a/nova/tests/test_ipv6.py +++ b/nova/tests/test_ipv6.py @@ -22,8 +22,6 @@ from nova import test LOG = logging.getLogger('nova.tests.test_ipv6') -import sys - class IPv6RFC2462TestCase(test.TestCase): """Unit tests for IPv6 rfc2462 backend operations.""" diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 782e01563396..8334e6f9484a 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -20,7 +20,6 @@ import mox import os import re import shutil -import sys import tempfile from xml.etree.ElementTree import fromstring as xml_to_tree diff --git a/nova/tests/test_localization.py b/nova/tests/test_localization.py index a25809a7916c..3011b8b28ed7 100644 --- a/nova/tests/test_localization.py +++ b/nova/tests/test_localization.py @@ -14,11 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -import glob import os import re -import sys -import unittest import nova from nova import test diff --git a/nova/tests/test_network_info.py b/nova/tests/test_network_info.py index 1fd30dc9a357..7627c29f6c5c 100644 --- a/nova/tests/test_network_info.py +++ b/nova/tests/test_network_info.py @@ -15,8 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import json - from nova import exception from nova import log as logging from nova.network import model diff --git a/nova/tests/test_notifier.py b/nova/tests/test_notifier.py index 70a0ec5d5dcb..00f367f49882 100644 --- a/nova/tests/test_notifier.py +++ b/nova/tests/test_notifier.py @@ -16,15 +16,9 @@ import stubout import nova -from nova import context -from nova import flags from nova import log -from nova import rpc import nova.notifier.api from nova.notifier.api import notify -from nova.notifier import no_op_notifier -from nova.notifier import rabbit_notifier -from nova.rpc import impl_kombu from nova import test diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py index 5e124413fc68..354e9d98c9b5 100644 --- a/nova/tests/test_nova_manage.py +++ b/nova/tests/test_nova_manage.py @@ -28,13 +28,11 @@ sys.dont_write_bytecode = True import imp nova_manage = imp.load_source('nova_manage.py', NOVA_MANAGE_PATH) sys.dont_write_bytecode = False -import mox import stubout import StringIO from nova import context from nova import db -from nova import exception from nova import test from nova.tests.db import fakes as db_fakes diff --git a/nova/tests/test_quantum.py b/nova/tests/test_quantum.py index 8e8a8511c543..51cdda495e31 100644 --- a/nova/tests/test_quantum.py +++ b/nova/tests/test_quantum.py @@ -15,14 +15,11 @@ # License for the specific language governing permissions and limitations # under the License. -import stubout - from nova import context from nova import db from nova.db.sqlalchemy import models from nova.db.sqlalchemy.session import get_session from nova import exception -from nova import ipv6 from nova import log as logging from nova.network.quantum import manager as quantum_manager from nova.network.quantum import melange_connection @@ -30,8 +27,6 @@ from nova import test from nova import utils from nova.network import manager -import mox - LOG = logging.getLogger('nova.tests.quantum_network') diff --git a/nova/tests/test_service.py b/nova/tests/test_service.py index 0e9ffda35281..99f091b22a09 100644 --- a/nova/tests/test_service.py +++ b/nova/tests/test_service.py @@ -26,12 +26,10 @@ from nova import context from nova import db from nova import exception from nova import flags -from nova import rpc from nova import test from nova import service from nova import manager from nova import wsgi -from nova.compute import manager as compute_manager flags.DEFINE_string("fake_manager", "nova.tests.test_service.FakeManager", "Manager for testing") diff --git a/nova/tests/test_versions.py b/nova/tests/test_versions.py index 4621b042b6b8..cec418aee9d1 100644 --- a/nova/tests/test_versions.py +++ b/nova/tests/test_versions.py @@ -15,9 +15,7 @@ # under the License. -from nova import exception from nova import test -from nova import utils from nova import version diff --git a/nova/tests/test_volume_types.py b/nova/tests/test_volume_types.py index 1e190805cf2a..1e4a600a7324 100644 --- a/nova/tests/test_volume_types.py +++ b/nova/tests/test_volume_types.py @@ -19,12 +19,10 @@ Unit Tests for volume types code import time from nova import context -from nova import db from nova import exception from nova import flags from nova import log as logging from nova import test -from nova import utils from nova.volume import volume_types from nova.db.sqlalchemy.session import get_session from nova.db.sqlalchemy import models diff --git a/nova/tests/test_volume_types_extra_specs.py b/nova/tests/test_volume_types_extra_specs.py index 0a1f1a464942..9ff778bb2d7b 100644 --- a/nova/tests/test_volume_types_extra_specs.py +++ b/nova/tests/test_volume_types_extra_specs.py @@ -21,8 +21,6 @@ Unit Tests for volume types extra specs code from nova import context from nova import db from nova import test -from nova.db.sqlalchemy.session import get_session -from nova.db.sqlalchemy import models class VolumeTypeExtraSpecsTestCase(test.TestCase): diff --git a/nova/tests/test_vsa.py b/nova/tests/test_vsa.py index 271747fec7cc..d7c8f09f5b5f 100644 --- a/nova/tests/test_vsa.py +++ b/nova/tests/test_vsa.py @@ -17,10 +17,8 @@ import base64 import stubout from xml.etree import ElementTree -from xml.etree.ElementTree import Element, SubElement from nova import context -from nova import db from nova import exception from nova import flags from nova import log as logging diff --git a/nova/tests/test_vsa_volumes.py b/nova/tests/test_vsa_volumes.py index b7cd4e840286..ef6396ff4696 100644 --- a/nova/tests/test_vsa_volumes.py +++ b/nova/tests/test_vsa_volumes.py @@ -13,13 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -import stubout - from nova import exception from nova import flags from nova import vsa from nova import volume -from nova import db from nova import context from nova import test from nova import log as logging @@ -33,7 +30,6 @@ class VsaVolumesTestCase(test.TestCase): def setUp(self): super(VsaVolumesTestCase, self).setUp() - self.stubs = stubout.StubOutForTesting() self.vsa_api = vsa.API() self.volume_api = volume.API() self.context = context.get_admin_context() diff --git a/nova/tests/test_zones.py b/nova/tests/test_zones.py index 9b5b9b24a8c9..703ff0bf9a96 100644 --- a/nova/tests/test_zones.py +++ b/nova/tests/test_zones.py @@ -19,14 +19,10 @@ Tests For ZoneManager import datetime import mox -from nova import context from nova import db from nova import flags -from nova import service from nova import test -from nova import rpc from nova import utils -from nova.auth import manager as auth_manager from nova.scheduler import zone_manager FLAGS = flags.FLAGS diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 6e24bdc34f88..c0de0dd377c6 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -15,7 +15,6 @@ """Stubouts, mocks and fixtures for the test suite""" -import eventlet import json import random diff --git a/nova/virt/xenapi/firewall.py b/nova/virt/xenapi/firewall.py index 282e12d9ee96..8f6f17de3906 100644 --- a/nova/virt/xenapi/firewall.py +++ b/nova/virt/xenapi/firewall.py @@ -19,12 +19,9 @@ import json -from nova import context -from nova import db from nova import flags from nova import log as logging from nova.virt.firewall import IptablesFirewallDriver -from nova.virt import netutils LOG = logging.getLogger("nova.virt.xenapi.firewall") diff --git a/nova/vnc/proxy.py b/nova/vnc/proxy.py index 2e3e38ca9506..376db40c15d5 100644 --- a/nova/vnc/proxy.py +++ b/nova/vnc/proxy.py @@ -22,7 +22,6 @@ import base64 import os import eventlet -from eventlet import wsgi from eventlet import websocket import webob diff --git a/nova/volume/manager.py b/nova/volume/manager.py index 19c2eb9c0687..63eb046649d5 100644 --- a/nova/volume/manager.py +++ b/nova/volume/manager.py @@ -38,8 +38,6 @@ intact. """ -import sys - from nova import context from nova import exception from nova import flags diff --git a/nova/volume/xensm.py b/nova/volume/xensm.py index a50362899adc..bf219f273f6d 100644 --- a/nova/volume/xensm.py +++ b/nova/volume/xensm.py @@ -12,10 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -import sys -import time -import os - from nova import exception from nova import flags from nova import log as logging diff --git a/nova/vsa/api.py b/nova/vsa/api.py index 4f6c5c271d26..9f17b6e4ed45 100644 --- a/nova/vsa/api.py +++ b/nova/vsa/api.py @@ -26,7 +26,6 @@ For assistance and guidelines pls contact import sys from nova import compute -from nova import db from nova import exception from nova import flags from nova import log as logging diff --git a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py index 662def205f70..fea9849f1290 100755 --- a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py +++ b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py @@ -22,7 +22,6 @@ XenServer hosts. """ import os -import subprocess import sys # This is written to Python 2.4, since that is what is available on XenServer diff --git a/setup.py b/setup.py index 9eb9ef92b707..ec3e8e2c7e5e 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,8 @@ import gettext import glob import os -import subprocess -import sys from setuptools import find_packages -from setuptools.command.sdist import sdist # In order to run the i18n commands for compiling and # installing message catalogs, we use DistUtilsExtra.