@@ -907,26 +907,22 @@ inline void handleSystemsLogServiceCollectionGet(
907907 {
908908 return ;
909909 }
910- if constexpr (BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
910+ if constexpr (! BMCWEB_EXPERIMENTAL_REDFISH_MULTI_COMPUTER_SYSTEM)
911911 {
912- // Option currently returns no systems. TBD
913- messages::resourceNotFound (asyncResp->res , " ComputerSystem" ,
914- systemName);
915- return ;
916- }
917- if (systemName != BMCWEB_REDFISH_SYSTEM_URI_NAME)
918- {
919- messages::resourceNotFound (asyncResp->res , " ComputerSystem" ,
920- systemName);
921- return ;
912+ if (systemName != BMCWEB_REDFISH_SYSTEM_URI_NAME)
913+ {
914+ messages::resourceNotFound (asyncResp->res , " ComputerSystem" ,
915+ systemName);
916+ return ;
917+ }
922918 }
923919
924920 // Collections don't include the static data added by SubRoute
925921 // because it has a duplicate entry for members
926922 asyncResp->res .jsonValue [" @odata.type" ] =
927923 " #LogServiceCollection.LogServiceCollection" ;
928- asyncResp->res .jsonValue [" @odata.id" ] = std::format (
929- " /redfish/v1/Systems/{}/LogServices" , BMCWEB_REDFISH_SYSTEM_URI_NAME );
924+ asyncResp->res .jsonValue [" @odata.id" ] =
925+ std::format ( " /redfish/v1/Systems/{}/LogServices" , systemName );
930926 asyncResp->res .jsonValue [" Name" ] = " System Log Services Collection" ;
931927 asyncResp->res .jsonValue [" Description" ] =
932928 " Collection of LogServices for this Computer System" ;
@@ -947,26 +943,23 @@ inline void handleSystemsLogServiceCollectionGet(
947943 {
948944 nlohmann::json::object_t dumpLog;
949945 dumpLog[" @odata.id" ] =
950- std::format (" /redfish/v1/Systems/{}/LogServices/Dump" ,
951- BMCWEB_REDFISH_SYSTEM_URI_NAME);
946+ std::format (" /redfish/v1/Systems/{}/LogServices/Dump" , systemName);
952947 logServiceArray.emplace_back (std::move (dumpLog));
953948 }
954949
955950 if constexpr (BMCWEB_REDFISH_CPU_LOG)
956951 {
957952 nlohmann::json::object_t crashdump;
958- crashdump[" @odata.id" ] =
959- std::format (" /redfish/v1/Systems/{}/LogServices/Crashdump" ,
960- BMCWEB_REDFISH_SYSTEM_URI_NAME);
953+ crashdump[" @odata.id" ] = std::format (
954+ " /redfish/v1/Systems/{}/LogServices/Crashdump" , systemName);
961955 logServiceArray.emplace_back (std::move (crashdump));
962956 }
963957
964958 if constexpr (BMCWEB_REDFISH_HOST_LOGGER)
965959 {
966960 nlohmann::json::object_t hostlogger;
967- hostlogger[" @odata.id" ] =
968- std::format (" /redfish/v1/Systems/{}/LogServices/HostLogger" ,
969- BMCWEB_REDFISH_SYSTEM_URI_NAME);
961+ hostlogger[" @odata.id" ] = std::format (
962+ " /redfish/v1/Systems/{}/LogServices/HostLogger" , systemName);
970963 logServiceArray.emplace_back (std::move (hostlogger));
971964 }
972965 asyncResp->res .jsonValue [" Members@odata.count" ] = logServiceArray.size ();
@@ -975,7 +968,7 @@ inline void handleSystemsLogServiceCollectionGet(
975968 " xyz.openbmc_project.State.Boot.PostCode" };
976969 dbus::utility::getSubTreePaths (
977970 " /" , 0 , interfaces,
978- [asyncResp](
971+ [asyncResp, systemName ](
979972 const boost::system::error_code& ec,
980973 const dbus::utility::MapperGetSubTreePathsResponse& subtreePath) {
981974 if (ec)
@@ -993,7 +986,7 @@ inline void handleSystemsLogServiceCollectionGet(
993986 nlohmann::json::object_t member;
994987 member[" @odata.id" ] = std::format (
995988 " /redfish/v1/Systems/{}/LogServices/PostCodes" ,
996- BMCWEB_REDFISH_SYSTEM_URI_NAME );
989+ systemName );
997990
998991 logServiceArrayLocal.emplace_back (std::move (member));
999992
0 commit comments