|
Post by AMI_Mani on Feb 28, 2022 18:24:06 GMT
Hi, We have install action in LicenseServic /redfish/v1/LicenseService/Actions/LicenseService.Install and as per schema we need to provide LicenseFileURI with TransferProtocol to download license. Can we have option to upload license file from local path instead of downloading from remote server?
Thanks, Mani
|
|
|
Post by mraineri on Feb 28, 2022 19:14:49 GMT
Yes, you can do that today by a POST to the LicenseCollection resource. "LicenseString" in the License resource is the only property marked as required-on-create. The semantics for installing a license map more cleanly to typical CRUD semantics, so the method we used for the UpdateService was not needed.
There is a potential behavioral consideration you might need to keep in mind; it's possible it doesn't affect you though. In the long description for "Licenses" in the LicenseService, there's the following text: "When installing a license with a POST operation to this collection, the service may update an existing License resource instead of creating a new resource. In these cases, the service shall respond with the HTTP 200 OK status code or HTTP 204 No Content status code and the Location header in the response shall contain the URI of the updated License resource."
|
|
|
Post by AMI_Mani on Mar 1, 2022 14:18:28 GMT
Yes, we can use Post method of license collection and pass license details as string. But copying license string from file may have non printable characters, so only asking whether we can have option to upload file in post method or install action
Thanks, Mani
|
|
|
Post by mraineri on Mar 1, 2022 14:23:52 GMT
"LicenseString" is Base64-encoded, so you can have non-printable characters in your license file; the encoding guarantees the resultant string can be put into a JSON payload. Even purely text-based licenses would be Base64-encoded.
|
|