Bump hacking to 0.9.x series
Change-Id: Ifbace1f199e0dc393199eebd4835904390057a45
This commit is contained in:
parent
2b73047350
commit
05b841140b
@ -1,5 +1,5 @@
|
||||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
hacking>=0.8.0,<0.9
|
||||
hacking>=0.9.2,<0.10
|
||||
|
||||
coverage>=3.6
|
||||
discover
|
||||
|
4
tox.ini
4
tox.ini
@ -30,6 +30,8 @@ commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# H302 import only modules.
|
||||
ignore = H302
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = H302,H405,H904
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
@ -18,6 +18,7 @@ the internal Tuskar domain model.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
from wsme import types as wtypes
|
||||
|
||||
from tuskar.db.sqlalchemy import models as db_models
|
||||
|
@ -11,11 +11,11 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import pecan
|
||||
import wsme
|
||||
|
||||
import pecan
|
||||
from pecan import rest
|
||||
import six
|
||||
import wsme
|
||||
from wsmeext import pecan as wsme_pecan
|
||||
|
||||
from tuskar.api.controllers.v1 import models
|
||||
|
@ -12,6 +12,7 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
|
||||
import pecan
|
||||
from pecan import rest
|
||||
import wsme
|
||||
|
@ -20,9 +20,9 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from wsgiref import simple_server
|
||||
|
||||
from oslo.config import cfg
|
||||
from wsgiref import simple_server
|
||||
|
||||
from tuskar.api import app
|
||||
from tuskar.common import service as tuskar_service
|
||||
|
@ -23,10 +23,9 @@ import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from tuskar.openstack.common import service
|
||||
|
||||
from tuskar.common import service as tuskar_service
|
||||
from tuskar.manager import manager
|
||||
from tuskar.openstack.common import service
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -50,19 +50,21 @@ class ProcessExecutionError(IOError):
|
||||
description = _('Unexpected error while running command.')
|
||||
if exit_code is None:
|
||||
exit_code = '-'
|
||||
message = _('%(description)s\nCommand: %(cmd)s\n'
|
||||
'Exit code: %(exit_code)s\nStdout: %(stdout)r\n'
|
||||
'Stderr: %(stderr)r') % {
|
||||
'description': description, 'cmd': cmd,
|
||||
'exit_code': exit_code, 'stdout': stdout,
|
||||
'stderr': stderr
|
||||
}
|
||||
message = _(
|
||||
'%(description)s\nCommand: %(cmd)s\n'
|
||||
'Exit code: %(exit_code)s\nStdout: %(stdout)r\n'
|
||||
'Stderr: %(stderr)r'
|
||||
) % {
|
||||
'description': description, 'cmd': cmd,
|
||||
'exit_code': exit_code, 'stdout': stdout,
|
||||
'stderr': stderr
|
||||
}
|
||||
IOError.__init__(self, message)
|
||||
|
||||
|
||||
def _cleanse_dict(original):
|
||||
"""Strip all admin_password, new_pass, rescue_pass keys from a dict."""
|
||||
return dict((k, v) for k, v in original.iteritems() if not "_pass" in k)
|
||||
return dict((k, v) for k, v in original.iteritems() if "_pass" not in k)
|
||||
|
||||
|
||||
class TuskarException(Exception):
|
||||
|
@ -30,7 +30,7 @@ def getcallargs(function, *args, **kwargs):
|
||||
|
||||
keyed_args.update(kwargs)
|
||||
|
||||
#NOTE(alaski) the implicit 'self' or 'cls' argument shows up in
|
||||
# NOTE(alaski) the implicit 'self' or 'cls' argument shows up in
|
||||
# argnames but not in args or kwargs. Uses 'in' rather than '==' because
|
||||
# some tests use 'self2'.
|
||||
if 'self' in argnames[0] or 'cls' == argnames[0]:
|
||||
|
@ -17,6 +17,7 @@ Base classes for storage engines
|
||||
"""
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from tuskar.openstack.common.db import api as db_api
|
||||
|
@ -22,7 +22,9 @@
|
||||
"""A client library for accessing Heat CloudFormations API using Boto"""
|
||||
|
||||
from os import environ as env
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from tuskar.openstack.common import log as logging
|
||||
|
||||
heat_opts = [
|
||||
@ -74,7 +76,7 @@ from keystoneclient.v2_0 import client as ksclient
|
||||
|
||||
|
||||
class HeatClient(object):
|
||||
"""Heat CloudFormations API client to use in Tuskar"""
|
||||
"""Heat CloudFormations API client to use in Tuskar."""
|
||||
|
||||
def __init__(self):
|
||||
try:
|
||||
@ -133,6 +135,6 @@ class HeatClient(object):
|
||||
try:
|
||||
self.get_stack(name)
|
||||
return True
|
||||
#return false if 404
|
||||
# return false if 404
|
||||
except HeatStackNotFound:
|
||||
return False
|
||||
|
@ -28,7 +28,6 @@ from tuskar.templates.heat import RegistryEntry
|
||||
from tuskar.templates.heat import Resource
|
||||
from tuskar.templates.heat import ResourceProperty
|
||||
from tuskar.templates.heat import Template
|
||||
|
||||
import tuskar.templates.namespace as ns_utils
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# under the License.
|
||||
|
||||
import testtools
|
||||
|
||||
from wsme import types as wtypes
|
||||
|
||||
from tuskar.api.controllers.v1 import models as api_models
|
||||
|
@ -11,9 +11,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import os
|
||||
|
||||
import mock
|
||||
from pecan.testing import load_test_app
|
||||
|
||||
from tuskar.api.controllers.v1 import overcloud
|
||||
@ -123,7 +123,7 @@ class OvercloudTests(base.TestCase):
|
||||
'overcloud-compute': '2',
|
||||
'overcloud-cinder-volume': '3'}
|
||||
|
||||
# Test
|
||||
# Test
|
||||
result = overcloud.get_flavor_attributes(parsed_flavors)
|
||||
|
||||
# Verify
|
||||
|
@ -30,15 +30,13 @@ import sys
|
||||
|
||||
import fixtures
|
||||
import mox
|
||||
from oslo.config import cfg
|
||||
import stubout
|
||||
import testtools
|
||||
import unittest2
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from tuskar.db import migration
|
||||
|
||||
from tuskar.common import paths
|
||||
from tuskar.db import migration
|
||||
from tuskar.openstack.common.db.sqlalchemy import session
|
||||
from tuskar.openstack.common import log as logging
|
||||
from tuskar.tests import conf_fixture
|
||||
|
@ -11,9 +11,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
|
||||
from tuskar.heat import template_tools
|
||||
|
||||
|
||||
@ -39,14 +40,16 @@ class TemplateToolsTests(unittest.TestCase):
|
||||
template_tools.merge_templates(overcloud_roles)
|
||||
|
||||
# Verify
|
||||
mock_merge.assert_called_once_with([
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml', ],
|
||||
mock_merge.assert_called_once_with(
|
||||
[
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml'
|
||||
],
|
||||
None,
|
||||
None,
|
||||
scaling={
|
||||
@ -64,14 +67,16 @@ class TemplateToolsTests(unittest.TestCase):
|
||||
template_tools.merge_templates(overcloud_roles)
|
||||
|
||||
# Verify
|
||||
mock_merge.assert_called_once_with([
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml', ],
|
||||
mock_merge.assert_called_once_with(
|
||||
[
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml'
|
||||
],
|
||||
None,
|
||||
None,
|
||||
scaling={
|
||||
@ -89,14 +94,16 @@ class TemplateToolsTests(unittest.TestCase):
|
||||
template_tools.merge_templates(overcloud_roles)
|
||||
|
||||
# Verify
|
||||
mock_merge.assert_called_once_with([
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml', ],
|
||||
mock_merge.assert_called_once_with(
|
||||
[
|
||||
'/etc/tuskar/tripleo-heat-templates/overcloud-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/block-storage.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-storage-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/ssl-source.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/swift-deploy.yaml',
|
||||
'/etc/tuskar/tripleo-heat-templates/nova-compute-config.yaml'
|
||||
],
|
||||
None,
|
||||
None,
|
||||
scaling={
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import unittest
|
||||
|
||||
import yaml
|
||||
|
||||
from tuskar.templates import composer
|
||||
|
Loading…
x
Reference in New Issue
Block a user