Searched hist:a6b9125ff91500afed34dc923e9bafb90da75ec4 (Results 1 – 2 of 2) sorted by relevance
/openbmc/bmcweb/redfish-core/include/ |
H A D | query.hpp | diff a6b9125ff91500afed34dc923e9bafb90da75ec4 Mon Apr 04 15:10:40 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query parameter: add a way to delegate certain parameter
The generic query parameter handlers might not be performant, e.g., Expand in the sensor collections. This change adds a way to delegate query parameter processsing to redfish-core codes:
1. introduced a separate struct in the setUpRedfishRoute function, with which redfish-core codes can easily set delegation for each parameter; for example, the children patch of this PR will implement an efficient handler for sensor collection Expand, top, and skip. 2. introduced a separate Redfish route for delegation; this routes takes the struct described above and changes the query object so that query parameters are delegated. 3. in order to avoid copying Query objects and run delegation check twice, the |setUpRedfishRouteWithDelegation| function sets |delegated| so that callers can directly use it to determinte if delegation is needed, and what delegated Queries are
Tested: 1. added unit tests 2. the default redfish route is still working correctly
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I77597ad7e8b40ac179d86dc9be1a35767cc61284
|
/openbmc/bmcweb/redfish-core/include/utils/ |
H A D | query_param.hpp | diff a6b9125ff91500afed34dc923e9bafb90da75ec4 Mon Apr 04 15:10:40 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query parameter: add a way to delegate certain parameter
The generic query parameter handlers might not be performant, e.g., Expand in the sensor collections. This change adds a way to delegate query parameter processsing to redfish-core codes:
1. introduced a separate struct in the setUpRedfishRoute function, with which redfish-core codes can easily set delegation for each parameter; for example, the children patch of this PR will implement an efficient handler for sensor collection Expand, top, and skip. 2. introduced a separate Redfish route for delegation; this routes takes the struct described above and changes the query object so that query parameters are delegated. 3. in order to avoid copying Query objects and run delegation check twice, the |setUpRedfishRouteWithDelegation| function sets |delegated| so that callers can directly use it to determinte if delegation is needed, and what delegated Queries are
Tested: 1. added unit tests 2. the default redfish route is still working correctly
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I77597ad7e8b40ac179d86dc9be1a35767cc61284
|