Add a new exception for invalid structure

This commit fixes too broad exception in output_parser. Otherwise, we
can't assert the Exception in unit tests.

Partially implements bp unit-tests

Change-Id: I9e45571dbf964a37dd9d0249a6f662216d5d046c
This commit is contained in:
Masayuki Igawa
2014-03-17 17:55:23 +09:00
parent f052944f46
commit 38355f253d

View File

@@ -17,6 +17,7 @@
import re
from tempest import exceptions
from tempest.openstack.common import log as logging
@@ -37,7 +38,7 @@ def details_multiple(output_lines, with_label=False):
for table_ in tables_:
if 'Property' not in table_['headers'] \
or 'Value' not in table_['headers']:
raise Exception('Invalid structure of table with details')
raise exceptions.InvalidStructure()
item = {}
for value in table_['values']:
item[value[0]] = value[1]