diff options
Diffstat (limited to 'redfish-core/lib/service_root.hpp')
-rw-r--r-- | redfish-core/lib/service_root.hpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp index 6ae16c3780..2fc35150dd 100644 --- a/redfish-core/lib/service_root.hpp +++ b/redfish-core/lib/service_root.hpp @@ -62,10 +62,11 @@ inline void handleServiceRootGetImpl( "/redfish/v1/SessionService/Sessions"; asyncResp->res.jsonValue["AccountService"]["@odata.id"] = "/redfish/v1/AccountService"; -#ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION - asyncResp->res.jsonValue["AggregationService"]["@odata.id"] = - "/redfish/v1/AggregationService"; -#endif + if constexpr (BMCWEB_REDFISH_AGGREGATION) + { + asyncResp->res.jsonValue["AggregationService"]["@odata.id"] = + "/redfish/v1/AggregationService"; + } asyncResp->res.jsonValue["Chassis"]["@odata.id"] = "/redfish/v1/Chassis"; asyncResp->res.jsonValue["JsonSchemas"]["@odata.id"] = "/redfish/v1/JsonSchemas"; @@ -95,16 +96,18 @@ inline void handleServiceRootGetImpl( protocolFeatures["ExcerptQuery"] = false; protocolFeatures["ExpandQuery"]["ExpandAll"] = - bmcwebInsecureEnableQueryParams; + BMCWEB_INSECURE_ENABLE_REDFISH_QUERY; // This is the maximum level defined in ServiceRoot.v1_13_0.json - if (bmcwebInsecureEnableQueryParams) + if constexpr (BMCWEB_INSECURE_ENABLE_REDFISH_QUERY) { protocolFeatures["ExpandQuery"]["MaxLevels"] = 6; } - protocolFeatures["ExpandQuery"]["Levels"] = bmcwebInsecureEnableQueryParams; - protocolFeatures["ExpandQuery"]["Links"] = bmcwebInsecureEnableQueryParams; + protocolFeatures["ExpandQuery"]["Levels"] = + BMCWEB_INSECURE_ENABLE_REDFISH_QUERY; + protocolFeatures["ExpandQuery"]["Links"] = + BMCWEB_INSECURE_ENABLE_REDFISH_QUERY; protocolFeatures["ExpandQuery"]["NoLinks"] = - bmcwebInsecureEnableQueryParams; + BMCWEB_INSECURE_ENABLE_REDFISH_QUERY; protocolFeatures["FilterQuery"] = false; protocolFeatures["OnlyMemberQuery"] = true; protocolFeatures["SelectQuery"] = true; |