|
Post by jyundt on Mar 31, 2022 21:13:48 GMT
What is the expected behavior with a failed SubordinateToResource requirement? As an example, I'm using the following test Interop Profile: { "SchemaDefinition": "RedfishInteroperabilityProfile.v1_5_0", "ProfileName": "test", "ProfileVersion": "0.0.1", "Protocol": { "MinVersion": "1.6", "Discovery": "None", "HostInterface": "Mandatory", "ExpandQuery": "Recommended", "FilterQuery": "Recommended", "SelectQuery": "Recommended", "OnlyQuery": "Recommended", "ExcerptQuery": "Recommended" }, "Resources": { "Memory":{ "ReadRequirement": "Mandatory", "ConditionalRequirements": [{ "ReadRequirement": "Mandatory", "SubordinateToResource": [ "Manager", "MemoryCollection" ] }] } } }
I would expect this to fail because there isn't a Manager -> MemoryCollection -> Memory relationship. However, I don't seem to be getting any failures. I've attached the log and HTML log for reference. InteropLog_03_31_2022_165759.txt (10.51 KB) InteropHtmlLog_03_31_2022_165759.html (27.66 KB)
|
|
|
Post by mraineri on Mar 31, 2022 22:53:35 GMT
It seems like a bug to me. Can you please file an issue on GitHub so we can track it?
One thing I would recommend though is since URI patterns were established with Redfish 1.6.0, we've added "URIs" as an alternative for the "SubordinateToResource" usage. That way instead of calling out resource hierarchy, you can simply use the URI pattern for which you want to specify requirements.
|
|
|
Post by jyundt on Apr 1, 2022 14:20:00 GMT
Opened DMTF/Redfish-Interop-Validator#144 for this. After reading DSP0272, would a URI based check look like this instead: { "SchemaDefinition": "RedfishInteroperabilityProfile.v1_5_0", "ProfileName": "test", "ProfileVersion": "0.0.1", "Protocol": { "MinVersion": "1.6", "Discovery": "None", "HostInterface": "Mandatory", "ExpandQuery": "Recommended", "FilterQuery": "Recommended", "SelectQuery": "Recommended", "OnlyQuery": "Recommended", "ExcerptQuery": "Recommended" }, "Resources": { "Manager":{ "PropertyRequirements": { "MemoryCollection": { "PropertyRequirements": { "Memory":{} } } } } } }
|
|
|
Post by mraineri on Apr 1, 2022 16:32:17 GMT
It would look something like this:
{ "SchemaDefinition": "RedfishInteroperabilityProfile.v1_5_0", "ProfileName": "test", "ProfileVersion": "0.0.1", "Protocol": { "MinVersion": "1.6", "Discovery": "None", "HostInterface": "Mandatory", "ExpandQuery": "Recommended", "FilterQuery": "Recommended", "SelectQuery": "Recommended", "OnlyQuery": "Recommended", "ExcerptQuery": "Recommended" }, "Resources": { "Memory":{ "ReadRequirement": "Mandatory", "ConditionalRequirements": [{ "ReadRequirement": "Mandatory", "URIs": [ "/redfish/v1/Managers/{ManagerId}/Memory/{MemoryId}" ] }] } } } But keep in mind with this example, we don't have "Memory" defined under Manager today.
|
|
|
Post by jyundt on Apr 1, 2022 16:49:01 GMT
Apologies if I'm missing something obvious, but is that URI syntax documented somewhere? I based my snippet from the example in the DSP0272 doc:  "/redfish/v1/Managers/{ManagerId}/Memory/{MemoryId}"
Are ManagerId and MemoryId variables in this example? Or would I need to explicitly define the URI? i.e. "/redfish/v1/Managers/1/Memory/5"
Ah yes, to clarify I'm trying to explicitly test failure scenarios to make sure our Interop Profile (and the tooling) is working as expected.
|
|
|
Post by mraineri on Apr 1, 2022 17:15:38 GMT
You can use the braces as I've shown to act as wildcards in the profile. You can also use exact values as needed too if you need exact matches, but doing so may not be very portable for other services.
|
|
|
Post by jyundt on Apr 1, 2022 19:00:56 GMT
You can use the braces as I've shown to act as wildcards in the profile. You can also use exact values as needed too if you need exact matches, but doing so may not be very portable for other services. Is there a possibility that using the URI syntax could be hitting the same issue as DMTF/Redfish-Interop-Validator#144I ask, because I'm using the snippet you provided and I'm still not getting a failure.
|
|