Lines Matching refs:asyncResp
46 void getNTPProtocolEnabled(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp);
142 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in afterNetworkPortRequest() argument
148 messages::internalError(asyncResp->res); in afterNetworkPortRequest()
157 asyncResp->res.jsonValue[protocolName]["ProtocolEnabled"] = in afterNetworkPortRequest()
159 asyncResp->res.jsonValue[protocolName]["Port"] = nullptr; in afterNetworkPortRequest()
160 getPortNumber(socketPath, [asyncResp, protocolName]( in afterNetworkPortRequest()
165 messages::internalError(asyncResp->res); in afterNetworkPortRequest()
168 asyncResp->res.jsonValue[protocolName]["Port"] = portNumber; in afterNetworkPortRequest()
173 inline void getNetworkData(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in getNetworkData() argument
178 messages::internalError(asyncResp->res); in getNetworkData()
182 asyncResp->res.addHeader( in getNetworkData()
185 asyncResp->res.jsonValue["@odata.type"] = in getNetworkData()
187 asyncResp->res.jsonValue["@odata.id"] = in getNetworkData()
190 asyncResp->res.jsonValue["Id"] = "NetworkProtocol"; in getNetworkData()
191 asyncResp->res.jsonValue["Name"] = "Manager Network Protocol"; in getNetworkData()
192 asyncResp->res.jsonValue["Description"] = "Manager Network Service"; in getNetworkData()
193 asyncResp->res.jsonValue["Status"]["Health"] = resource::Health::OK; in getNetworkData()
194 asyncResp->res.jsonValue["Status"]["HealthRollup"] = resource::Health::OK; in getNetworkData()
195 asyncResp->res.jsonValue["Status"]["State"] = resource::State::Enabled; in getNetworkData()
201 asyncResp->res.jsonValue["HTTP"]["Port"] = nullptr; in getNetworkData()
202 asyncResp->res.jsonValue["HTTP"]["ProtocolEnabled"] = false; in getNetworkData()
211 asyncResp->res.jsonValue[nwkProtocol.first]["Port"] = nullptr; in getNetworkData()
212 asyncResp->res.jsonValue[nwkProtocol.first]["ProtocolEnabled"] = false; in getNetworkData()
217 asyncResp->res.jsonValue["HostName"] = hostName; in getNetworkData()
219 getNTPProtocolEnabled(asyncResp); in getNetworkData()
221 getEthernetIfaceData([hostName, asyncResp]( in getNetworkData()
228 messages::resourceNotFound(asyncResp->res, "ManagerNetworkProtocol", in getNetworkData()
232 asyncResp->res.jsonValue["NTP"]["NTPServers"] = ntpServers; in getNetworkData()
233 asyncResp->res.jsonValue["NTP"]["NetworkSuppliedServers"] = in getNetworkData()
243 asyncResp->res.jsonValue["FQDN"] = std::move(fqdn); in getNetworkData()
256 asyncResp->res.jsonValue["HTTPS"]["Certificates"]["@odata.id"] = in getNetworkData()
263 std::bind_front(afterNetworkPortRequest, asyncResp)); in getNetworkData()
266 inline void afterSetNTP(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in afterSetNTP() argument
273 messages::internalError(asyncResp->res); in afterSetNTP()
279 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, bool ntpEnabled) in handleNTPProtocolEnabled() argument
282 auto callback = [asyncResp](const boost::system::error_code& ec) { in handleNTPProtocolEnabled()
283 afterSetNTP(asyncResp, ec); in handleNTPProtocolEnabled()
286 asyncResp, std::move(callback), "org.freedesktop.timedate1", in handleNTPProtocolEnabled()
299 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleNTPServersPatch() argument
314 asyncResp->res, "null", in handleNTPServersPatch()
329 asyncResp->res, *ntpServerObject, in handleNTPServersPatch()
337 asyncResp->res, *ntpServerObject, in handleNTPServersPatch()
350 messages::internalError(asyncResp->res); in handleNTPServersPatch()
371 [asyncResp, currentNtpServers]( in handleNTPServersPatch()
377 messages::internalError(asyncResp->res); in handleNTPServersPatch()
393 setDbusProperty(asyncResp, "NTP/NTPServers/", service, in handleNTPServersPatch()
404 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleProtocolEnabled() argument
411 [protocolEnabled, asyncResp, in handleProtocolEnabled()
416 messages::internalError(asyncResp->res); in handleProtocolEnabled()
425 asyncResp, "IPMI/ProtocolEnabled", in handleProtocolEnabled()
430 asyncResp, "IPMI/ProtocolEnabled", in handleProtocolEnabled()
440 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in getNTPProtocolEnabled() argument
445 [asyncResp](const boost::system::error_code& ec, bool enabled) { in getNTPProtocolEnabled()
453 asyncResp->res.jsonValue["NTP"]["ProtocolEnabled"] = enabled; in getNTPProtocolEnabled()
467 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleManagersNetworkProtocolPatch() argument
470 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleManagersNetworkProtocolPatch()
477 messages::resourceNotFound(asyncResp->res, "Manager", managerId); in handleManagersNetworkProtocolPatch()
489 req, asyncResp->res, // in handleManagersNetworkProtocolPatch()
500 asyncResp->res.result(boost::beast::http::status::no_content); in handleManagersNetworkProtocolPatch()
503 messages::propertyNotWritable(asyncResp->res, "HostName"); in handleManagersNetworkProtocolPatch()
509 handleNTPProtocolEnabled(asyncResp, *ntpEnabled); in handleManagersNetworkProtocolPatch()
514 [asyncResp, ntpServerObjects]( in handleManagersNetworkProtocolPatch()
520 messages::internalError(asyncResp->res); in handleManagersNetworkProtocolPatch()
523 handleNTPServersPatch(asyncResp, *ntpServerObjects, in handleManagersNetworkProtocolPatch()
531 *ipmiEnabled, asyncResp, in handleManagersNetworkProtocolPatch()
537 handleProtocolEnabled(*sshEnabled, asyncResp, in handleManagersNetworkProtocolPatch()
544 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleManagersNetworkProtocolHead() argument
547 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleManagersNetworkProtocolHead()
551 asyncResp->res.addHeader( in handleManagersNetworkProtocolHead()
556 messages::resourceNotFound(asyncResp->res, "Manager", managerId); in handleManagersNetworkProtocolHead()
563 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleManagersNetworkProtocolGet() argument
566 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleManagersNetworkProtocolGet()
570 asyncResp->res.addHeader( in handleManagersNetworkProtocolGet()
575 messages::resourceNotFound(asyncResp->res, "Manager", managerId); in handleManagersNetworkProtocolGet()
579 getNetworkData(asyncResp, req); in handleManagersNetworkProtocolGet()