-
Notifications
You must be signed in to change notification settings - Fork 113
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
Allow to query individually an entry #341
Comments
That makes sense. But I'll need to think a little about this to see how it could fit. There are a couple other options. Assuming you've already retrieved all of the outputs, identified the outlet that you care about, and are doing additional updates to that object and just want to get a fresh instance of it, all objects have an ODataID. This can be used to get the object directly with something like: myOutlet, err := redfish.GetOutlet(client, outlets[3].ODataID) If you don't have the full collection of all outlet, but you know it will always be the same thing, you can basically do the same but just hardcode the URI. Basically with how you are doing it in the example you provided, but without needing to do the lower level |
I know it should not be done 80% of the time, but in specific cases I think there would be value in allowing to query only one element of a collection.
When we only need to change the state of one subelement when we know the naming/numbering is constant, forcing to query all the n entries is essentially a waste of time.
This can currently be bypassed by doing something like this:
but I do not really like the idea and having a
rPdu.Outlets.Get(outletId.String())
would be much better in my opinion!What do you think?
The text was updated successfully, but these errors were encountered: