test_neutron_resources.py exception handler
The debug helper part used in neutron_resources exception handler,
was hidden the original TimeoutException by a KeyError exception,
it was not a helpful behavior.
This change logs the situation and re raise the original exception.
Change-Id: I0d09a190d9677bdf68294da223a8d20b1a40d463
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 3a52108..0154658 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -84,12 +84,15 @@
# to heat.
body = cls.client.show_resource(cls.stack_identifier,
'Server')
- server_id = body['physical_resource_id']
- LOG.debug('Console output for %s', server_id)
- output = cls.servers_client.get_console_output(
- server_id)['output']
- LOG.debug(output)
- raise
+ server_id = body.get('physical_resource_id')
+ if server_id:
+ LOG.debug('Console output for %s', server_id)
+ output = cls.servers_client.get_console_output(
+ server_id)['output']
+ LOG.debug(output)
+ else:
+ LOG.debug('Server resource is %s', body)
+ raise # original exception
cls.test_resources = {}
for resource in resources: