From 7451ad7fe0fede24c15e39ecd15e46dd6fbf4d86 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 25 Feb 2019 12:02:49 +0100 Subject: [PATCH] Log port details when FloatingIP port details test fails In case when port status is not transitioned to DOWN in test_floatingip.FloatingIPPortDetailsTest tests, log of all port info can be useful for further debugging. Change-Id: I0ba1efea68e6e53bd7df9bf84ecb3d73e95925ca Related-bug: #1815585 --- neutron_tempest_plugin/scenario/test_floatingip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py index 38833cd4..be57475e 100644 --- a/neutron_tempest_plugin/scenario/test_floatingip.py +++ b/neutron_tempest_plugin/scenario/test_floatingip.py @@ -310,10 +310,12 @@ class FloatingIPPortDetailsTest(FloatingIpTestCasesMixin, timed_out = int(time.time()) - start >= timeout if status != lib_constants.PORT_STATUS_DOWN and timed_out: + port_id = fip.get("port_id") + port = self.os_admin.network_client.show_port(port_id)['port'] message = ('Floating IP %s attached port status failed to ' 'transition to DOWN (current status %s) within ' - 'the required time (%s s).' % - (fip_id, status, timeout)) + 'the required time (%s s). Port details: %s' % + (fip_id, status, timeout, port)) raise exceptions.TimeoutException(message) return fip