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

Redfish collections don't implement the /Members route #192

Open
edtanous opened this issue Mar 24, 2021 · 1 comment
Open

Redfish collections don't implement the /Members route #192

edtanous opened this issue Mar 24, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@edtanous
Copy link
Contributor

Describe the bug
bmcweb Redfish collections appear to be modeled incorrectly according to the specification. Because the Members property within a collection is simply a list of resource references, with AutoExpandReferences enabled, Redfish expects that the equivalent /Members url to also return just the collection.

This subtlety isn't captured very well in the spec that I can find without looking at the OData XML, although it is eluded to in section 8.8

... if a client adds a member to the resource collection at /redfish/v1/EventService/
Subscriptions , it can send a POST request to either /redfish/v1/EventService/Subscriptions or /redfish/
v1/EventService/Subscriptions/Members .

This implies that everywhere we have a collection, we also need a URI route to handle the POST (and maybe the GET) on /Members as well

This is causing us to fail the newly added REQ_POST_CREATE_TO_MEMBERS_PROP test.

This means that EVERY collection within bmcweb needs to change. At some point I'd like to get some more concrete wording in the specification to ensure that this is correct. Considering that we haven't hit this before, it seems to mostly just be a compliance issue.

Environment
What OpenBMC platform was this found on?
Issue exists on all platforms. Tested in Qemu.

What specific OpenBMC versions did you use?
9f410ccf2825825c8a3dafed00eb11aef4ffe2da

To Reproduce
Steps to reproduce the behavior:

  1. Boot system in qemu
  2. Run Redfish protocol validator with
python3 rf_protocol_validator.py --no-cert-check --user root --password 0penBmc -r https://192.168.7.2 --log-level DEBUG --avoid-http-redirect
  1. Observe REQ_POST_CREATE_TO_MEMBERS_PROP test failing.

Is this a regression
No

@edtanous edtanous added the bug Something isn't working label Mar 24, 2021
@gtmills
Copy link
Member

gtmills commented Oct 14, 2021

Recently ran the protocol validator, I see this too.
members

bradbishop pushed a commit that referenced this issue Mar 24, 2022
The Members property within resources is expected to allow create in the
same way the Collection resource does.  From the spec:

Submitting a POST request to a resource collection is equivalent to
submitting the same request to the Members property of that resource
collection. Services that support the addition of Members to a resource
collection shall support both forms.

Related: #192

Tested:
Redfish protocol validator, REQ_POST_CREATE_TO_MEMBERS_PROP now passes.

Signed-off-by: Ed Tanous <[email protected]>
Change-Id: I5c22325946eab9aec8c690450aa2ea24a6e4e485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants