Remove unnecessary show_floatingip
In check_floating_ip_status, when only call_until_true returns False,
show_floatingip is needed to get the actual floating status. This
is to reduce the unncessary call to show_floatingip.
Change-Id: Ib71e0c72149418be524fb43cfd01f9d3f7901566
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 727afd6..3d9e932 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -888,16 +888,16 @@
show_floatingip(floatingip_id)['floatingip'])
return status == result['status']
- test_utils.call_until_true(refresh,
- CONF.network.build_timeout,
- CONF.network.build_interval)
- floating_ip = self.floating_ips_client.show_floatingip(
- floatingip_id)['floatingip']
- self.assertEqual(status, floating_ip['status'],
- message="FloatingIP: {fp} is at status: {cst}. "
- "failed to reach status: {st}"
- .format(fp=floating_ip, cst=floating_ip['status'],
- st=status))
+ if not test_utils.call_until_true(refresh,
+ CONF.network.build_timeout,
+ CONF.network.build_interval):
+ floating_ip = self.floating_ips_client.show_floatingip(
+ floatingip_id)['floatingip']
+ self.assertEqual(status, floating_ip['status'],
+ message="FloatingIP: {fp} is at status: {cst}. "
+ "failed to reach status: {st}"
+ .format(fp=floating_ip, cst=floating_ip['status'],
+ st=status))
LOG.info("FloatingIP: {fp} is at status: {st}"
.format(fp=floating_ip, st=status))