AdiF
Minnow
Posts: 15
|
Post by AdiF on Aug 7, 2023 19:25:44 GMT
Is it feasible to include a file of up to 64KB size as part of the response in the TaskCompletedOK message? The intention is to return a profile file to the user upon an OEM Action, which is saved and managed in the BMC. The idea is to attach the file as a byte string to the TaskCompletedOK message. Are there any potential challenges or considerations to be aware of in implementing this process?
|
|
|
Post by mraineri on Aug 7, 2023 19:33:51 GMT
Not to the message itself; that would break the usage of the TaskCompletedOK message as defined today.
However, I don't think adding it to the task messages or task itself is the right thing to do here anyway. When a client is monitoring its operation, the final response will be the operation results (NOT the completed task). In your case, it might make more sense to define a response payload for your action, so that way you're not tied to the task construct as a way of sending the information back to the user. Take a look at how "GenerateCSR" in "CertificateService" has a response payload (using ReturnType in CSDL); you should be able to leverage this modeling method for your OEM action.
|
|
AdiF
Minnow
Posts: 15
|
Post by AdiF on Aug 7, 2023 20:08:49 GMT
Thanks, that looks like a good ideal. How do we know that redfish response will not return before the CSR is created, read and copy to the respond?
|
|
|
Post by mraineri on Aug 7, 2023 20:30:46 GMT
That's entirely up to the service to dictate. If it's a short operation, they just hold off on sending the HTTP response until the data is ready. If it's a long operation, they use a task to track that a response isn't ready yet and is being constructed in the background.
|
|
|
Post by nschellenberger on Aug 11, 2023 1:05:29 GMT
I assume that the usual escape hatches of Message.Oem.Foo and/or @com.foo.annotation are also valid (if discouraged)?
|
|
|
Post by mraineri on Aug 11, 2023 12:27:08 GMT
Yes, those are technically valid, but from a modeling perspective is very awkward to convey action response data.
|
|