Merge "Fix pep8 errors in tacker code"
This commit is contained in:
commit
814c9509e6
@ -72,8 +72,8 @@ class BaseTackerTest(base.TestCase):
|
||||
while True:
|
||||
vnf_result = cls.client.show_vnf(vnf_id)
|
||||
status = vnf_result['vnf']['status']
|
||||
if (status == target_status) or ((int(time.time()) -
|
||||
start_time) > timeout):
|
||||
if (status == target_status) or (
|
||||
(int(time.time()) - start_time) > timeout):
|
||||
break
|
||||
time.sleep(sleep_interval)
|
||||
|
||||
@ -99,18 +99,21 @@ class BaseTackerTest(base.TestCase):
|
||||
|
||||
def verify_vnf_restart(self, vnfd_instance, vnf_instance):
|
||||
vnf_id = vnf_instance['vnf']['id']
|
||||
vnf_current_status = self.wait_until_vnf_active(vnf_id,
|
||||
vnf_current_status = self.wait_until_vnf_active(
|
||||
vnf_id,
|
||||
constants.VNF_CIRROS_CREATE_TIMEOUT,
|
||||
constants.ACTIVE_SLEEP_TIME)
|
||||
self.assertEqual(vnf_current_status, 'ACTIVE')
|
||||
self.validate_vnf_instance(vnfd_instance, vnf_instance)
|
||||
self.assertIsNotNone(self.client.show_vnf(vnf_id)['vnf']['mgmt_url'])
|
||||
|
||||
vnf_current_status = self.wait_until_vnf_dead(vnf_id,
|
||||
vnf_current_status = self.wait_until_vnf_dead(
|
||||
vnf_id,
|
||||
constants.VNF_CIRROS_DEAD_TIMEOUT,
|
||||
constants.DEAD_SLEEP_TIME)
|
||||
self.assertEqual(vnf_current_status, 'DEAD')
|
||||
vnf_current_status = self.wait_until_vnf_active(vnf_id,
|
||||
vnf_current_status = self.wait_until_vnf_active(
|
||||
vnf_id,
|
||||
constants.VNF_CIRROS_CREATE_TIMEOUT,
|
||||
constants.ACTIVE_SLEEP_TIME)
|
||||
self.assertEqual(vnf_current_status, 'ACTIVE')
|
||||
|
@ -43,7 +43,8 @@ class VnfTestCreate(base.BaseTackerTest):
|
||||
self.validate_vnf_instance(vnfd_instance, vnf_instance)
|
||||
|
||||
vnf_id = vnf_instance['vnf']['id']
|
||||
vnf_current_status = self.wait_until_vnf_active(vnf_id,
|
||||
vnf_current_status = self.wait_until_vnf_active(
|
||||
vnf_id,
|
||||
constants.VNF_CIRROS_CREATE_TIMEOUT,
|
||||
constants.ACTIVE_SLEEP_TIME)
|
||||
self.assertEqual(vnf_current_status, 'ACTIVE')
|
||||
|
@ -59,7 +59,8 @@ class VnfmTestParam(base.BaseTackerTest):
|
||||
|
||||
self.validate_vnf_instance(vnfd_instance, vnf_instance)
|
||||
vnf_id = vnf_instance['vnf']['id']
|
||||
vnf_current_status = self.wait_until_vnf_active(vnf_id,
|
||||
vnf_current_status = self.wait_until_vnf_active(
|
||||
vnf_id,
|
||||
constants.VNF_CIRROS_CREATE_TIMEOUT,
|
||||
constants.ACTIVE_SLEEP_TIME)
|
||||
self.assertEqual('ACTIVE', vnf_current_status)
|
||||
|
@ -276,7 +276,8 @@ class DeviceHeat(abstract_driver.DeviceAbstractDriver):
|
||||
# This should be removed after Mitaka
|
||||
if monitoring_policy == 'ping' and failure_policy == 'respawn':
|
||||
vdu_dict['monitoring_policy'] = {'ping': {
|
||||
'actions': {
|
||||
'actions':
|
||||
{
|
||||
'failure': 'respawn'
|
||||
}}}
|
||||
vdu_dict.pop('failure_policy')
|
||||
|
7
tox.ini
7
tox.ini
@ -55,13 +55,8 @@ commands =
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# E125 continuation line does not distinguish itself from next logical line
|
||||
# E126 continuation line over-indented for hanging indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E129 visually indented line with same indent as next logical line
|
||||
# H302 import only modules
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = E125,E126,E128,E129,H302,H904
|
||||
ignore = E128
|
||||
show-source = true
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject
|
||||
|
Loading…
x
Reference in New Issue
Block a user