|
Post by tonyy on Nov 28, 2023 4:39:49 GMT
Hi there, According to the definition of CPER in LogEntry, there are three properties here(Oem, NotificationType and SectionType). When I tried to add the CPER in LogEntry like the following case, the redfish validator would report errors(This complex object Tonyy should be a dictionary or None, but it's of type str...). The rest properties failed to check.
"CPER": {
"Oem": {
"Tonyy": "1234" } }
After changing the format to dictionary like this, the redfish validator still reported errors (This object's type Oem should be a Collection, but it's of type Resource.Oem...) The rest properties still could be checked
"CPER": {
"Oem": [
[
"Tonyy" ] ]
}
As far as I know, Oem property should be an object defined in DSP2046 instead of array. Do I miss something here? Could anyone help me to clarify it? thanks.
|
|
|
Post by tonyy on Nov 28, 2023 9:21:01 GMT
Hi there, Sorry, I'm new to redfish. After studying, I think the field is defined by OEM, therefore, there is no default corresponding schema for that as the redfish validator doesn't know the definition of the field. If we want to verify it, we need to add OEM schema for it or add `--nooemcheck` to run. Is my thought correct? thanks!
|
|
|
Post by mraineri on Nov 28, 2023 13:54:39 GMT
The "OEM property format and content" and "OEM property examples" clauses in the Redfish Specification show how OEM objects are structured. The expectation is there is a nesting of JSON objects in the "Oem" property. So, in your case, you could have something like this:
"CPER": { "Oem": { "MyCompanyName": { "@odata.type": "MyCompanyNameLogEntry.v1_0_0.CPER", "Tonyy": "1234" } } } The key thing here is inside of "Oem" there's yet another object named specifically for who is extending the resource (typically the name of a company). This is to cover cases where multiple OEM extensions are needed in a single Redfish service. Inside of this JSON object are your OEM properties. You'll also need an "@odata.type" property in order to point to your schema definition of the object so that clients and other consumers of the interface have programmatic structures to decode the OEM extenion.
|
|
|
Post by tonyy on Nov 30, 2023 2:20:27 GMT
Thanks. It works now.
|
|