Remove a whole bunch of unused imports

Change-Id: I6759e5b6250c48cc0deb4b198b44c948c64c47d1
This commit is contained in:
Vishvananda Ishaya 2012-01-13 13:54:32 -08:00
parent e08eeea94f
commit 20b4d89512
101 changed files with 18 additions and 191 deletions

View File

@ -3,7 +3,6 @@ Created on 2010/12/20
@author: Nachi Ueno <ueno.nachi@lab.ntt.co.jp>
'''
import boto
from boto.resultset import ResultSet
from boto.ec2.instance import Reservation
from boto.ec2.instance import Group

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -20,7 +20,6 @@
WSGI middleware for OpenStack API controllers.
"""
import routes
import webob.dec
import webob.exc

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -20,7 +20,6 @@
WSGI middleware for OpenStack Volume API.
"""
import routes
import webob.dec
import webob.exc

View File

@ -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")

View File

@ -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

View File

@ -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 = {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -17,8 +17,6 @@
"""Fake ConsoleProxy driver for tests."""
from nova import exception
class FakeConsoleProxy(object):
"""Fake ConsoleProxy driver."""

View File

@ -17,7 +17,6 @@
"""Console Proxy Service."""
import functools
import socket
from nova import exception

View File

@ -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

View File

@ -17,7 +17,6 @@
"""XVP (Xenserver VNC Proxy) driver."""
import fcntl
import os
import signal

View File

@ -17,8 +17,6 @@
from sqlalchemy import Column, Table, MetaData, Integer
from nova import log as logging
meta = MetaData()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import datetime
from sqlalchemy import *
from migrate import *

View File

@ -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()

View File

@ -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()

View File

@ -16,8 +16,6 @@
from sqlalchemy import Column, Integer, MetaData, String, Table
from nova import utils
meta = MetaData()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -17,7 +17,6 @@ from sqlalchemy import *
from migrate import *
from nova import log as logging
from nova import utils
meta = MetaData()

View File

@ -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

View File

@ -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()

View File

@ -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()

View File

@ -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

View File

@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import datetime
from sqlalchemy import *
from migrate import *

View File

@ -17,7 +17,6 @@
import sqlalchemy
from sqlalchemy import select, Column, ForeignKey, Integer, String
from migrate import ForeignKeyConstraint
from nova import log as logging

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import datetime
import json
from sqlalchemy import *

View File

@ -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()

View File

@ -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()

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -14,7 +14,6 @@
# under the License.
import nova.scheduler
import abstract_filter

View File

@ -15,7 +15,6 @@
import logging
import nova.scheduler
from nova.scheduler.filters import abstract_filter

View File

@ -17,7 +17,6 @@
import json
import operator
import nova.scheduler
from nova.scheduler.filters import abstract_filter

View File

@ -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')

View File

@ -18,7 +18,6 @@ ZoneManager oversees all communications with child Zones.
"""
import datetime
import thread
import traceback
import UserDict

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -18,7 +18,6 @@ import os
import sys
import StringIO
import tempfile
import unittest
import stubout

View File

@ -21,7 +21,6 @@ import exceptions
import os
import tempfile
from nova import exception
from nova import flags
from nova import test

View File

@ -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

View File

@ -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):

View File

@ -17,8 +17,6 @@
# under the License.
"""Unit Tests for network code."""
import os
from nova import test
from nova.network import linux_net

View File

@ -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."""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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")

View File

@ -15,9 +15,7 @@
# under the License.
from nova import exception
from nova import test
from nova import utils
from nova import version

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -15,7 +15,6 @@
"""Stubouts, mocks and fixtures for the test suite"""
import eventlet
import json
import random

View File

@ -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")

View File

@ -22,7 +22,6 @@ import base64
import os
import eventlet
from eventlet import wsgi
from eventlet import websocket
import webob

View File

@ -38,8 +38,6 @@ intact.
"""
import sys
from nova import context
from nova import exception
from nova import flags

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More