Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the parent-child relationship to be unique? #158

Open
JordanCHW opened this issue Jun 8, 2022 · 2 comments
Open

Should the parent-child relationship to be unique? #158

JordanCHW opened this issue Jun 8, 2022 · 2 comments

Comments

@JordanCHW
Copy link
Contributor

JordanCHW commented Jun 8, 2022

I was trying to validate a subprocessor which its URL would be like /redfish/v1/Systems/system0/Processors/cpu0/SubProcessors/core0 and want to leverage the SubordinateToResource to specify its location in the Redfish tree. In my imagination it should be

SubordinateToResource = [
    "ComputerSystemCollection",  # /redfish/v1/Systems
    "ComputerSystem",            # /redfish/v1/Systems/system0
    "ProcessorCollection",       # /redfish/v1/Systems/system0/Processors
    "Processor",                 # /redfish/v1/Systems/system0/Processors/cpu0
    "ProcessorCollection"        # /redfish/v1/Systems/system0/Processors/cpu0/SubProcessors
]

But it seems the validator builds the parent of /redfish/v1/Systems/system0/Processors/cpu0 by the Link property in Chassis resource, so the actual relationship built by validator would be:

[
    "ChassisCollection",       # /redfish/v1/Chassis
    "Chassis",                 # /redfish/v1/Chassis/chassis0
    "Processor",               # /redfish/v1/Systems/system0/Processors/cpu0
    "ProcessorCollection"      # /redfish/v1/Systems/system0/Processors/cpu0/SubProcessors
]

Is that an expected behavior?

@JordanCHW JordanCHW changed the title Should the parent of the resource set by a "Link" property? The parent-child relationship built by validator against SubordinateToResource Jun 8, 2022
@JordanCHW JordanCHW changed the title The parent-child relationship built by validator against SubordinateToResource Should the parent-child relationship to be unique? Jun 8, 2022
@mraineri
Copy link
Contributor

Your usage is correct; the Link property in Chassis is not supposed to have an effect in this since resources found inside "Links" are not subordinate to that resource.

@mraineri
Copy link
Contributor

To clarify, this does appear to be a bug in the tool; the tool should be building the subordinate resource list without stepping into Links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants