summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 2899b011f6..116bc8acb8 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -569,7 +569,7 @@ inline void
}
asyncResp->res.jsonValue["Members@odata.count"] = entriesArray.size();
asyncResp->res.jsonValue["Members"] = std::move(entriesArray);
- });
+ });
}
inline void
@@ -669,15 +669,15 @@ inline void
entryID);
return;
}
- });
+ });
}
inline void deleteDumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& entryID,
const std::string& dumpType)
{
- auto respHandler =
- [asyncResp, entryID](const boost::system::error_code& ec) {
+ auto respHandler = [asyncResp,
+ entryID](const boost::system::error_code& ec) {
BMCWEB_LOG_DEBUG("Dump Entry doDelete callback: Done");
if (ec)
{
@@ -1022,7 +1022,7 @@ inline void createDumpTaskCallback(
createdObjPath.str);
taskData->state = "Completed";
return task::completed;
- },
+ },
"type='signal',interface='org.freedesktop.DBus.Properties',"
"member='PropertiesChanged',path='" +
createdObjPath.str + "'");
@@ -1032,7 +1032,7 @@ inline void createDumpTaskCallback(
task->startTimer(std::chrono::minutes(6));
task->populateResp(asyncResp->res);
task->payload.emplace(payload);
- },
+ },
"xyz.openbmc_project.Dump.Manager", createdObjPath,
"org.freedesktop.DBus.Introspectable", "Introspect");
}
@@ -1166,7 +1166,7 @@ inline void createDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
BMCWEB_LOG_DEBUG("Dump Created. Path: {}", objPath.str);
createDumpTaskCallback(std::move(payload), asyncResp, objPath);
- },
+ },
"xyz.openbmc_project.Dump.Manager",
"/xyz/openbmc_project/dump/" +
std::string(boost::algorithm::to_lower_copy(dumpType)),
@@ -1187,7 +1187,7 @@ inline void clearDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
messages::internalError(asyncResp->res);
return;
}
- },
+ },
"xyz.openbmc_project.Dump.Manager",
"/xyz/openbmc_project/dump/" + dumpTypeLowerCopy,
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
@@ -1323,8 +1323,8 @@ inline void requestRoutesSystemLogServiceCollection(App& app)
return;
}
}
- });
});
+ });
}
inline void requestRoutesEventLogService(App& app)
@@ -1367,7 +1367,7 @@ inline void requestRoutesEventLogService(App& app)
{"target",
"/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog"}};
- });
+ });
}
inline void requestRoutesJournalEventLogClear(App& app)
@@ -1412,11 +1412,11 @@ inline void requestRoutesJournalEventLogClear(App& app)
}
messages::success(asyncResp->res);
- },
+ },
"org.freedesktop.systemd1", "/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager", "ReloadUnit", "rsyslog.service",
"replace");
- });
+ });
}
enum class LogParseError
@@ -1611,7 +1611,7 @@ inline void requestRoutesJournalEventLogEntryCollection(App& app)
"/redfish/v1/Systems/system/LogServices/EventLog/Entries?$skip=" +
std::to_string(skip + top);
}
- });
+ });
}
inline void requestRoutesJournalEventLogEntry(App& app)
@@ -1689,7 +1689,7 @@ inline void requestRoutesJournalEventLogEntry(App& app)
}
// Requested ID was not found
messages::resourceNotFound(asyncResp->res, "LogEntry", targetID);
- });
+ });
}
inline void requestRoutesDBusEventLogEntryCollection(App& app)
@@ -1884,8 +1884,8 @@ inline void requestRoutesDBusEventLogEntryCollection(App& app)
asyncResp->res.jsonValue["Members@odata.count"] =
entriesArray.size();
asyncResp->res.jsonValue["Members"] = std::move(entriesArray);
- });
});
+ });
}
inline void requestRoutesDBusEventLogEntry(App& app)
@@ -2001,8 +2001,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
"/redfish/v1/Systems/system/LogServices/EventLog/Entries/" +
std::to_string(*id) + "/attachment";
}
- });
});
+ });
BMCWEB_ROUTE(
app, "/redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/")
@@ -2048,8 +2048,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
messages::internalError(asyncResp->res);
return;
}
- });
});
+ });
BMCWEB_ROUTE(
app, "/redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/")
@@ -2083,8 +2083,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
dbus::utility::escapePathForDbus(entryID);
// Process response from Logging service.
- auto respHandler =
- [asyncResp, entryID](const boost::system::error_code& ec) {
+ auto respHandler = [asyncResp,
+ entryID](const boost::system::error_code& ec) {
BMCWEB_LOG_DEBUG("EventLogEntry (DBus) doDelete callback: Done");
if (ec)
{
@@ -2111,7 +2111,7 @@ inline void requestRoutesDBusEventLogEntry(App& app)
respHandler, "xyz.openbmc_project.Logging",
"/xyz/openbmc_project/logging/entry/" + entryID,
"xyz.openbmc_project.Object.Delete", "Delete");
- });
+ });
}
constexpr const char* hostLoggerFolderPath = "/var/log/console";
@@ -2225,7 +2225,7 @@ inline void requestRoutesSystemHostLogger(App& app)
asyncResp->res.jsonValue["Id"] = "HostLogger";
asyncResp->res.jsonValue["Entries"]["@odata.id"] =
"/redfish/v1/Systems/system/LogServices/HostLogger/Entries";
- });
+ });
}
inline void requestRoutesSystemHostLoggerCollection(App& app)
@@ -2315,7 +2315,7 @@ inline void requestRoutesSystemHostLoggerCollection(App& app)
std::to_string(skip + top);
}
}
- });
+ });
}
inline void requestRoutesSystemHostLoggerLogEntry(App& app)
@@ -2387,7 +2387,7 @@ inline void requestRoutesSystemHostLoggerLogEntry(App& app)
// Requested ID was not found
messages::resourceNotFound(asyncResp->res, "LogEntry", param);
- });
+ });
}
inline void handleBMCLogServicesCollectionGet(
@@ -2459,7 +2459,7 @@ inline void handleBMCLogServicesCollectionGet(
asyncResp->res.jsonValue["Members@odata.count"] =
logServiceArrayLocal.size();
- });
+ });
#endif
}
@@ -2499,7 +2499,7 @@ inline void requestRoutesBMCJournalLogService(App& app)
asyncResp->res.jsonValue["Entries"]["@odata.id"] =
"/redfish/v1/Managers/bmc/LogServices/Journal/Entries";
- });
+ });
}
static int
@@ -2646,7 +2646,7 @@ inline void requestRoutesBMCJournalLogEntryCollection(App& app)
"/redfish/v1/Managers/bmc/LogServices/Journal/Entries?$skip=" +
std::to_string(skip + top);
}
- });
+ });
}
inline void requestRoutesBMCJournalLogEntry(App& app)
@@ -2718,7 +2718,7 @@ inline void requestRoutesBMCJournalLogEntry(App& app)
return;
}
asyncResp->res.jsonValue.update(bmcJournalLogEntry);
- });
+ });
}
inline void
@@ -2805,7 +2805,7 @@ inline void
break;
}
}
- });
+ });
}
inline void handleLogServicesDumpServiceGet(
@@ -3251,7 +3251,7 @@ inline void requestRoutesCrashdumpService(App& app)
asyncResp->res.jsonValue["Actions"]["#LogService.CollectDiagnosticData"]
["target"] =
"/redfish/v1/Systems/system/LogServices/Crashdump/Actions/LogService.CollectDiagnosticData";
- });
+ });
}
void inline requestRoutesCrashdumpClear(App& app)
@@ -3292,9 +3292,9 @@ void inline requestRoutesCrashdumpClear(App& app)
return;
}
messages::success(asyncResp->res);
- },
+ },
crashdumpObject, crashdumpPath, deleteAllInterface, "DeleteAll");
- });
+ });
}
static void
@@ -3441,8 +3441,8 @@ inline void requestRoutesCrashdumpEntryCollection(App& app)
logCrashdumpEntry(asyncResp, logID,
asyncResp->res.jsonValue["Members"]);
}
- });
});
+ });
}
inline void requestRoutesCrashdumpEntry(App& app)
@@ -3478,7 +3478,7 @@ inline void requestRoutesCrashdumpEntry(App& app)
}
const std::string& logID = param;
logCrashdumpEntry(asyncResp, logID, asyncResp->res.jsonValue);
- });
+ });
}
inline void requestRoutesCrashdumpFile(App& app)
@@ -3563,7 +3563,7 @@ inline void requestRoutesCrashdumpFile(App& app)
*crow::connections::systemBus, crashdumpObject,
crashdumpPath + std::string("/") + logID, crashdumpInterface,
std::move(getStoredLogCallback));
- });
+ });
}
enum class OEMDiagnosticType
@@ -3705,7 +3705,7 @@ inline void requestRoutesCrashdumpCollect(App& app)
taskData->state = "Completed";
}
return task::completed;
- },
+ },
taskMatchStr);
task->startTimer(std::chrono::minutes(5));
@@ -3716,7 +3716,7 @@ inline void requestRoutesCrashdumpCollect(App& app)
crow::connections::systemBus->async_method_call(
std::move(collectCrashdumpCallback), crashdumpObject, crashdumpPath,
iface, method);
- });
+ });
}
/**
@@ -3777,7 +3777,7 @@ inline void requestRoutesDBusLogServiceActionsClear(App& app)
respHandler, "xyz.openbmc_project.Logging",
"/xyz/openbmc_project/logging",
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
- });
+ });
}
/****************************************************
@@ -3829,7 +3829,7 @@ inline void requestRoutesPostCodesLogService(App& app)
asyncResp->res.jsonValue["Actions"]["#LogService.ClearLog"] = {
{"target",
"/redfish/v1/Systems/system/LogServices/PostCodes/Actions/LogService.ClearLog"}};
- });
+ });
}
inline void requestRoutesPostCodesClear(App& app)
@@ -3877,11 +3877,11 @@ inline void requestRoutesPostCodesClear(App& app)
return;
}
messages::success(asyncResp->res);
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
- });
+ });
}
/**
@@ -4094,7 +4094,7 @@ static void
messages::resourceNotFound(asyncResp->res, "LogEntry", entryId);
return;
}
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodesWithTimeStamp",
@@ -4150,7 +4150,7 @@ static void
"/redfish/v1/Systems/system/LogServices/PostCodes/Entries?$skip=" +
std::to_string(skip + top);
}
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodesWithTimeStamp",
@@ -4176,7 +4176,7 @@ static void
return;
}
getPostCodeForBoot(asyncResp, 1, bootCount, entryCount, skip, top);
- });
+ });
}
inline void requestRoutesPostCodesEntryCollection(App& app)
@@ -4224,7 +4224,7 @@ inline void requestRoutesPostCodesEntryCollection(App& app)
size_t skip = delegatedQuery.skip.value_or(0);
size_t top = delegatedQuery.top.value_or(query_param::Query::maxTop);
getCurrentBootNumber(asyncResp, skip, top);
- });
+ });
}
inline void requestRoutesPostCodesEntryAdditionalData(App& app)
@@ -4315,11 +4315,11 @@ inline void requestRoutesPostCodesEntryAdditionalData(App& app)
asyncResp->res.addHeader(
boost::beast::http::field::content_transfer_encoding, "Base64");
asyncResp->res.body() = crow::utility::base64encode(strData);
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodes", index);
- });
+ });
}
inline void requestRoutesPostCodesEntry(App& app)
@@ -4350,7 +4350,7 @@ inline void requestRoutesPostCodesEntry(App& app)
}
getPostCodeForEntry(asyncResp, targetID);
- });
+ });
}
} // namespace redfish