summaryrefslogtreecommitdiff
path: root/redfish-core/lib/service_root.hpp
diff options
context:
space:
mode:
authorNan Zhou <nanzhoumails@gmail.com>2022-03-23 19:13:46 +0300
committerEd Tanous <ed@tanous.net>2022-03-29 04:56:21 +0300
commit9629907de7880c0853bb4d5b9c624c452a598861 (patch)
tree889c8359074c274b72692bd09e58786b3f9bbb5d /redfish-core/lib/service_root.hpp
parent7772638ea777820234e6004ee63dc558e629e35e (diff)
downloadbmcweb-9629907de7880c0853bb4d5b9c624c452a598861.tar.xz
service root: add ProtocolFeaturesSupported
This commits adds a dummy ProtocolFeaturesSupported object in the service root. It indicates that none of the Query Parameter is supported. Future commits will add supports for OnlyMemberQuery, ExpandQuery, and so on. Tested: 1. unit test 2. passed QEMU Redfish (which contains Redfish Validator) test This commit is split from these changes: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/38952 https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/47474 Credits to maxiaochao@inspur.com, ed@tanous.net, and zhanghch05@inspur.com. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I81ff856514528f63a462558a8f18fefe4369edae
Diffstat (limited to 'redfish-core/lib/service_root.hpp')
-rw-r--r--redfish-core/lib/service_root.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index 2a1803d84b..e2f32bbef9 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -16,6 +16,9 @@
#pragma once
#include <app.hpp>
+#include <async_resp.hpp>
+#include <http_request.hpp>
+#include <nlohmann/json.hpp>
#include <persistent_data.hpp>
#include <registries/privilege_registry.hpp>
#include <utils/systemd_utils.hpp>
@@ -64,6 +67,19 @@ inline void
asyncResp->res.jsonValue["TelemetryService"] = {
{"@odata.id", "/redfish/v1/TelemetryService"}};
asyncResp->res.jsonValue["Cables"] = {{"@odata.id", "/redfish/v1/Cables"}};
+
+ nlohmann::json& protocolFeatures =
+ asyncResp->res.jsonValue["ProtocolFeaturesSupported"];
+ protocolFeatures["ExcerptQuery"] = false;
+ protocolFeatures["ExpandQuery"]["ExpandAll"] = false;
+ protocolFeatures["ExpandQuery"]["Levels"] = false;
+ protocolFeatures["ExpandQuery"]["Links"] = false;
+ protocolFeatures["ExpandQuery"]["NoLinks"] = false;
+ protocolFeatures["FilterQuery"] = false;
+ protocolFeatures["OnlyMemberQuery"] = false;
+ protocolFeatures["SelectQuery"] = false;
+ protocolFeatures["DeepOperations"]["DeepPOST"] = false;
+ protocolFeatures["DeepOperations"]["DeepPATCH"] = false;
}
inline void requestRoutesServiceRoot(App& app)