-
Notifications
You must be signed in to change notification settings - Fork 119
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
ComputerSystem.Reset add response data to function return #246
Comments
Thanks, this looks like it would be good to expand on these types of actions. At least in the case of /redfish/v1/Systems/{ComputerSystemId}/Actions/ComputerSystem.Reset:
post:
parameters:
- description: The value of the Id property of the ComputerSystem resource
in: path
name: ComputerSystemId
required: true
type: string
requestBody:
content:
application/json:
schema:
$ref: http://redfish.dmtf.org/schemas/v1/ComputerSystem.v1_6_0.yaml#/components/schemas/ResetRequestBody
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: The response contains the results of the Reset action
'202':
content:
application/json:
schema:
$ref: http://redfish.dmtf.org/schemas/v1/Task.v1_4_0.yaml#/components/schemas/Task
description: Accepted; a task has been generated
'204':
description: Success, but no response data
default:
content:
application/json:
schema:
$ref: '#/components/schemas/RedfishError'
description: Error condition |
Excellent! Before I get in over my head with trying to implement that, would you suggest using a common.Operations object or a Task object or just return the raw URL string with the task link if a 202? |
I think it should probably return a The tricky part of this is going to be that the current The big downside of doing that is it will require updating everywhere that a Then the That's my quick take at least. If you start looking in to this and have a better approach, I'd be very happy to hear it. :) |
That was my conclusion as well, but I wasn't sure if its as a good one! I will see what I can do for a first pass and I'd very much appreciate any feedback you'd give me on my approach. |
This is very much a WIP set of changes: I did specific testing around Tasks and the Reset method, but there were changes in a number of other files that will need more thorough testing if this is a suitable direction to go. I also made a small change around the service service.Tasks() method not returning data that was unrelated to my changes, but I couldn't test reliably without updating. Feedback welcome! |
Here:
gofish/redfish/computersystem.go
Lines 850 to 875 in da46c13
With many Redfish implementations now returning additional data (task urls specifically) it would be appreciated if the function above (and probably others) also returned the response or select attributes of it to the caller.
The text was updated successfully, but these errors were encountered: