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

Redfish Service Validator issue related to Oem Schema #566

Closed manipk01 closed 4 months ago

manipk01 commented 11 months ago

Hi All,

When i ran the Redfish Service Validator to validate redfish service. Below mentioned issue came for the URI

URI:

/redfish/v1/Systems/{{instance}}

Issue:

ERROR - contoso : EntityType resource does not contain required @odata.id property, attempting default /contoso

Response:

{ "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.etag": "\"1697014972\"", "@odata.id": "/redfish/v1/Systems/{{instance}}", "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", ................... ................... ................... "Oem": { "contoso": { "@odata.type": "#Contoso.v1_0_0.Contoso", "property1" : "value" "property2" : "value" } } ................. ................. ................. }

Schema (Contoso_v1.xml) : Schema File.zip

When i change the Entity type to complex type in schema part

`

    <Annotation Term="OData.LongDescription" String="This property shall specify a valid odata or Redfish property."/>
    <Property Name="property1" Type="Contoso.v1_0_0.property1" Nullable="false"></Property>
    <Property Name="property2" Type="Contoso.v1_0_0.property2" Nullable="false"></Property>

`

to

`

    <Annotation Term="OData.LongDescription" String="This property shall specify a valid odata or Redfish property."/>
    <Property Name="property1" Type="Contoso.v1_0_0.property1" Nullable="false"></Property>
    <Property Name="property2" Type="Contoso.v1_0_0.property2" Nullable="false"></Property>

`

it is working fine. So whether we can change to complex type for fixing this error or it needs to check from tool side. Complete schema file is attached for your reference.

Please check and confirm it.

Thanks, Mani P K

mraineri commented 11 months ago

That behavior looks correct then. When you define something as an EntityType in CSDL, the expectation is it's a resource with a durable URI (shown by an @odata.id propert). OEM objects are not intended to be like this; they are just JSON objects in a resource, which means you need to use ComplexType to define that structure.

mraineri commented 4 months ago

Closing; issue with the OEM definition and not the tool