Enable gating on E128
Enables check for 'continuation line under-indented for visual indent' and fixes existing violations. Change-Id: Iac5d6ac280199b7b7f3877d252777e92726f8361
This commit is contained in:
parent
01fb952ef6
commit
8f895aef17
2
tox.ini
2
tox.ini
@ -30,6 +30,6 @@ commands = {posargs}
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# H302 import only modules.
|
# H302 import only modules.
|
||||||
ignore = E128,H302
|
ignore = H302
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||||
|
@ -24,7 +24,8 @@ from tuskar.api import hooks
|
|||||||
from tuskar.api import renderers
|
from tuskar.api import renderers
|
||||||
|
|
||||||
auth_opts = [
|
auth_opts = [
|
||||||
cfg.StrOpt('auth_strategy',
|
cfg.StrOpt(
|
||||||
|
'auth_strategy',
|
||||||
default='noauth',
|
default='noauth',
|
||||||
help='Method to use for auth: noauth or keystone.'),
|
help='Method to use for auth: noauth or keystone.'),
|
||||||
]
|
]
|
||||||
|
@ -55,14 +55,16 @@ class JSONRenderer(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if 'faultcode' in namespace:
|
if 'faultcode' in namespace:
|
||||||
return self._render_fault(namespace['faultstring'],
|
return self._render_fault(
|
||||||
|
namespace['faultstring'],
|
||||||
namespace['debuginfo'])
|
namespace['debuginfo'])
|
||||||
|
|
||||||
result = namespace['result']
|
result = namespace['result']
|
||||||
if isinstance(namespace['result'], api.Response):
|
if isinstance(namespace['result'], api.Response):
|
||||||
pecan.response.status_code = result.status_code
|
pecan.response.status_code = result.status_code
|
||||||
return self._render_fault(result.obj.faultstring,
|
return self._render_fault(
|
||||||
result.obj.debuginfo, code=result.status_code)
|
result.obj.faultstring, result.obj.debuginfo,
|
||||||
|
code=result.status_code)
|
||||||
|
|
||||||
return wsme.rest.json.encode_result(
|
return wsme.rest.json.encode_result(
|
||||||
result,
|
result,
|
||||||
|
@ -59,8 +59,9 @@ class RequestContext(object):
|
|||||||
because they possibly came in from older rpc messages.
|
because they possibly came in from older rpc messages.
|
||||||
"""
|
"""
|
||||||
if kwargs:
|
if kwargs:
|
||||||
LOG.warn(_('Arguments dropped when creating context: %s') %
|
LOG.warn(
|
||||||
str(kwargs))
|
_('Arguments dropped when creating context: %s') %
|
||||||
|
str(kwargs))
|
||||||
|
|
||||||
self.user_id = user_id
|
self.user_id = user_id
|
||||||
self.project_id = project_id
|
self.project_id = project_id
|
||||||
@ -80,7 +81,7 @@ class RequestContext(object):
|
|||||||
if service_catalog:
|
if service_catalog:
|
||||||
# Only include required parts of service_catalog
|
# Only include required parts of service_catalog
|
||||||
self.service_catalog = [s for s in service_catalog
|
self.service_catalog = [s for s in service_catalog
|
||||||
if s.get('type') in ('volume')]
|
if s.get('type') in ('volume')]
|
||||||
else:
|
else:
|
||||||
# if list is empty or none
|
# if list is empty or none
|
||||||
self.service_catalog = []
|
self.service_catalog = []
|
||||||
|
@ -130,7 +130,7 @@ class OvercloudRoleCount(Base):
|
|||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return (self.overcloud_role_id == other.overcloud_role_id
|
return (self.overcloud_role_id == other.overcloud_role_id
|
||||||
and self.overcloud_id == other.overcloud_id)
|
and self.overcloud_id == other.overcloud_id)
|
||||||
|
|
||||||
|
|
||||||
class OvercloudAttribute(Base):
|
class OvercloudAttribute(Base):
|
||||||
@ -158,7 +158,7 @@ class OvercloudAttribute(Base):
|
|||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return (self.overcloud_id == other.overcloud_id
|
return (self.overcloud_id == other.overcloud_id
|
||||||
and self.key == other.key)
|
and self.key == other.key)
|
||||||
|
|
||||||
|
|
||||||
class Overcloud(Base):
|
class Overcloud(Base):
|
||||||
|
@ -58,8 +58,8 @@ heat_keystone_opts = [
|
|||||||
help='Keystone authentication URL'
|
help='Keystone authentication URL'
|
||||||
),
|
),
|
||||||
cfg.BoolOpt('insecure',
|
cfg.BoolOpt('insecure',
|
||||||
default=True,
|
default=True,
|
||||||
help='Set to False when Heat API uses HTTPS'
|
help='Set to False when Heat API uses HTTPS'
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -44,8 +44,10 @@ def generate_scaling_params(overcloud_roles):
|
|||||||
overcloud_role = overcloud_role.lower()
|
overcloud_role = overcloud_role.lower()
|
||||||
|
|
||||||
if overcloud_role == OVERCLOUD_COMPUTE_ROLE:
|
if overcloud_role == OVERCLOUD_COMPUTE_ROLE:
|
||||||
scaling = dict(scaling.items() +
|
scaling = dict(
|
||||||
merge.parse_scaling(["NovaCompute=%s" % (count)]).items())
|
scaling.items() +
|
||||||
|
merge.parse_scaling(["NovaCompute=%s" % (count)]).items()
|
||||||
|
)
|
||||||
|
|
||||||
return scaling
|
return scaling
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_create_stack_heat_exception(self, mock_heat_client,
|
def test_create_stack_heat_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_create_stack_existing_exception(self, mock_heat_client,
|
def test_create_stack_existing_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_create_stack_not_valid_exception(self, mock_heat_client,
|
def test_create_stack_not_valid_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_update_stack_heat_exception(self, mock_heat_client,
|
def test_update_stack_heat_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_update_stack_not_existing_exception(self, mock_heat_client,
|
def test_update_stack_not_existing_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ class OvercloudTests(base.TestCase):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
def test_update_stack_not_valid_exception(self, mock_heat_client,
|
def test_update_stack_not_valid_exception(self, mock_heat_client,
|
||||||
mock_heat_merge_templates):
|
mock_heat_merge_templates):
|
||||||
# Setup
|
# Setup
|
||||||
mock_heat_merge_templates.return_value = None
|
mock_heat_merge_templates.return_value = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user