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

OperatingConfigs error when coming under Processor of NetworkAdapters #540

Closed plmanik closed 1 year ago

plmanik commented 1 year ago

Hi , As per processor schema, we can have OperatingConfigs and when we ran validator getting this error(copied at end) In schema http://redfish.dmtf.org/schemas/v1/OperatingConfig.json we have uris": [ "/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/OperatingConfigs/{OperatingConfigId}" ] Showing OperatingConfigs is applicable to computersystem instance only. Is this needs to fix in validator or schema or we should not support OperatingConfigs in Network adapter processor?

ERROR - URI /redfish/v1/Chassis/Self/NetworkAdapters/DevType7_NIC0/Processors/DevType11_CPU0/OperatingConfigs/ID_0 does not match the following required URIs in Schema of OperatingConfig.v1_0_2.OperatingConfig

{ "@odata.context": "/redfish/v1/$metadata#OperatingConfig.v1_0_2.OperatingConfig", "@odata.etag": "\"1676360473\"", "@odata.id": "/redfish/v1/Chassis/Self/NetworkAdapters/DevType7_NIC0/Processors/DevType11_CPU0/OperatingConfigs/ID_0", "@odata.type": "#OperatingConfig.v1_0_2.OperatingConfig", "BaseSpeedMHz": 100, "BaseSpeedPrioritySettings": [ { "BaseSpeedMHz": 100, "CoreCount": 2, "CoreIDs": [ 2, 9 ] } ], "Id": "ID_0", "MaxJunctionTemperatureCelsius": 100, "MaxSpeedMHz": 150, "Name": "NameEmpty", "TDPWatts": 100, "TotalAvailableCoreCount": 10, "TurboProfile": [ { "ActiveCoreCount": 5, "MaxSpeedMHz": 150 } ] }

Thanks, Mani

mraineri commented 1 year ago

This isn't a tool issue; we do not have that URI defined in the schema file. We'll need to discuss this internally in the forum to see if it's appropriate to add this here since today the only use case identified for this resource is for system processors.

mraineri commented 1 year ago

From OperatingConfig_v1.xml

        <Annotation Term="Redfish.Uris">
          <Collection>
            <String>/redfish/v1/Systems/{ComputerSystemId}/Processors/{ProcessorId}/OperatingConfigs/{OperatingConfigId}</String>
           </Collection>
        </Annotation>
jcleung5549 commented 1 year ago

Regarding the statement "Showing OperatingConfigs is applicable to computersystem instance only. Is this needs to fix in validator or schema or we should not support OperatingConfigs in Network adapter processor?", Redfish model schema addresses the question of 'can', not 'should'. The question of 'should' is driven by either a Redfish Profile or to support an HW implementation. So if your SW implementation needs it, that what we need to know.

mraineri commented 1 year ago

@jcleung5549 with the schema definition today, it's not legal to put OperatingConfig beneath a NetworkAdapter. If the URI pattern is not defined in the schema file, it's non-conformant to use it in an implementation. The "Resource URI patterns annotation" clause of the Redfish Specification specifies this.

All Redfish resources and Redfish resource collections implemented by a service shall match the URI pattern described by the resource URI patterns annotation for their given definition.

The service validator checks for this rules to ensure the service aligns with our OpenAPI support.

mraineri commented 1 year ago

Closing as this is a service-side issue. Discussions will need to take place to see if the forum wants to allow OperatingConfig on non-system Processor resources.