Add debug info to timeout exception in _hotplug_server
Add the old port and number of new ports in the timeout exception in
_hotplug_server so we can better trace the port requests through the
neutron logs.
Related-Bug: #1321207
Change-Id: Iee79bc286e77547e672f81b83d02e5bfba1fc743
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index ebc6b15..cef4a0c 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -247,9 +247,11 @@
if not test.call_until_true(check_ports, CONF.network.build_timeout,
CONF.network.build_interval):
- raise exceptions.TimeoutException("No new port attached to the "
- "server in time (%s sec) !"
- % CONF.network.build_timeout)
+ raise exceptions.TimeoutException(
+ "No new port attached to the server in time (%s sec)! "
+ "Old port: %s. Number of new ports: %d" % (
+ CONF.network.build_timeout, old_port,
+ len(self.new_port_list)))
new_port = net_resources.DeletablePort(client=self.network_client,
**self.new_port_list[0])