Order imports in alphabetical order (9/9)
This patch fixes all the missed and newly introduced violations of the H306 style checking rule and enables it in tox. Change-Id: I5566e66421d5397c0103958f02ea38e6e3c68892 Implements: blueprint reduce-flake8-ignored-rules (partial)
This commit is contained in:
parent
61290febf7
commit
50ff4ec2fe
10
bin/heat-api
10
bin/heat-api
@ -30,18 +30,16 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from heat.openstack.common import gettextutils
|
|
||||||
|
|
||||||
gettextutils.install('heat', lazy=False)
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
from heat.common import wsgi
|
|
||||||
from heat.common import notify
|
from heat.common import notify
|
||||||
|
from heat.common import wsgi
|
||||||
|
from heat.openstack.common import gettextutils
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
gettextutils.install('heat', lazy=False)
|
||||||
|
|
||||||
LOG = logging.getLogger('heat.api')
|
LOG = logging.getLogger('heat.api')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -32,18 +32,16 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from heat.openstack.common import gettextutils
|
|
||||||
|
|
||||||
gettextutils.install('heat', lazy=False)
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
from heat.common import wsgi
|
|
||||||
from heat.common import notify
|
from heat.common import notify
|
||||||
|
from heat.common import wsgi
|
||||||
|
from heat.openstack.common import gettextutils
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
gettextutils.install('heat', lazy=False)
|
||||||
|
|
||||||
LOG = logging.getLogger('heat.api.cfn')
|
LOG = logging.getLogger('heat.api.cfn')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -32,18 +32,16 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from heat.openstack.common import gettextutils
|
|
||||||
|
|
||||||
gettextutils.install('heat', lazy=False)
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
from heat.common import wsgi
|
|
||||||
from heat.common import notify
|
from heat.common import notify
|
||||||
|
from heat.common import wsgi
|
||||||
|
from heat.openstack.common import gettextutils
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
gettextutils.install('heat', lazy=False)
|
||||||
|
|
||||||
LOG = logging.getLogger('heat.api.cloudwatch')
|
LOG = logging.getLogger('heat.api.cloudwatch')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -32,19 +32,16 @@ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
|
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
|
||||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||||
|
|
||||||
from heat.openstack.common import gettextutils
|
|
||||||
|
|
||||||
gettextutils.install('heat', lazy=False)
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import notify
|
from heat.common import notify
|
||||||
|
from heat.openstack.common import gettextutils
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
from heat.openstack.common import service
|
from heat.openstack.common import service
|
||||||
|
|
||||||
from heat.rpc import api as rpc_api
|
from heat.rpc import api as rpc_api
|
||||||
|
|
||||||
|
gettextutils.install('heat', lazy=False)
|
||||||
|
|
||||||
LOG = logging.getLogger('heat.engine')
|
LOG = logging.getLogger('heat.engine')
|
||||||
|
|
||||||
|
@ -24,10 +24,9 @@ POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|||||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
|
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'heat', '__init__.py')):
|
||||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||||
|
|
||||||
|
from heat.cmd import manage
|
||||||
from heat.openstack.common import gettextutils
|
from heat.openstack.common import gettextutils
|
||||||
|
|
||||||
gettextutils.install('heat')
|
gettextutils.install('heat')
|
||||||
|
|
||||||
from heat.cmd import manage
|
|
||||||
|
|
||||||
manage.main()
|
manage.main()
|
||||||
|
@ -12,16 +12,16 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.engine import parser
|
|
||||||
from heat.engine import template
|
|
||||||
from heat.engine import resource
|
|
||||||
from heat.tests.common import HeatTestCase
|
|
||||||
from heat.tests import utils
|
|
||||||
from novaclient.exceptions import NotFound
|
from novaclient.exceptions import NotFound
|
||||||
|
|
||||||
from ..resources.nova_flavor import resource_mapping # noqa
|
from heat.engine import parser
|
||||||
|
from heat.engine import resource
|
||||||
|
from heat.engine import template
|
||||||
|
from heat.tests.common import HeatTestCase
|
||||||
|
from heat.tests import utils
|
||||||
|
|
||||||
from ..resources.nova_flavor import NovaFlavor # noqa
|
from ..resources.nova_flavor import NovaFlavor # noqa
|
||||||
|
from ..resources.nova_flavor import resource_mapping # noqa
|
||||||
|
|
||||||
flavor_template = {
|
flavor_template = {
|
||||||
'heat_template_version': '2013-05-23',
|
'heat_template_version': '2013-05-23',
|
||||||
|
@ -11,7 +11,19 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Resources for Rackspace Cloud Loadbalancers."""
|
import copy
|
||||||
|
import itertools
|
||||||
|
|
||||||
|
from heat.common import exception
|
||||||
|
from heat.engine import attributes
|
||||||
|
from heat.engine import constraints
|
||||||
|
from heat.engine import function
|
||||||
|
from heat.engine import properties
|
||||||
|
from heat.engine.properties import Properties
|
||||||
|
from heat.engine import resource
|
||||||
|
from heat.engine import scheduler
|
||||||
|
from heat.openstack.common.gettextutils import _
|
||||||
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pyrax.exceptions import NotFound
|
from pyrax.exceptions import NotFound
|
||||||
@ -23,20 +35,6 @@ except ImportError:
|
|||||||
|
|
||||||
PYRAX_INSTALLED = False
|
PYRAX_INSTALLED = False
|
||||||
|
|
||||||
import copy
|
|
||||||
import itertools
|
|
||||||
|
|
||||||
from heat.openstack.common import log as logging
|
|
||||||
from heat.openstack.common.gettextutils import _
|
|
||||||
from heat.engine import attributes
|
|
||||||
from heat.engine import function
|
|
||||||
from heat.engine import scheduler
|
|
||||||
from heat.engine import constraints
|
|
||||||
from heat.engine import properties
|
|
||||||
from heat.engine import resource
|
|
||||||
from heat.engine.properties import Properties
|
|
||||||
from heat.common import exception
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,17 +14,18 @@
|
|||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
|
from docutils import nodes
|
||||||
|
import pydoc
|
||||||
|
from sphinx.util.compat import Directive
|
||||||
|
|
||||||
|
from heat.engine import attributes
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.engine import plugin_manager
|
from heat.engine import plugin_manager
|
||||||
from heat.engine import resources
|
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import attributes
|
from heat.engine import resources
|
||||||
from heat.engine import support
|
from heat.engine import support
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.openstack.common.gettextutils import _
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
from sphinx.util.compat import Directive
|
|
||||||
import pydoc
|
|
||||||
|
|
||||||
|
|
||||||
global_env = environment.Environment({}, user_env=False)
|
global_env = environment.Environment({}, user_env=False)
|
||||||
|
@ -25,13 +25,14 @@ import traceback
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
cfg.CONF.import_opt('debug', 'heat.openstack.common.log')
|
|
||||||
|
|
||||||
from heat.common import serializers
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
import heat.openstack.common.rpc.common as rpc_common
|
from heat.common import serializers
|
||||||
|
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
|
from heat.openstack.common.rpc import common as rpc_common
|
||||||
|
|
||||||
|
|
||||||
|
cfg.CONF.import_opt('debug', 'heat.openstack.common.log')
|
||||||
|
|
||||||
|
|
||||||
class Fault(object):
|
class Fault(object):
|
||||||
|
@ -22,7 +22,6 @@ from eventlet.green import socket
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import wsgi
|
from heat.common import wsgi
|
||||||
|
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
from heat.openstack.common import rpc
|
from heat.openstack.common import rpc
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ Middleware for authenticating against custom backends.
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import webob.exc
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.openstack.common.gettextutils import _
|
||||||
from heat.openstack.common import local
|
from heat.openstack.common import local
|
||||||
from heat.rpc import client as rpc_client
|
from heat.rpc import client as rpc_client
|
||||||
import webob.exc
|
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
|
||||||
from heat.openstack.common import policy
|
from heat.openstack.common import policy
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,11 +12,12 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from migrate.versioning import util as migrate_util
|
from migrate.versioning import util as migrate_util
|
||||||
from sqlalchemy.orm import sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
|
||||||
from heat.db.sqlalchemy import models
|
from heat.db.sqlalchemy import models
|
||||||
|
from heat.openstack.common.gettextutils import _
|
||||||
|
|
||||||
|
|
||||||
def upgrade(migrate_engine):
|
def upgrade(migrate_engine):
|
||||||
|
@ -17,11 +17,10 @@ import re
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
from heat.common import exception
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import resources
|
from heat.engine import resources
|
||||||
|
|
||||||
from heat.common import exception
|
|
||||||
|
|
||||||
|
|
||||||
class InvalidSchemaError(exception.Error):
|
class InvalidSchemaError(exception.Error):
|
||||||
pass
|
pass
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.engine.resources import nova_utils
|
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
|
from heat.engine.resources import nova_utils
|
||||||
|
|
||||||
|
|
||||||
class ImageConstraint(constraints.BaseCustomConstraint):
|
class ImageConstraint(constraints.BaseCustomConstraint):
|
||||||
|
@ -16,8 +16,6 @@ import copy
|
|||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
cfg.CONF.import_opt('instance_user', 'heat.common.config')
|
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
@ -33,6 +31,8 @@ from heat.engine import signal_responder
|
|||||||
from heat.openstack.common.gettextutils import _
|
from heat.openstack.common.gettextutils import _
|
||||||
from heat.openstack.common import log as logging
|
from heat.openstack.common import log as logging
|
||||||
|
|
||||||
|
cfg.CONF.import_opt('instance_user', 'heat.common.config')
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import uuid
|
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
import functools
|
import functools
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import six
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
import six
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from heat.common import context
|
from heat.common import context
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
Client side of the heat engine RPC API.
|
Client side of the heat engine RPC API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from heat.rpc import api
|
|
||||||
|
|
||||||
import heat.openstack.common.rpc.proxy
|
import heat.openstack.common.rpc.proxy
|
||||||
|
from heat.rpc import api
|
||||||
|
|
||||||
|
|
||||||
class EngineClient(heat.openstack.common.rpc.proxy.RpcProxy):
|
class EngineClient(heat.openstack.common.rpc.proxy.RpcProxy):
|
||||||
|
@ -28,9 +28,8 @@ import tempfile
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from migrate.versioning import repository
|
from migrate.versioning import repository
|
||||||
import sqlalchemy
|
|
||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
import sqlalchemy
|
||||||
|
|
||||||
from heat.db.sqlalchemy import migrate_repo
|
from heat.db.sqlalchemy import migrate_repo
|
||||||
from heat.db.sqlalchemy import migration
|
from heat.db.sqlalchemy import migration
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.common import context
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
A fake server that "responds" to API methods with pre-canned responses.
|
A fake server that "responds" to API methods with pre-canned responses.
|
||||||
|
|
||||||
@ -21,6 +19,8 @@ wrong the tests might raise AssertionError. I've indicated in comments the
|
|||||||
places where actual behavior differs from the spec.
|
places where actual behavior differs from the spec.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from heat.common import context
|
||||||
|
|
||||||
|
|
||||||
class FakeClient(object):
|
class FakeClient(object):
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from heat.api.openstack.v1 import util
|
from heat.api.openstack.v1 import util
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
from heat.api.openstack.v1.views import views_common
|
from heat.api.openstack.v1.views import views_common
|
||||||
|
@ -13,11 +13,12 @@
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.engine import clients
|
|
||||||
from heat.tests.common import HeatTestCase
|
|
||||||
from heatclient import client as heatclient
|
from heatclient import client as heatclient
|
||||||
from keystoneclient import exceptions as keystone_exceptions
|
from keystoneclient import exceptions as keystone_exceptions
|
||||||
|
|
||||||
|
from heat.engine import clients
|
||||||
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
class ClientsTest(HeatTestCase):
|
class ClientsTest(HeatTestCase):
|
||||||
|
|
||||||
|
@ -14,10 +14,8 @@
|
|||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
|
from heat.engine.resources.software_config import cloud_config as cc
|
||||||
from heat.engine import template
|
from heat.engine import template
|
||||||
|
|
||||||
import heat.engine.resources.software_config.cloud_config as cc
|
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from heat.common import serializers
|
from heat.common import serializers
|
||||||
|
@ -27,7 +27,7 @@ from heat.common import exception
|
|||||||
from heat.common import identifier
|
from heat.common import identifier
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.common import urlfetch
|
from heat.common import urlfetch
|
||||||
import heat.db.api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import dependencies
|
from heat.engine import dependencies
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
@ -42,7 +42,7 @@ from heat.engine import watchrule
|
|||||||
from heat.openstack.common.rpc import common as rpc_common
|
from heat.openstack.common.rpc import common as rpc_common
|
||||||
from heat.openstack.common.rpc import proxy
|
from heat.openstack.common.rpc import proxy
|
||||||
from heat.openstack.common import threadgroup
|
from heat.openstack.common import threadgroup
|
||||||
import heat.rpc.api as engine_api
|
from heat.rpc import api as engine_api
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import fakes as test_fakes
|
from heat.tests import fakes as test_fakes
|
||||||
from heat.tests import generic_resource as generic_rsrc
|
from heat.tests import generic_resource as generic_rsrc
|
||||||
|
@ -11,14 +11,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from oslo.config import cfg
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
import heat.api.middleware.fault as fault
|
||||||
from heat.common import exception as heat_exc
|
from heat.common import exception as heat_exc
|
||||||
from heat.openstack.common.rpc import common as rpc_common
|
from heat.openstack.common.rpc import common as rpc_common
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from oslo.config import cfg
|
|
||||||
|
|
||||||
import heat.api.middleware.fault as fault
|
|
||||||
|
|
||||||
|
|
||||||
class StackNotFoundChild(heat_exc.StackNotFound):
|
class StackNotFoundChild(heat_exc.StackNotFound):
|
||||||
|
@ -13,9 +13,8 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
|
||||||
|
|
||||||
from heat.engine import function
|
from heat.engine import function
|
||||||
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFunction(function.Function):
|
class TestFunction(function.Function):
|
||||||
|
@ -14,20 +14,19 @@
|
|||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from oslo.config import cfg
|
|
||||||
|
|
||||||
cfg.CONF.import_opt('region_name_for_services', 'heat.common.config')
|
|
||||||
cfg.CONF.import_group('keystone_authtoken',
|
|
||||||
'keystoneclient.middleware.auth_token')
|
|
||||||
|
|
||||||
import keystoneclient.exceptions as kc_exception
|
import keystoneclient.exceptions as kc_exception
|
||||||
from keystoneclient.v3 import client as kc_v3
|
from keystoneclient.v3 import client as kc_v3
|
||||||
|
from oslo.config import cfg
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import heat_keystoneclient
|
from heat.common import heat_keystoneclient
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
cfg.CONF.import_opt('region_name_for_services', 'heat.common.config')
|
||||||
|
cfg.CONF.import_group('keystone_authtoken',
|
||||||
|
'keystoneclient.middleware.auth_token')
|
||||||
|
|
||||||
|
|
||||||
class KeystoneClientTest(HeatTestCase):
|
class KeystoneClientTest(HeatTestCase):
|
||||||
"""Test cases for heat.common.heat_keystoneclient."""
|
"""Test cases for heat.common.heat_keystoneclient."""
|
||||||
|
@ -16,7 +16,6 @@ from heat.common import exception
|
|||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine.resources import image
|
from heat.engine.resources import image
|
||||||
from heat.engine.resources import nova_utils
|
from heat.engine.resources import nova_utils
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,16 +12,15 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import email
|
import email
|
||||||
|
|
||||||
|
import heatclient.exc as exc
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
|
from heat.engine.resources.software_config import multi_part as mp
|
||||||
from heat.engine import template
|
from heat.engine import template
|
||||||
|
|
||||||
import heat.engine.resources.software_config.multi_part as mp
|
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
import heatclient.exc as exc
|
|
||||||
|
|
||||||
|
|
||||||
class MultipartMimeTest(HeatTestCase):
|
class MultipartMimeTest(HeatTestCase):
|
||||||
|
@ -14,12 +14,10 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from requests import exceptions
|
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
from requests import exceptions
|
||||||
cfg.CONF.import_opt('max_resources_per_stack', 'heat.common.config')
|
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
@ -32,6 +30,8 @@ from heat.tests.common import HeatTestCase
|
|||||||
from heat.tests import generic_resource as generic_rsrc
|
from heat.tests import generic_resource as generic_rsrc
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
cfg.CONF.import_opt('max_resources_per_stack', 'heat.common.config')
|
||||||
|
|
||||||
|
|
||||||
class NestedStackTest(HeatTestCase):
|
class NestedStackTest(HeatTestCase):
|
||||||
test_template = '''
|
test_template = '''
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from mox import IgnoreArg
|
|
||||||
import mox
|
import mox
|
||||||
|
from mox import IgnoreArg
|
||||||
from testtools import skipIf
|
from testtools import skipIf
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
@ -19,8 +19,8 @@ from testtools import skipIf
|
|||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine.resources.neutron import vpnservice
|
|
||||||
from heat.engine.resources.neutron import neutron_utils
|
from heat.engine.resources.neutron import neutron_utils
|
||||||
|
from heat.engine.resources.neutron import vpnservice
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
from heat.openstack.common.importutils import try_import
|
from heat.openstack.common.importutils import try_import
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
import mock
|
import mock
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
"""Tests for :module:'heat.engine.resources.nova_utls'."""
|
"""Tests for :module:'heat.engine.resources.nova_utls'."""
|
||||||
|
|
||||||
import mock
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import mock
|
||||||
from novaclient import exceptions as nova_exceptions
|
from novaclient import exceptions as nova_exceptions
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
|
||||||
|
|
||||||
from heat.engine import plugin_manager
|
from heat.engine import plugin_manager
|
||||||
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
def legacy_test_mapping():
|
def legacy_test_mapping():
|
||||||
|
@ -19,14 +19,12 @@ import yaml
|
|||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.common import urlfetch
|
from heat.common import urlfetch
|
||||||
|
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
from heat.engine import resources
|
from heat.engine import resources
|
||||||
from heat.engine.resources import template_resource
|
from heat.engine.resources import template_resource
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import generic_resource as generic_rsrc
|
from heat.tests import generic_resource as generic_rsrc
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
@ -18,7 +18,6 @@ from heat.common import exception
|
|||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
from heat.engine.resources.random_string import RandomString
|
from heat.engine.resources.random_string import RandomString
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import uuid
|
|||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
import heat.db.api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.engine import dependencies
|
from heat.engine import dependencies
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
@ -26,7 +26,6 @@ from heat.engine import resource
|
|||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
from heat.engine import template
|
from heat.engine import template
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.openstack.common.gettextutils import _
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import generic_resource as generic_rsrc
|
from heat.tests import generic_resource as generic_rsrc
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
@ -16,7 +16,6 @@ import mock
|
|||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
from heat.engine.resources import instance
|
from heat.engine.resources import instance
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
|
|
||||||
from heat.tests import common
|
from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
@ -11,14 +11,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mox
|
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
|
import mox
|
||||||
|
|
||||||
from heat.engine import dependencies
|
from heat.engine import dependencies
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import uuid
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from heat.common import short_id
|
from heat.common import short_id
|
||||||
import uuid
|
|
||||||
|
|
||||||
|
|
||||||
class ShortIdTest(testtools.TestCase):
|
class ShortIdTest(testtools.TestCase):
|
||||||
|
@ -18,15 +18,12 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
|
|
||||||
from heat.db import api as db_api
|
from heat.db import api as db_api
|
||||||
|
|
||||||
from heat.engine import clients
|
from heat.engine import clients
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
from heat.engine import scheduler
|
from heat.engine import scheduler
|
||||||
from heat.engine import stack_user
|
from heat.engine import stack_user
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import fakes
|
from heat.tests import fakes
|
||||||
from heat.tests import generic_resource
|
from heat.tests import generic_resource
|
||||||
|
@ -11,15 +11,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from heatclient.exc import HTTPNotFound
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
|
from heat.engine.resources.software_config import software_config as sc
|
||||||
from heat.engine import template
|
from heat.engine import template
|
||||||
|
|
||||||
import heat.engine.resources.software_config.software_config as sc
|
|
||||||
from heatclient.exc import HTTPNotFound
|
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from json import dumps
|
||||||
|
from json import loads
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
from json import dumps
|
|
||||||
from json import loads
|
|
||||||
import mock
|
import mock
|
||||||
import mox
|
import mox
|
||||||
|
|
||||||
|
@ -11,11 +11,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from oslo.config import cfg
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from heat.api.middleware import ssl
|
from heat.api.middleware import ssl
|
||||||
from oslo.config import cfg
|
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from heat.engine import support
|
from heat.engine import support
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
import six
|
||||||
import testtools
|
import testtools
|
||||||
import yaml
|
import yaml
|
||||||
import six
|
|
||||||
|
|
||||||
from heat.common import config
|
from heat.common import config
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
@ -13,9 +13,8 @@
|
|||||||
|
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from heat.tests.common import HeatTestCase
|
|
||||||
|
|
||||||
from heat.api.middleware.version_negotiation import VersionNegotiationFilter
|
from heat.api.middleware.version_negotiation import VersionNegotiationFilter
|
||||||
|
from heat.tests.common import HeatTestCase
|
||||||
|
|
||||||
|
|
||||||
class VersionController(object):
|
class VersionController(object):
|
||||||
|
@ -21,7 +21,7 @@ from oslo.config import cfg
|
|||||||
|
|
||||||
from heat.common import identifier
|
from heat.common import identifier
|
||||||
from heat.common import template_format
|
from heat.common import template_format
|
||||||
import heat.db.api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
from heat.engine import resource
|
from heat.engine import resource
|
||||||
|
@ -17,7 +17,7 @@ import datetime
|
|||||||
import mox
|
import mox
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
import heat.db.api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.engine import parser
|
from heat.engine import parser
|
||||||
from heat.engine import watchrule
|
from heat.engine import watchrule
|
||||||
from heat.openstack.common import timeutils
|
from heat.openstack.common import timeutils
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
import stubout
|
import stubout
|
||||||
import webob
|
import webob
|
||||||
|
@ -16,11 +16,10 @@
|
|||||||
|
|
||||||
import httplib2
|
import httplib2
|
||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
|
||||||
|
|
||||||
from novaclient import client as base_client
|
from novaclient import client as base_client
|
||||||
from novaclient import exceptions as nova_exceptions
|
from novaclient import exceptions as nova_exceptions
|
||||||
from novaclient.v1_1 import client
|
from novaclient.v1_1 import client
|
||||||
|
from six.moves.urllib import parse as urlparse
|
||||||
|
|
||||||
from heat.tests import fakes
|
from heat.tests import fakes
|
||||||
|
|
||||||
|
4
tox.ini
4
tox.ini
@ -40,9 +40,9 @@ commands = python setup.py build_sphinx
|
|||||||
[flake8]
|
[flake8]
|
||||||
# H201 no 'except:' at least use 'except Exception:'
|
# H201 no 'except:' at least use 'except Exception:'
|
||||||
# H302 import only modules.'bla..' does not import a module
|
# H302 import only modules.'bla..' does not import a module
|
||||||
# H306 imports not in alphabetical order
|
|
||||||
# H404 multi line docstring should start with a summary
|
# H404 multi line docstring should start with a summary
|
||||||
ignore = H201,H302,H306,H404,H803
|
# H803 no full stop at the end of the commit message
|
||||||
|
ignore = H201,H302,H404,H803
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
||||||
|
Loading…
Reference in New Issue
Block a user