summaryrefslogtreecommitdiff
path: root/redfish-core/lib/hypervisor_system.hpp
diff options
context:
space:
mode:
authorJonathan Doman <jonathan.doman@intel.com>2021-02-24 20:20:51 +0300
committerEd Tanous <ed@tanous.net>2021-03-20 01:03:21 +0300
commitc951448acb5c81a69569326c080b1a50e5678cbf (patch)
tree249eadcb382f98b115605b4e9e26404b9fc239b7 /redfish-core/lib/hypervisor_system.hpp
parent6c9a279eeec173dd64bf4866beec90839f1a1a42 (diff)
downloadbmcweb-c951448acb5c81a69569326c080b1a50e5678cbf.tar.xz
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
Diffstat (limited to 'redfish-core/lib/hypervisor_system.hpp')
0 files changed, 0 insertions, 0 deletions