Skip to content

Commit

Permalink
Merge pull request #446 from aheynig/fix-output-for-lists-of-ComplexType
Browse files Browse the repository at this point in the history
Fix output for lists of 'ComplexType'
  • Loading branch information
mraineri authored Jan 7, 2022
2 parents 4470594 + 9c16c1d commit cd1c334
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion validateRedfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ def checkPropertyConformance(service, prop_name, prop, parent_name=None, parent_
'Yes' if prop.Exists else 'No', result_str)
else:
subMsgs, subCounts = validateComplex(service, sub_obj, prop_name, oem_check)
if len(prop.Collection) == 1:
if isCollection:
subMsgs = {'{}[{}].{}'.format(prop_name,n,x):y for x,y in subMsgs.items()}
elif len(prop.Collection) == 1:
subMsgs = {'{}.{}'.format(prop_name,x):y for x,y in subMsgs.items()}
else:
subMsgs = {'{}.{}#{}'.format(prop_name,x,n):y for x,y in subMsgs.items()}
Expand Down

0 comments on commit cd1c334

Please sign in to comment.