diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2021-01-29 18:01:30 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2021-04-02 21:15:08 +0300 |
commit | 400fd1fb4020028ad58b1cfd965f26d21f63b8c8 (patch) | |
tree | 5ae7d7ab14cd02d6246bd0c14785a9c1370f1818 /meson_options.txt | |
parent | f86bb901bf02b65ed25bc4545aaebe0f4dc891b3 (diff) | |
download | bmcweb-400fd1fb4020028ad58b1cfd965f26d21f63b8c8.tar.xz |
log_services: Add download of log entries
Add a GET function for endpoint
/redfish/v1/Systems/system/LogServices/EventLog/attachment/<str>
which would read the File Path property of the specified entry,
encode it as base64, and send it off. This allows the user to
offload error logs for analysis and further parsing if needed.
An http header of "Accept: application/octet-stream" or the default "*/*"
is expected.
Tested:
- Ran Redfish validator.
- Verified the contents of the offloaded file were the same as
the file in the BMC, after decoding it with a base64 decoder.
curl -k -H "X-Auth-Token: $token" \
https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/attachment/2
- Verified the supported Accept header values, ex:
"Accept: application/octet-stream;q=1"
"Accept: text/plain;q=0,application/octet-stream;q=1,multipart/form-data;q=2"
- Verified an unsupported Accept header returned "Bad Request", ex:
curl -k -H "X-Auth-Token: $token" -H "Accept: application/*"
curl -k -H "X-Auth-Token: $token" -H "Accept: foo, not/supported"
- Verified 404 was returned for a not found endpoint:
$ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/attachment/foo
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type EventLogAttachment named foo was not found.",
"MessageArgs": [
"EventLogAttachment",
"foo"
],
"MessageId": "Base.1.8.1.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier and resubmit the request."
}
],
"code": "Base.1.8.1.ResourceNotFound",
"message": "The requested resource of type EventLogAttachment named foo was not found."
}
}
Change-Id: Id9e2308ebedc70852a2ed62def107648f7e6fb7a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meson_options.txt')
0 files changed, 0 insertions, 0 deletions