Skip to content
Commit 6f284d24 authored by Jiaqing Zhao's avatar Jiaqing Zhao Committed by Ed Tanous
Browse files

log_service: Fix behavior of getting single PostCode entry

Currently getting single PostCode entry returns a LogEntryCollection
with the specified LogEntry in its Members. Since Redfish Service
Validator does not follow the links in LogServiceCollection[1], such
unexpected behavior passes the validator. This commit makes it return
the LogEntry itself (or 404 Not Found) when requesting it.

Fixes Github issue #236 (https://github.com/openbmc/bmcweb/issues/236)

[1] https://github.com/DMTF/Redfish-Service-Validator/issues/519



Tested:
* Confirmed getting a valid PostCode entry now returns a LogEntry, and
  getting invalid entries like B0-1, B1-0, B1-999 or 123 (Not properly-
  formatted ID) responds with 404 Not Found.
* Get PostCode log entries collection still returns LogEntryCollection
  containing first 1000 PostCode entries by default.
* Redfish Service Validator passed.

Change-Id: Ice6b8742caea96ad3d436d57898202fe7362b150
Signed-off-by: default avatarJiaqing Zhao <jiaqing.zhao@intel.com>
parent 2d6cb56b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment