From: Zane Bitter Date: Thu, 13 Dec 2012 14:02:29 +0000 (+0100) Subject: Get rid of unused imports X-Git-Tag: 2014.1~1083 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f531f6fb28198ce964b5281332160c18bdccbd9d;p=openstack-build%2Fheat-build.git Get rid of unused imports This cruft just tends to build up over time... Change-Id: I61fd067b431aaa57164c7ff781c9cc8bab04bd4b Signed-off-by: Zane Bitter --- diff --git a/bin/heat-cfn b/bin/heat-cfn index 30deff66..7887ee4d 100755 --- a/bin/heat-cfn +++ b/bin/heat-cfn @@ -26,7 +26,6 @@ import os import os.path import sys import time -import json import logging import httplib diff --git a/bin/heat-watch b/bin/heat-watch index a5b185fa..b2c4280f 100755 --- a/bin/heat-watch +++ b/bin/heat-watch @@ -26,10 +26,8 @@ import os import os.path import sys import time -import json import logging -from urlparse import urlparse # If ../heat/__init__.py exists, add ../ to Python search path, so that # it will override what happens to be installed in /usr/(local/)lib/python... possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), diff --git a/heat/api/cfn/v1/waitcondition.py b/heat/api/cfn/v1/waitcondition.py index 3d4d9215..66260224 100644 --- a/heat/api/cfn/v1/waitcondition.py +++ b/heat/api/cfn/v1/waitcondition.py @@ -13,12 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from webob.exc import Response - from heat.common import wsgi from heat.common import context from heat.rpc import client as rpc_client -from heat.openstack.common import rpc from heat.common import identifier from heat.api.aws import exception import heat.openstack.common.rpc.common as rpc_common diff --git a/heat/cfn_client/boto_client.py b/heat/cfn_client/boto_client.py index 9a61111e..b08d74a8 100644 --- a/heat/cfn_client/boto_client.py +++ b/heat/cfn_client/boto_client.py @@ -21,7 +21,6 @@ from heat.openstack.common import log as logging logger = logging.getLogger(__name__) from boto.cloudformation import CloudFormationConnection -import json class BotoClient(CloudFormationConnection): diff --git a/heat/cfn_client/client.py b/heat/cfn_client/client.py index 68126536..c00db9c5 100644 --- a/heat/cfn_client/client.py +++ b/heat/cfn_client/client.py @@ -18,8 +18,6 @@ Client classes for callers of a heat system """ from lxml import etree -import os -import json from heat.common import client as base_client from heat.common import exception diff --git a/heat/common/urlfetch.py b/heat/common/urlfetch.py index db17c327..13fa9223 100644 --- a/heat/common/urlfetch.py +++ b/heat/common/urlfetch.py @@ -20,8 +20,6 @@ Utility for fetching a resource (e.g. a template) from a URL. import urllib2 import urlparse -from heat.common import exception - from heat.openstack.common import log as logging logger = logging.getLogger(__name__) diff --git a/heat/db/sqlalchemy/migrate_repo/versions/013_owner_id_uuid.py b/heat/db/sqlalchemy/migrate_repo/versions/013_owner_id_uuid.py index f1a8d8b5..1d5d6e2c 100644 --- a/heat/db/sqlalchemy/migrate_repo/versions/013_owner_id_uuid.py +++ b/heat/db/sqlalchemy/migrate_repo/versions/013_owner_id_uuid.py @@ -1,6 +1,5 @@ from sqlalchemy import * from migrate import * -from heat.common import utils def upgrade(migrate_engine): diff --git a/heat/engine/api.py b/heat/engine/api.py index 6cfea0a8..db337e32 100644 --- a/heat/engine/api.py +++ b/heat/engine/api.py @@ -14,9 +14,7 @@ from heat.rpc.api import * from heat.openstack.common import timeutils -from heat.engine import parser from heat.engine import template -from heat.engine import watchrule from heat.openstack.common import log as logging diff --git a/heat/engine/clients.py b/heat/engine/clients.py index 05ff5363..63b4c54a 100644 --- a/heat/engine/clients.py +++ b/heat/engine/clients.py @@ -32,7 +32,6 @@ except ImportError: quantumclient_present = False from heat.common import heat_keystoneclient as kc -from heat.openstack.common import cfg from heat.openstack.common import log as logging logger = logging.getLogger(__name__) diff --git a/heat/engine/resources/quantum/subnet.py b/heat/engine/resources/quantum/subnet.py index 48357eba..ab882419 100644 --- a/heat/engine/resources/quantum/subnet.py +++ b/heat/engine/resources/quantum/subnet.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from heat.common import exception - from heat.openstack.common import log as logging from heat.engine.resources.quantum import quantum diff --git a/heat/engine/resources/stack.py b/heat/engine/resources/stack.py index ab062a97..e66e5b37 100644 --- a/heat/engine/resources/stack.py +++ b/heat/engine/resources/stack.py @@ -13,9 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import urllib2 -import json - from heat.common import exception from heat.common import template_format from heat.engine import resource diff --git a/heat/engine/resources/user.py b/heat/engine/resources/user.py index cda1b010..66759ecf 100644 --- a/heat/engine/resources/user.py +++ b/heat/engine/resources/user.py @@ -14,7 +14,6 @@ # under the License. from heat.common import exception -from heat.openstack.common import cfg from heat.engine import resource from heat.openstack.common import log as logging diff --git a/heat/engine/service.py b/heat/engine/service.py index 0fa8eacd..d13a6357 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -15,7 +15,6 @@ import functools import webob -import sqlalchemy.exc from heat.common import context from heat.db import api as db_api diff --git a/heat/engine/watchrule.py b/heat/engine/watchrule.py index 59176458..dfcae8ad 100644 --- a/heat/engine/watchrule.py +++ b/heat/engine/watchrule.py @@ -21,7 +21,6 @@ from heat.engine import timestamp from heat.db import api as db_api from heat.engine import parser from heat.rpc import api as rpc_api -from heat.common import context as ctxtlib import eventlet logger = logging.getLogger(__name__) diff --git a/heat/testing/runner.py b/heat/testing/runner.py index 6327cf2d..82af7794 100755 --- a/heat/testing/runner.py +++ b/heat/testing/runner.py @@ -66,8 +66,6 @@ reldir = os.path.join(os.path.dirname(__file__), '..', '..') absdir = os.path.abspath(reldir) sys.path.insert(0, absdir) -from heat.openstack.common import cfg - class _AnsiColorizer(object): """ diff --git a/heat/tests/__init__.py b/heat/tests/__init__.py index a83367ed..caf390e2 100644 --- a/heat/tests/__init__.py +++ b/heat/tests/__init__.py @@ -18,7 +18,6 @@ import __builtin__ setattr(__builtin__, '_', lambda x: x) import os -import shutil from heat.db.sqlalchemy.session import get_engine diff --git a/heat/tests/functional/test_CFN_API_UpdateStack.py b/heat/tests/functional/test_CFN_API_UpdateStack.py index d540de4f..540d27d1 100644 --- a/heat/tests/functional/test_CFN_API_UpdateStack.py +++ b/heat/tests/functional/test_CFN_API_UpdateStack.py @@ -15,10 +15,8 @@ import os import util import verify -import re from nose.plugins.attrib import attr import unittest -import json @attr(speed='slow') diff --git a/heat/tests/functional/test_OpenShift_Prebuilt_JEOS.py b/heat/tests/functional/test_OpenShift_Prebuilt_JEOS.py index e97aad31..365ac40a 100644 --- a/heat/tests/functional/test_OpenShift_Prebuilt_JEOS.py +++ b/heat/tests/functional/test_OpenShift_Prebuilt_JEOS.py @@ -16,7 +16,6 @@ import util import verify from nose.plugins.attrib import attr import unittest -import os @attr(speed='slow') diff --git a/heat/tests/functional/util.py b/heat/tests/functional/util.py index 27d4fd62..16c9a20b 100644 --- a/heat/tests/functional/util.py +++ b/heat/tests/functional/util.py @@ -19,7 +19,6 @@ import paramiko import subprocess import hashlib import email -import json import time # for sleep import errno import tempfile @@ -28,8 +27,6 @@ import re from pkg_resources import resource_string from lxml import etree -from nose.plugins.attrib import attr -from nose import with_setup from nose.exc import SkipTest try: diff --git a/heat/tests/test_api_aws.py b/heat/tests/test_api_aws.py index 1db4f37f..d767a3d3 100644 --- a/heat/tests/test_api_aws.py +++ b/heat/tests/test_api_aws.py @@ -13,12 +13,9 @@ # under the License. -import socket -import json import unittest from nose.plugins.attrib import attr -import re from heat.api.aws import utils as api_utils diff --git a/heat/tests/test_api_cfn_v1.py b/heat/tests/test_api_cfn_v1.py index f65fe71f..7c00c9b6 100644 --- a/heat/tests/test_api_cfn_v1.py +++ b/heat/tests/test_api_cfn_v1.py @@ -13,15 +13,12 @@ # under the License. -import socket import mox import json import unittest from nose.plugins.attrib import attr -import httplib import json -import urlparse from heat.common import context from heat.common import identifier diff --git a/heat/tests/test_api_cloudwatch.py b/heat/tests/test_api_cloudwatch.py index 149390cc..1d86112f 100644 --- a/heat/tests/test_api_cloudwatch.py +++ b/heat/tests/test_api_cloudwatch.py @@ -13,20 +13,13 @@ # under the License. -import socket import mox -import json import unittest from nose.plugins.attrib import attr -import httplib -import json -import urlparse - from heat.common import context from heat.openstack.common import cfg from heat.openstack.common import rpc -import heat.openstack.common.rpc.common as rpc_common from heat.common.wsgi import Request from heat.api.aws import exception import heat.api.cloudwatch.watch as watches diff --git a/heat/tests/test_autoscaling.py b/heat/tests/test_autoscaling.py index 25f37087..e170c5c1 100644 --- a/heat/tests/test_autoscaling.py +++ b/heat/tests/test_autoscaling.py @@ -17,7 +17,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_dbinstance.py b/heat/tests/test_dbinstance.py index bba5ec39..99d3c368 100644 --- a/heat/tests/test_dbinstance.py +++ b/heat/tests/test_dbinstance.py @@ -17,7 +17,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_eip.py b/heat/tests/test_eip.py index 4482e614..74cd6268 100644 --- a/heat/tests/test_eip.py +++ b/heat/tests/test_eip.py @@ -17,7 +17,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_engine_service.py b/heat/tests/test_engine_service.py index 8a84854d..8f4f831d 100644 --- a/heat/tests/test_engine_service.py +++ b/heat/tests/test_engine_service.py @@ -17,7 +17,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr from heat.common import context diff --git a/heat/tests/test_identifier.py b/heat/tests/test_identifier.py index c1d45dda..1bceb303 100644 --- a/heat/tests/test_identifier.py +++ b/heat/tests/test_identifier.py @@ -15,8 +15,6 @@ import unittest from nose.plugins.attrib import attr -import mox -import json from heat.common import identifier diff --git a/heat/tests/test_instance.py b/heat/tests/test_instance.py index 34fa38b6..603a85da 100644 --- a/heat/tests/test_instance.py +++ b/heat/tests/test_instance.py @@ -17,15 +17,11 @@ import os import unittest import mox -import json -import sqlalchemy from nose.plugins.attrib import attr -from nose import with_setup from heat.tests.v1_1 import fakes from heat.engine.resources import instance as instances -import heat.db as db_api from heat.common import template_format from heat.engine import parser from heat.openstack.common import uuidutils diff --git a/heat/tests/test_loadbalancer.py b/heat/tests/test_loadbalancer.py index 46941b3c..63c2c618 100644 --- a/heat/tests/test_loadbalancer.py +++ b/heat/tests/test_loadbalancer.py @@ -18,7 +18,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_parameters.py b/heat/tests/test_parameters.py index aa41f98a..3080f6cc 100644 --- a/heat/tests/test_parameters.py +++ b/heat/tests/test_parameters.py @@ -15,11 +15,8 @@ import unittest from nose.plugins.attrib import attr -import mox import json -from heat.common import context -from heat.common import exception from heat.engine import parameters diff --git a/heat/tests/test_parser.py b/heat/tests/test_parser.py index 32f09472..a8080c4a 100644 --- a/heat/tests/test_parser.py +++ b/heat/tests/test_parser.py @@ -16,7 +16,6 @@ import unittest from nose.plugins.attrib import attr import mox -import json from heat.common import context from heat.common import exception diff --git a/heat/tests/test_properties.py b/heat/tests/test_properties.py index 8c6970ee..657d1798 100644 --- a/heat/tests/test_properties.py +++ b/heat/tests/test_properties.py @@ -15,7 +15,6 @@ import unittest from nose.plugins.attrib import attr -import mox from heat.engine import properties diff --git a/heat/tests/test_quantum.py b/heat/tests/test_quantum.py index 82506faa..8a81f700 100644 --- a/heat/tests/test_quantum.py +++ b/heat/tests/test_quantum.py @@ -17,7 +17,6 @@ import os import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_resource.py b/heat/tests/test_resource.py index 2720450f..83836b09 100644 --- a/heat/tests/test_resource.py +++ b/heat/tests/test_resource.py @@ -17,7 +17,6 @@ import unittest from nose.plugins.attrib import attr import mox -import json from heat.common import context from heat.engine import parser from heat.engine import resource diff --git a/heat/tests/test_s3.py b/heat/tests/test_s3.py index 0d5ca303..d5bdec7e 100644 --- a/heat/tests/test_s3.py +++ b/heat/tests/test_s3.py @@ -18,7 +18,6 @@ import re import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_template_format.py b/heat/tests/test_template_format.py index ce65735e..3925830b 100644 --- a/heat/tests/test_template_format.py +++ b/heat/tests/test_template_format.py @@ -13,10 +13,8 @@ # under the License. import json -import mox from nose.plugins.attrib import attr import os -import re import unittest import yaml diff --git a/heat/tests/test_user.py b/heat/tests/test_user.py index c90f9924..0737b8d3 100644 --- a/heat/tests/test_user.py +++ b/heat/tests/test_user.py @@ -15,8 +15,6 @@ import os -import eventlet -import json import mox import unittest diff --git a/heat/tests/test_validate.py b/heat/tests/test_validate.py index 2df58d30..50c66fb6 100644 --- a/heat/tests/test_validate.py +++ b/heat/tests/test_validate.py @@ -15,7 +15,6 @@ import unittest import mox -import json from nose.plugins.attrib import attr diff --git a/heat/tests/test_volume.py b/heat/tests/test_volume.py index 3fbdbcea..50c1f859 100644 --- a/heat/tests/test_volume.py +++ b/heat/tests/test_volume.py @@ -16,7 +16,6 @@ import os import eventlet -import json import mox import unittest diff --git a/heat/tests/test_waitcondition.py b/heat/tests/test_waitcondition.py index 65f53342..4ce75d75 100644 --- a/heat/tests/test_waitcondition.py +++ b/heat/tests/test_waitcondition.py @@ -13,7 +13,6 @@ # under the License. -import json import mox import uuid import time diff --git a/heat/tests/test_watch.py b/heat/tests/test_watch.py index 8a61a4fa..1a8891b3 100644 --- a/heat/tests/test_watch.py +++ b/heat/tests/test_watch.py @@ -16,7 +16,6 @@ import datetime import mox from nose.plugins.attrib import attr -from nose import with_setup import unittest from nose.exc import SkipTest import logging diff --git a/setup.py b/setup.py index a7556ecb..eb0066fb 100755 --- a/setup.py +++ b/setup.py @@ -13,10 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import gettext -import os -import subprocess - import setuptools from heat.openstack.common import setup diff --git a/tools/experimental_ssh_eventlet.py b/tools/experimental_ssh_eventlet.py index 723d764a..eece3ead 100755 --- a/tools/experimental_ssh_eventlet.py +++ b/tools/experimental_ssh_eventlet.py @@ -3,7 +3,6 @@ import eventlet from eventlet.green import socket import libssh2 -import time import os import random