opencomputeproject / HWMgmt-OCP-Profiles

A place where all the OCP profiles are a placed. Issues can be submitted/resolved and modifications can be reviewed/merged
Apache License 2.0
13 stars 14 forks source link

Validator returns AttributeError: 'list' object has no attribute 'get' #58

Closed ehaligow closed 5 months ago

ehaligow commented 7 months ago
intel@ubuntu:~/Redfish-Interop-Validator$ python3 RedfishInteropValidator.py -c config/example.ini OCPRackManagerController.v1_0_2.json >> deletesValues.txt
Traceback (most recent call last):
  File "RedfishInteropValidator.py", line 10, in <module>
    status_code, lastResultsPage, exit_string = main()
  File "/home/intel/Redfish-Interop-Validator/redfish_interop_validator/RedfishInteropValidator.py", line 224, in main
    success, _, resultsNew, _, _ = validateURITree('/redfish/v1/', profile, 'ServiceRoot', expectedJson=jsonData)
  File "/home/intel/Redfish-Interop-Validator/redfish_interop_validator/validateResource.py", line 336, in validateURITree
    msgs = interop.validateComparisonAnyOfAllOf(profile_entry['PropertyRequirements'], resource_type)
  File "/home/intel/Redfish-Interop-Validator/redfish_interop_validator/interop.py", line 48, in validateComparisonAnyOfAllOf
    my_compare = property_profile.get('Comparison', 'AnyOf')
AttributeError: 'list' object has no attribute 'get'
jcleung5549 commented 6 months ago

Do you know if this a problem with the profile or the validator? (If the validator, then the issue should be filed in that repository.)

ehaligow commented 5 months ago

I think the problem lies within profile. The field Voltages under Power has square brackets instead of curly brackets. And the Validator cannot handle that correctly.

jcleung5549 commented 5 months ago

Can you edit the profile accordingly and verify that it fixes this issue?

ehaligow commented 5 months ago

Yes, I replaced the brackets in profile file and it fixed the issue.

jcleung5549 commented 5 months ago

Fixed in v1.0.3

ehaligow commented 4 months ago

Hi, @jcleung5549 I'm sorry for misleading you, but deleting the brackets will resolve the issue. So, not changing the brackets, but deleting unnecessary curly brackets in l336 and l344 will solve the issue.