Lines Matching defs:asyncResp

80  * @param[in] asyncResp - Shared pointer for completing asynchronous calls
83 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
96 [asyncResp](const boost::system::error_code& ec) {
101 messages::internalError(asyncResp->res);
105 messages::success(asyncResp->res);
110 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
123 [asyncResp](const boost::system::error_code& ec) {
128 messages::internalError(asyncResp->res);
132 messages::success(asyncResp->res);
152 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
154 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
160 messages::resourceNotFound(asyncResp->res, "Manager",
169 if (!json_util::readJsonAction(req, asyncResp->res, "ResetType",
178 doBMCGracefulRestart(asyncResp);
184 doBMCForceRestart(asyncResp);
189 messages::actionParameterNotSupported(asyncResp->res, resetType,
219 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
221 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
228 messages::resourceNotFound(asyncResp->res, "Manager",
238 req, asyncResp->res, //
245 asyncResp->res, "ResetToDefaults", "ResetType");
254 asyncResp->res, *resetType, "ResetType");
259 [asyncResp](const boost::system::error_code& ec) {
264 messages::internalError(asyncResp->res);
269 doBMCGracefulRestart(asyncResp);
290 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
292 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
299 messages::resourceNotFound(asyncResp->res, "Manager",
304 asyncResp->res.jsonValue["@odata.type"] =
306 asyncResp->res.jsonValue["@odata.id"] = boost::urls::format(
309 asyncResp->res.jsonValue["Name"] = "Reset Action Info";
310 asyncResp->res.jsonValue["Id"] = "ResetActionInfo";
324 asyncResp->res.jsonValue["Parameters"] = std::move(parameters);
331 * @param[in] asyncResp Shared pointer for completing asynchronous calls
336 inline void getLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
345 [asyncResp](const boost::system::error_code& ec,
351 messages::internalError(asyncResp->res);
355 asyncResp->res
362 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
369 [asyncResp](const boost::system::error_code& ec,
382 asyncResp->res.jsonValue["LastResetTime"] =
390 * @param[i,o] asyncResp - Async response object
396 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
403 messages::propertyValueNotInList(asyncResp->res, runningFirmwareTarget,
411 messages::propertyValueNotInList(asyncResp->res, runningFirmwareTarget,
422 [asyncResp, firmwareId, runningFirmwareTarget](
428 messages::internalError(asyncResp->res);
435 messages::internalError(asyncResp->res);
467 asyncResp->res, runningFirmwareTarget, "@odata.id");
483 [asyncResp](const boost::system::error_code& ec2) {
487 messages::internalError(asyncResp->res);
490 doBMCGracefulRestart(asyncResp);
496 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
512 asyncResp->res, "DateTime",
517 messages::internalError(asyncResp->res);
520 asyncResp->res.result(boost::beast::http::status::no_content);
523 inline void setDateTime(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
532 messages::propertyValueFormatError(asyncResp->res, datetime,
540 [asyncResp](const boost::system::error_code& ec,
542 afterSetDateTime(asyncResp, ec, msg);
550 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
556 [asyncResp](const boost::system::error_code& ec,
562 asyncResp->res.jsonValue["Status"]["Health"] =
564 asyncResp->res.jsonValue["Status"]["State"] =
569 asyncResp->res.jsonValue["Status"]["Health"] = resource::Health::OK;
570 asyncResp->res.jsonValue["Status"]["State"] =
576 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
599 messages::internalError(asyncResp->res);
605 asyncResp->res.jsonValue["PartNumber"] = *partNumber;
610 asyncResp->res.jsonValue["SerialNumber"] = *serialNumber;
615 asyncResp->res.jsonValue["Manufacturer"] = *manufacturer;
620 asyncResp->res.jsonValue["Model"] = *model;
625 asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
629 inline void getManagerData(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
636 messages::internalError(asyncResp->res);
650 std::bind_front(getPhysicalAssets, asyncResp));
655 getLocation(asyncResp, connectionName, managerPath);
662 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
684 messages::internalError(asyncResp->res);
692 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
702 [asyncResp, callback{std::move(callback)}](
705 afterGetManagerObject(asyncResp, ec, subtree, callback);
719 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
721 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
728 messages::resourceNotFound(asyncResp->res, "Manager",
733 asyncResp->res.jsonValue["@odata.id"] = boost::urls::format(
735 asyncResp->res.jsonValue["@odata.type"] =
737 asyncResp->res.jsonValue["Id"] = BMCWEB_REDFISH_MANAGER_URI_NAME;
738 asyncResp->res.jsonValue["Name"] = "OpenBmc Manager";
739 asyncResp->res.jsonValue["Description"] =
741 asyncResp->res.jsonValue["PowerState"] = resource::PowerState::On;
743 asyncResp->res.jsonValue["ManagerType"] = manager::ManagerType::BMC;
744 asyncResp->res.jsonValue["UUID"] = systemd_utils::getUuid();
745 asyncResp->res.jsonValue["ServiceEntryPointUUID"] = uuid;
746 asyncResp->res.jsonValue["Model"] =
749 asyncResp->res.jsonValue["LogServices"]["@odata.id"] =
752 asyncResp->res.jsonValue["NetworkProtocol"]["@odata.id"] =
755 asyncResp->res.jsonValue["EthernetInterfaces"]["@odata.id"] =
762 asyncResp->res.jsonValue["VirtualMedia"]["@odata.id"] =
770 asyncResp->res.jsonValue["Actions"]["#Manager.Reset"];
782 asyncResp->res.jsonValue["Actions"]["#Manager.ResetToDefaults"];
792 asyncResp->res.jsonValue["DateTime"] = redfishDateTimeOffset.first;
793 asyncResp->res.jsonValue["DateTimeLocalOffset"] =
799 asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] =
801 asyncResp->res
803 asyncResp->res
809 asyncResp->res
818 asyncResp->res.jsonValue["Links"]["ManagerForServers"] =
822 sw_util::populateSoftwareInformation(asyncResp, sw_util::bmcPurpose,
825 managerGetLastResetTime(asyncResp);
829 asyncResp->res.jsonValue["ManagerDiagnosticData"];
834 getMainChassisId(asyncResp, [](const std::string& chassisId,
854 [asyncResp](const boost::system::error_code& ec, double val) {
858 messages::internalError(asyncResp->res);
863 asyncResp->res.jsonValue["Status"]["Health"] =
865 asyncResp->res.jsonValue["Status"]["State"] =
869 checkForQuiesced(asyncResp);
872 getManagerObject(asyncResp, managerId,
873 std::bind_front(getManagerData, asyncResp));
875 RedfishService::getInstance(app).handleSubRoute(req, asyncResp);
882 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
884 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
891 messages::resourceNotFound(asyncResp->res, "Manager",
905 req, asyncResp->res, //
922 setActiveFirmwareImage(asyncResp,
928 setDateTime(asyncResp, *datetime);
931 RedfishService::getInstance(app).handleSubRoute(req, asyncResp);
941 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
942 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
948 asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Managers";
949 asyncResp->res.jsonValue["@odata.type"] =
951 asyncResp->res.jsonValue["Name"] = "Manager Collection";
952 asyncResp->res.jsonValue["Members@odata.count"] = 1;
957 asyncResp->res.jsonValue["Members"] = std::move(members);