summaryrefslogtreecommitdiff
path: root/include/google/google_service_root.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/google/google_service_root.hpp')
-rw-r--r--include/google/google_service_root.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp
index d802d00b1f..f14cffe20b 100644
--- a/include/google/google_service_root.hpp
+++ b/include/google/google_service_root.hpp
@@ -9,6 +9,8 @@
#include <utils/hex_utils.hpp>
#include <utils/json_utils.hpp>
+#include <array>
+#include <string_view>
#include <vector>
namespace crow
@@ -37,9 +39,11 @@ inline void handleRootOfTrustCollectionGet(
asyncResp->res.jsonValue["@odata.id"] = "/google/v1/RootOfTrustCollection";
asyncResp->res.jsonValue["@odata.type"] =
"#RootOfTrustCollection.RootOfTrustCollection";
+ const std::array<std::string_view, 1> interfaces{
+ "xyz.openbmc_project.Control.Hoth"};
redfish::collection_util::getCollectionMembers(
asyncResp, boost::urls::url("/google/v1/RootOfTrustCollection"),
- {"xyz.openbmc_project.Control.Hoth"}, "/xyz/openbmc_project");
+ interfaces, "/xyz/openbmc_project");
}
// Helper struct to identify a resolved D-Bus object interface
@@ -94,7 +98,7 @@ inline void resolveRoT(const std::string& command,
ResolvedEntityHandler&& entityHandler)
{
- std::array<std::string, 1> hothIfaces = {
+ constexpr std::array<std::string_view, 1> hothIfaces = {
"xyz.openbmc_project.Control.Hoth"};
crow::connections::systemBus->async_method_call(
[command, asyncResp, rotId,