diff --git a/nova/tests/unit/virt/vmwareapi/fake.py b/nova/tests/unit/virt/vmwareapi/fake.py index f876a8de87c1..96d1487e969f 100644 --- a/nova/tests/unit/virt/vmwareapi/fake.py +++ b/nova/tests/unit/virt/vmwareapi/fake.py @@ -1585,18 +1585,13 @@ class FakeVim(object): elif attr_name == "AddPortGroup": return lambda *args, **kwargs: self._add_port_group(attr_name, *args, **kwargs) - elif attr_name == "RebootHost_Task": - return lambda *args, **kwargs: self._just_return_task(attr_name) - elif attr_name == "ShutdownHost_Task": - return lambda *args, **kwargs: self._just_return_task(attr_name) - elif attr_name == "PowerUpHostFromStandBy_Task": - return lambda *args, **kwargs: self._just_return_task(attr_name) - elif attr_name == "EnterMaintenanceMode_Task": - return lambda *args, **kwargs: self._just_return_task(attr_name) - elif attr_name == "ExitMaintenanceMode_Task": + elif attr_name in ("RebootHost_Task", + "ShutdownHost_Task", + "PowerUpHostFromStandBy_Task", + "EnterMaintenanceMode_Task", + "ExitMaintenanceMode_Task", + "RescanHba"): return lambda *args, **kwargs: self._just_return_task(attr_name) elif attr_name == "AddInternetScsiSendTargets": return lambda *args, **kwargs: self._add_iscsi_send_tgt(attr_name, *args, **kwargs) - elif attr_name == "RescanHba": - return lambda *args, **kwargs: self._just_return_task(attr_name) diff --git a/tox.ini b/tox.ini index 2d55411706b9..08ddeb3cb7a2 100644 --- a/tox.ini +++ b/tox.ini @@ -75,9 +75,9 @@ ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405 exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/xenserver* # To get a list of functions that are more complex than 25, set max-complexity # to 25 and run 'tox -epep8'. -# 37 is currently the most complex thing we have +# 34 is currently the most complex thing we have # TODO(jogo): get this number down to 25 or so -max-complexity=38 +max-complexity=35 [hacking] local-check-factory = nova.hacking.checks.factory