DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
40 stars 34 forks source link

AttributeError in catalog.py #495

Closed dexpiper closed 1 year ago

dexpiper commented 2 years ago

During execution of Redfish Service Validator an AttributeError exception raised on this string.

item: PrivateEnterpriseId--Edm.String item_type: <class 'common.catalog.RedfishProperty'>

Log:

*** /redfish/v1/Managers/bmc/NetworkProtocol
Type (ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol), GET SUCCESS (time: 0:00:01.013453)
Attempt 1 of /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates
Response Time for GET to /redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates: 0.6448818049993861 seconds.
IPMISOL not defined in schema ManagerNetworkProtocol.v1_5_0 (check version, spelling and casing)
Attempting IPMI (from IPMISOL)?
SOL not defined in schema ManagerNetworkProtocol.v1_5_0 (check version, spelling and casing)
FAIL...

Exception details

Traceback (most recent call last):
  File "RedfishServiceValidator.py", line 250, in <module>
    status_code, lastResultsPage, exit_string = main()
  File "RedfishServiceValidator.py", line 189, in main
    success, counts, results, xlinks, topobj = validateURITree(currentService, '/redfish/v1/', 'ServiceRoot', expectedJson=jsonData)
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/validateResource.py", line 344, in validateURITree
    returnVal = validateURITree(service, link_destination, uriName + ' -> ' + link.Name, parent=parent, allLinks=allLinks, inAnnotation=link.InAnnotation)
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/validateResource.py", line 344, in validateURITree
    returnVal = validateURITree(service, link_destination, uriName + ' -> ' + link.Name, parent=parent, allLinks=allLinks, inAnnotation=link.InAnnotation)
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/validateResource.py", line 344, in validateURITree
    returnVal = validateURITree(service, link_destination, uriName + ' -> ' + link.Name, parent=parent, allLinks=allLinks, inAnnotation=link.InAnnotation)
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/validateResource.py", line 284, in validateURITree
    validateSuccess, counts, results, links, thisobj = validateSingleURI(service, URI, uriName, expectedType, expectedJson, parent)
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/validateResource.py", line 265, in validateSingleURI
    my_logger.debug(redfish_obj.getLinks())
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/common/catalog.py", line 1074, in getLinks
    my_links = sub.getLinks()
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/common/catalog.py", line 1074, in getLinks
    my_links = sub.getLinks()
  File "/home/dexpiper/bin/tests/rf/Redfish-Service-Validator/common/catalog.py", line 1053, in getLinks
    if not item.Exists: continue
AttributeError: 'RedfishProperty' object has no attribute 'Exists'

Walked around with try/except on L1053 of catalog.py.

jautor commented 2 years ago

We will take a look at this. If you can post the debug log (or a snippet) to help us figure out why that is failing it would be helpful. Thanks!

mraineri commented 2 years ago

@dexpiper can you provide the text file produced with you add --debugging?

mraineri commented 2 years ago

May be addressed with recent update.