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
37 stars 33 forks source link

Should OEM actions schema checker look in /redfish/v1/JsonSchemas? #581

Closed blakehilliard closed 2 months ago

blakehilliard commented 2 months ago

I have an OEM action like this:

    "@odata.id": "/redfish/v1/CompositionService",
    "Actions": {
        "Oem": {
            "#Hpe_H3_CompositionService.ComposeDefault": {
                "@Redfish.ActionInfo": "/redfish/v1/Hpe_H3_CompositionService.ComposeDefaultActionInfo",
                "target": "/redfish/v1/CompositionService/Actions/Oem/Hpe_H3_CompositionService.ComposeDefault"
            }
        }
    },

And a matching schema in /redfish/v1/JsonSchemas:

    "Members": [
        ...
        {
            "@odata.id": "/redfish/v1/JsonSchemas/Hpe_H3_CompositionService"
        }

But Redfish-Service-Validator is flagging this as an error with:

ERROR - Actions: Could not finish check on this property (Could not find any Schema with these parameters Hpe_H3_CompositionService)

When I inspect the list of schemas it is looking through (self.catalog_by_class in catalog.py), that list does not appear to use anything from the OEM schemas listed in /redfish/v1/JsonSchemas. It looks like only a list of schemas downloaded directly from DMTF.

mraineri commented 2 months ago

No, this tool is entirely driven from CSDL. If you're not representing OEM definitions with CSDL, it won't be able to verify OEM extensions.

blakehilliard commented 2 months ago

Is that a limitation of this tool, or are OEM JSON schemas linked from /redfish/v1/JsonSchemas not sufficient according to a "shall" requirement in the redfish spec? I can't find a clear answer in https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.20.0.html, but IIRC someone told me years ago that JSON schemas for OEM is sufficient.

mraineri commented 2 months ago

It's just how the tool is designed; it's not a service requirement to support CSDL per Redfish. The tool was only scoped to perform verification with CSDL.

blakehilliard commented 2 months ago

Then shouldn't this be flagged at most as a warning rather than as an error?

mraineri commented 2 months ago

Yes, it should be a warning