Home
last modified time | relevance | path

Searched hist:c951448a (Results 1 – 1 of 1) sorted by relevance

/openbmc/bmcweb/redfish-core/lib/
H A Dprocessor.hppc951448a Wed Feb 24 11:20:51 CST 2021 Jonathan Doman <jonathan.doman@intel.com> Refactor Processor object lookup

In order to reuse the D-Bus lookup logic for both GET and PATCH
requests, separate the GetSubTree call from the processing loop.
This way, we can have one common place to determine if 404 Not Found
should be returned for any type of Processor request.

This also improves 404 handling by filtering out those objects which
don't implement Item.Cpu or Item.Accelerator. Previously it was possible
to request e.g. /redfish/v1/Systems/system/Processors/dimm0 and get back
some information about that DIMM. This change will ensure non-CPU items
return a 404.

Tested:
- All links in the ProcessorCollection return the same data that they
did before this change.
- Invalid Processor IDs (e.g. dimm0 from above) now return 404 error
message.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I0f09ba1189b7a068c8c0ffe136d19e9587765d18