From: Angus Salkeld Date: Mon, 19 Nov 2012 05:11:50 +0000 (+1100) Subject: Remove unused imports X-Git-Tag: 2014.1~1201 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1e07e38d0b17a962bd78d3b63f77444927d38410;p=openstack-build%2Fheat-build.git Remove unused imports Change-Id: I4977a34b758f3dd2b5a4772dc074af2f0c715175 --- diff --git a/heat/api/aws/ec2token.py b/heat/api/aws/ec2token.py index bab3fb06..dec0afd5 100644 --- a/heat/api/aws/ec2token.py +++ b/heat/api/aws/ec2token.py @@ -16,17 +16,13 @@ import json import urlparse import httplib -import routes import gettext gettext.install('heat', unicode=1) from heat.common import wsgi -from webob import Request import webob -from heat import utils -from heat.common import context from heat.api.aws import exception from heat.openstack.common import log as logging diff --git a/heat/api/cfn/v1/__init__.py b/heat/api/cfn/v1/__init__.py index ca95e010..9d259a7c 100644 --- a/heat/api/cfn/v1/__init__.py +++ b/heat/api/cfn/v1/__init__.py @@ -13,20 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -import json -import urlparse -import httplib import routes -from heat.api.cfn.v1 import stacks -from heat.common import wsgi - from webob import Request -import webob -from heat import utils -from heat.common import context -from heat.api.aws import exception +from heat.api.cfn.v1 import stacks +from heat.common import wsgi from heat.openstack.common import log as logging logger = logging.getLogger(__name__) diff --git a/heat/api/cfn/v1/stacks.py b/heat/api/cfn/v1/stacks.py index 42f33173..0be854ca 100644 --- a/heat/api/cfn/v1/stacks.py +++ b/heat/api/cfn/v1/stacks.py @@ -19,24 +19,19 @@ Stack endpoint for Heat CloudFormation v1 API. import httplib import json -import os import socket -import sys import urlparse -import webob from heat.api.aws import exception from heat.api.aws import utils as api_utils from heat.common import wsgi -from heat.common import config -from heat.common import context -from heat import utils from heat.engine import rpcapi as engine_rpcapi import heat.engine.api as engine_api from heat.engine import identifier -from heat.openstack.common import rpc import heat.openstack.common.rpc.common as rpc_common + from heat.openstack.common import log as logging +from heat.openstack.common.gettextutils import _ logger = logging.getLogger('heat.api.cfn.v1.stacks') diff --git a/heat/api/cloudwatch/__init__.py b/heat/api/cloudwatch/__init__.py index 823b757b..73076bc2 100644 --- a/heat/api/cloudwatch/__init__.py +++ b/heat/api/cloudwatch/__init__.py @@ -13,9 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import json -import urlparse -import httplib import routes import gettext @@ -25,10 +22,6 @@ from heat.api.cloudwatch import watch from heat.common import wsgi from webob import Request -import webob -from heat import utils -from heat.common import context -from heat.api.aws import exception from heat.api.middleware.version_negotiation import VersionNegotiationFilter from heat.api.cloudwatch import versions diff --git a/heat/api/cloudwatch/watch.py b/heat/api/cloudwatch/watch.py index 726146be..ac6f3504 100644 --- a/heat/api/cloudwatch/watch.py +++ b/heat/api/cloudwatch/watch.py @@ -16,20 +16,12 @@ """ endpoint for heat AWS-compatible CloudWatch API """ -import os -import sys -import re -import webob from heat.api.aws import exception from heat.api.aws import utils as api_utils from heat.common import wsgi -from heat.common import config -from heat.common import context -from heat import utils from heat.engine import rpcapi as engine_rpcapi import heat.engine.api as engine_api -from heat.openstack.common import rpc import heat.openstack.common.rpc.common as rpc_common from heat.openstack.common import log as logging diff --git a/heat/api/openstack/v1/__init__.py b/heat/api/openstack/v1/__init__.py index 446ac7fb..f95f549d 100644 --- a/heat/api/openstack/v1/__init__.py +++ b/heat/api/openstack/v1/__init__.py @@ -13,9 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import json -import urlparse -import httplib import routes import gettext @@ -25,11 +22,6 @@ from heat.api.openstack.v1 import stacks from heat.api.openstack.v1 import resources from heat.common import wsgi -from webob import Request -import webob -from heat import utils -from heat.common import context - from heat.openstack.common import log as logging logger = logging.getLogger(__name__) diff --git a/heat/common/client.py b/heat/common/client.py index ba4e294c..d70aa8d5 100644 --- a/heat/common/client.py +++ b/heat/common/client.py @@ -21,14 +21,14 @@ import collections import errno import functools import httplib -import logging import os import urllib import urlparse try: - from eventlet.green import socket, ssl + from eventlet.green import socket, socket, ssl except ImportError: + import select import socket import ssl diff --git a/heat/common/config.py b/heat/common/config.py index a89ea9bc..d56ef88f 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -22,14 +22,12 @@ import logging import logging.config import logging.handlers import os -import socket -# TODO ^ eventlet.socket ? import sys -from heat import version +from eventlet.green import socket + from heat.common import wsgi from heat.openstack.common import cfg -from heat.openstack.common import rpc DEFAULT_PORT = 8000 diff --git a/heat/common/context.py b/heat/common/context.py index ac0ff67d..3a8eb73c 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -19,7 +19,6 @@ from heat.common import wsgi from heat.openstack.common import cfg from heat.openstack.common import importutils from heat.common import utils as heat_utils -import json def generate_request_id(): diff --git a/heat/common/utils.py b/heat/common/utils.py index d4e94ad9..8556d978 100644 --- a/heat/common/utils.py +++ b/heat/common/utils.py @@ -20,16 +20,11 @@ System-level utilities and helper functions. """ -import datetime import sys import uuid from eventlet import event from eventlet import greenthread -from eventlet import semaphore -from eventlet.green import subprocess - -from heat.openstack.common import exception def chunkreadable(iter, chunk_size=65536): diff --git a/heat/common/wsgi.py b/heat/common/wsgi.py index 11d990a1..dbc6a73a 100644 --- a/heat/common/wsgi.py +++ b/heat/common/wsgi.py @@ -28,10 +28,8 @@ import os import signal import sys import time -import re from lxml import etree - import eventlet import eventlet.greenio from eventlet.green import socket, ssl @@ -45,7 +43,6 @@ import webob.exc from heat.common import exception from heat.openstack.common import cfg from heat.openstack.common import importutils -from heat.openstack.common import utils URL_LENGTH_LIMIT = 50000 diff --git a/heat/db/api.py b/heat/db/api.py index 2b6cf106..27a9db37 100644 --- a/heat/db/api.py +++ b/heat/db/api.py @@ -26,9 +26,8 @@ The underlying driver is loaded . SQLAlchemy is currently the only supported backend. ''' import heat.utils -from heat.openstack.common import utils from heat.openstack.common import cfg -import heat.utils + SQL_CONNECTION = 'sqlite://' SQL_IDLE_TIMEOUT = 3600 diff --git a/heat/db/sqlalchemy/migration.py b/heat/db/sqlalchemy/migration.py index 5af83a15..95af8d91 100644 --- a/heat/db/sqlalchemy/migration.py +++ b/heat/db/sqlalchemy/migration.py @@ -21,6 +21,8 @@ import sqlalchemy import migrate from migrate.versioning import util as migrate_util +from heat.openstack.common import exception + _REPOSITORY = None diff --git a/heat/db/sqlalchemy/models.py b/heat/db/sqlalchemy/models.py index 03abeafe..c95df804 100644 --- a/heat/db/sqlalchemy/models.py +++ b/heat/db/sqlalchemy/models.py @@ -19,7 +19,6 @@ from sqlalchemy import * from sqlalchemy.orm import relationship, backref, object_mapper from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.schema import ForeignKeyConstraint from sqlalchemy import types as types from json import dumps, loads from heat.common import utils diff --git a/heat/engine/api.py b/heat/engine/api.py index 74d4c750..0f1685f7 100644 --- a/heat/engine/api.py +++ b/heat/engine/api.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -import re from heat.openstack.common import timeutils from heat.engine import parser from heat.engine import template diff --git a/heat/engine/auth.py b/heat/engine/auth.py index 1b1a11c9..4c869cfe 100644 --- a/heat/engine/auth.py +++ b/heat/engine/auth.py @@ -13,22 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. -import json -import httplib -import urlparse import base64 -from novaclient.v1_1 import client -from novaclient.exceptions import BadRequest -from novaclient.exceptions import NotFound -from novaclient.exceptions import AuthorizationFailure -from heat.common import context -from heat.openstack.common import log as logging from Crypto.Cipher import AES from Crypto import Random from heat.openstack.common import cfg -from heat.openstack.common import importutils +from heat.openstack.common import log as logging auth_opts = [ diff --git a/heat/engine/parser.py b/heat/engine/parser.py index eda5af99..2a6e575a 100644 --- a/heat/engine/parser.py +++ b/heat/engine/parser.py @@ -14,9 +14,7 @@ # under the License. import eventlet -import json import functools -import copy from heat.common import exception from heat.engine import dependencies diff --git a/heat/engine/resources/cloud_watch.py b/heat/engine/resources/cloud_watch.py index 3feff0c3..ac05d642 100644 --- a/heat/engine/resources/cloud_watch.py +++ b/heat/engine/resources/cloud_watch.py @@ -13,10 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import eventlet -import json -import os - from heat.common import exception from heat.engine import watchrule from heat.engine.resources import resource diff --git a/heat/engine/resources/instance.py b/heat/engine/resources/instance.py index 59c28ab3..83642503 100644 --- a/heat/engine/resources/instance.py +++ b/heat/engine/resources/instance.py @@ -16,7 +16,6 @@ import eventlet import os import json -import sys from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from novaclient.exceptions import NotFound diff --git a/heat/engine/resources/loadbalancer.py b/heat/engine/resources/loadbalancer.py index 534f1f1e..b6ddc375 100644 --- a/heat/engine/resources/loadbalancer.py +++ b/heat/engine/resources/loadbalancer.py @@ -13,13 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -import urllib2 import json from heat.common import exception from heat.engine.resources import stack -from heat.db import api as db_api -from heat.engine import parser from novaclient.exceptions import NotFound from heat.openstack.common import log as logging diff --git a/heat/engine/resources/resource.py b/heat/engine/resources/resource.py index ad3fcb3f..d22a12a3 100644 --- a/heat/engine/resources/resource.py +++ b/heat/engine/resources/resource.py @@ -17,14 +17,12 @@ import base64 from datetime import datetime from heat.common import exception -from heat.common import config from heat.db import api as db_api from heat.engine import identifier from heat.engine import timestamp from heat.engine.resources.properties import Properties from heat.openstack.common import log as logging -from heat.openstack.common import cfg logger = logging.getLogger('heat.engine.resources') diff --git a/heat/engine/resources/security_group.py b/heat/engine/resources/security_group.py index d304eb0d..2b146a20 100644 --- a/heat/engine/resources/security_group.py +++ b/heat/engine/resources/security_group.py @@ -15,7 +15,6 @@ from novaclient.exceptions import BadRequest from novaclient.exceptions import NotFound -from heat.common import exception from heat.engine.resources import resource from heat.openstack.common import log as logging diff --git a/heat/engine/resources/stack.py b/heat/engine/resources/stack.py index a729b37b..592d08ed 100644 --- a/heat/engine/resources/stack.py +++ b/heat/engine/resources/stack.py @@ -18,7 +18,6 @@ import json from heat.common import exception from heat.engine.resources import resource -from heat.db import api as db_api from heat.engine import parser from heat.openstack.common import log as logging diff --git a/heat/engine/rpcapi.py b/heat/engine/rpcapi.py index 92254b27..534c6292 100644 --- a/heat/engine/rpcapi.py +++ b/heat/engine/rpcapi.py @@ -19,9 +19,7 @@ Client side of the heat engine RPC API. """ from heat.openstack.common import cfg -from heat.openstack.common import exception from heat.openstack.common import rpc -from heat.openstack.common.rpc import common as rpc_common import heat.openstack.common.rpc.proxy