Unpin flake8, fix lint
Change-Id: Id899936da7721fcc359e63db455a5349603fe559
This commit is contained in:
parent
d3bcd92616
commit
65d66ecb58
@ -57,5 +57,6 @@ def openstack_upgrade():
|
|||||||
register_configs())):
|
register_configs())):
|
||||||
config_changed()
|
config_changed()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
openstack_upgrade()
|
openstack_upgrade()
|
||||||
|
@ -128,5 +128,6 @@ def main():
|
|||||||
}
|
}
|
||||||
return audits.action_parse_results(audits.run(config))
|
return audits.action_parse_results(audits.run(config))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
@ -150,6 +150,7 @@ REQUIRED_INTERFACES = {
|
|||||||
def ceph_config_file():
|
def ceph_config_file():
|
||||||
return CHARM_CEPH_CONF.format(service_name())
|
return CHARM_CEPH_CONF.format(service_name())
|
||||||
|
|
||||||
|
|
||||||
CONFIG_FILES = OrderedDict([
|
CONFIG_FILES = OrderedDict([
|
||||||
(GLANCE_REGISTRY_CONF, {
|
(GLANCE_REGISTRY_CONF, {
|
||||||
'hook_contexts': [context.SharedDBContext(ssl_dir=GLANCE_CONF_DIR),
|
'hook_contexts': [context.SharedDBContext(ssl_dir=GLANCE_CONF_DIR),
|
||||||
@ -475,7 +476,7 @@ def check_optional_relations(configs):
|
|||||||
if relation_ids('ha'):
|
if relation_ids('ha'):
|
||||||
try:
|
try:
|
||||||
get_hacluster_config()
|
get_hacluster_config()
|
||||||
except:
|
except Exception:
|
||||||
return ('blocked',
|
return ('blocked',
|
||||||
'hacluster missing configuration: '
|
'hacluster missing configuration: '
|
||||||
'vip, vip_iface, vip_cidr')
|
'vip, vip_iface, vip_cidr')
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
charm-tools>=2.4.4
|
charm-tools>=2.4.4
|
||||||
requests>=2.18.4
|
requests>=2.18.4
|
||||||
mock>=1.2
|
mock>=1.2
|
||||||
flake8>=2.2.4,<=2.4.1
|
flake8>=2.2.4
|
||||||
stestr>=2.2.0
|
stestr>=2.2.0
|
||||||
coverage>=4.5.2
|
coverage>=4.5.2
|
||||||
pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking)
|
pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking)
|
||||||
|
2
tox.ini
2
tox.ini
@ -116,5 +116,5 @@ commands =
|
|||||||
functest-run-suite --keep-model --bundle {posargs}
|
functest-run-suite --keep-model --bundle {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E402,E226
|
ignore = E402,E226,W504
|
||||||
exclude = */charmhelpers
|
exclude = */charmhelpers
|
||||||
|
@ -26,16 +26,16 @@ sys.modules['apt'] = mock_apt
|
|||||||
mock_apt.apt_pkg = MagicMock()
|
mock_apt.apt_pkg = MagicMock()
|
||||||
|
|
||||||
with patch('charmhelpers.contrib.hardening.harden.harden') as mock_dec, \
|
with patch('charmhelpers.contrib.hardening.harden.harden') as mock_dec, \
|
||||||
patch('charmhelpers.contrib.openstack.utils.'
|
patch('charmhelpers.contrib.openstack.utils.'
|
||||||
'os_requires_version') as mock_os, \
|
'os_requires_version') as mock_os, \
|
||||||
patch('glance_utils.register_configs'), \
|
patch('glance_utils.register_configs'), \
|
||||||
patch('glance_utils.restart_map'):
|
patch('glance_utils.restart_map'):
|
||||||
mock_dec.side_effect = (lambda *dargs, **dkwargs: lambda f:
|
mock_dec.side_effect = (lambda *dargs, **dkwargs: lambda f:
|
||||||
lambda *args, **kwargs: f(*args, **kwargs))
|
lambda *args, **kwargs: f(*args, **kwargs))
|
||||||
|
|
||||||
mock_os.side_effect = (lambda *dargs, **dkwargs: lambda f:
|
mock_os.side_effect = (lambda *dargs, **dkwargs: lambda f:
|
||||||
lambda *args, **kwargs: f(*args, **kwargs))
|
lambda *args, **kwargs: f(*args, **kwargs))
|
||||||
import openstack_upgrade
|
import openstack_upgrade
|
||||||
|
|
||||||
from test_utils import CharmTestCase
|
from test_utils import CharmTestCase
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user