Lines Matching refs:asyncResp
54 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in getHypervisorState() argument
61 [asyncResp](const boost::system::error_code& ec, in getHypervisorState()
75 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
77 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
83 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
85 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
91 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
93 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
99 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
101 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
107 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
109 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
115 asyncResp->res.jsonValue["PowerState"] = in getHypervisorState()
117 asyncResp->res.jsonValue["Status"]["State"] = in getHypervisorState()
122 messages::internalError(asyncResp->res); in getHypervisorState()
139 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in getHypervisorActions() argument
146 [asyncResp]( in getHypervisorActions()
169 messages::internalError(asyncResp->res); in getHypervisorActions()
175 asyncResp->res.jsonValue["Actions"]["#ComputerSystem.Reset"]; in getHypervisorActions()
366 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in setHypervisorIPv4Address() argument
373 asyncResp, "IPv4StaticAddresses/1/Address", in setHypervisorIPv4Address()
389 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in setHypervisorIPv4Subnet() argument
396 asyncResp, "IPv4StaticAddresses/1/SubnetMask", in setHypervisorIPv4Subnet()
412 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in setHypervisorIPv4Gateway() argument
418 setDbusProperty(asyncResp, "IPv4StaticAddresses/1/Gateway", in setHypervisorIPv4Gateway()
440 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in createHypervisorIPv4() argument
442 setHypervisorIPv4Address(asyncResp, ifaceId, address); in createHypervisorIPv4()
443 setHypervisorIPv4Gateway(asyncResp, gateway); in createHypervisorIPv4()
444 setHypervisorIPv4Subnet(asyncResp, ifaceId, prefixLength); in createHypervisorIPv4()
457 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in deleteHypervisorIPv4() argument
462 setHypervisorIPv4Address(asyncResp, ifaceId, address); in deleteHypervisorIPv4()
463 setHypervisorIPv4Gateway(asyncResp, gateway); in deleteHypervisorIPv4()
464 setHypervisorIPv4Subnet(asyncResp, ifaceId, prefixLength); in deleteHypervisorIPv4()
504 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in setDHCPEnabled() argument
509 asyncResp, "DHCPv4/DHCPEnabled", "xyz.openbmc_project.Settings", in setDHCPEnabled()
526 deleteHypervisorIPv4(ifaceId, asyncResp); in setDHCPEnabled()
531 asyncResp, "IPv4StaticAddresses/1/AddressOrigin", in setDHCPEnabled()
540 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorIPv4StaticPatch() argument
550 deleteHypervisorIPv4(ifaceId, asyncResp); in handleHypervisorIPv4StaticPatch()
563 *obj, asyncResp->res, // in handleHypervisorIPv4StaticPatch()
575 messages::propertyValueFormatError(asyncResp->res, address, in handleHypervisorIPv4StaticPatch()
582 messages::propertyValueFormatError(asyncResp->res, subnetMask, in handleHypervisorIPv4StaticPatch()
589 messages::propertyValueFormatError(asyncResp->res, gateway, in handleHypervisorIPv4StaticPatch()
596 createHypervisorIPv4(ifaceId, prefixLength, gateway, address, asyncResp); in handleHypervisorIPv4StaticPatch()
598 setDHCPEnabled(ifaceId, false, asyncResp); in handleHypervisorIPv4StaticPatch()
603 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorHostnamePatch() argument
607 messages::propertyValueFormatError(asyncResp->res, hostName, in handleHypervisorHostnamePatch()
612 asyncResp->res.jsonValue["HostName"] = hostName; in handleHypervisorHostnamePatch()
613 setDbusProperty(asyncResp, "HostName", "xyz.openbmc_project.Settings", in handleHypervisorHostnamePatch()
622 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in setIPv4InterfaceEnabled() argument
625 asyncResp, "InterfaceEnabled", "xyz.openbmc_project.Settings", in setIPv4InterfaceEnabled()
632 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorEthernetInterfaceCollectionGet() argument
634 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleHypervisorEthernetInterfaceCollectionGet()
643 [asyncResp]( in handleHypervisorEthernetInterfaceCollectionGet()
648 messages::resourceNotFound(asyncResp->res, "System", in handleHypervisorEthernetInterfaceCollectionGet()
652 asyncResp->res.jsonValue["@odata.type"] = in handleHypervisorEthernetInterfaceCollectionGet()
655 asyncResp->res.jsonValue["@odata.id"] = in handleHypervisorEthernetInterfaceCollectionGet()
657 asyncResp->res.jsonValue["Name"] = "Hypervisor Ethernet " in handleHypervisorEthernetInterfaceCollectionGet()
659 asyncResp->res.jsonValue["Description"] = in handleHypervisorEthernetInterfaceCollectionGet()
663 nlohmann::json& ifaceArray = asyncResp->res.jsonValue["Members"]; in handleHypervisorEthernetInterfaceCollectionGet()
679 asyncResp->res.jsonValue["Members@odata.count"] = ifaceArray.size(); in handleHypervisorEthernetInterfaceCollectionGet()
685 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& id) in handleHypervisorEthernetInterfaceGet() argument
687 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleHypervisorEthernetInterfaceGet()
692 id, [asyncResp, ifaceId{std::string(id)}]( in handleHypervisorEthernetInterfaceGet()
697 messages::resourceNotFound(asyncResp->res, "EthernetInterface", in handleHypervisorEthernetInterfaceGet()
701 asyncResp->res.jsonValue["@odata.type"] = in handleHypervisorEthernetInterfaceGet()
703 asyncResp->res.jsonValue["Name"] = "Hypervisor Ethernet Interface"; in handleHypervisorEthernetInterfaceGet()
704 asyncResp->res.jsonValue["Description"] = in handleHypervisorEthernetInterfaceGet()
706 parseInterfaceData(asyncResp->res.jsonValue, ifaceId, ethData, in handleHypervisorEthernetInterfaceGet()
712 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorSystemGet() argument
714 asyncResp->res.jsonValue["@odata.type"] = in handleHypervisorSystemGet()
716 asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Systems/hypervisor"; in handleHypervisorSystemGet()
717 asyncResp->res.jsonValue["Description"] = "Hypervisor"; in handleHypervisorSystemGet()
718 asyncResp->res.jsonValue["Name"] = "Hypervisor"; in handleHypervisorSystemGet()
719 asyncResp->res.jsonValue["Id"] = "hypervisor"; in handleHypervisorSystemGet()
720 asyncResp->res.jsonValue["SystemType"] = computer_system::SystemType::OS; in handleHypervisorSystemGet()
726 asyncResp->res.jsonValue["Links"]["ManagedBy"] = std::move(managedBy); in handleHypervisorSystemGet()
727 asyncResp->res.jsonValue["EthernetInterfaces"]["@odata.id"] = in handleHypervisorSystemGet()
729 getHypervisorState(asyncResp); in handleHypervisorSystemGet()
730 getHypervisorActions(asyncResp); in handleHypervisorSystemGet()
736 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, in handleHypervisorEthernetInterfacePatch() argument
739 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleHypervisorEthernetInterfacePatch()
751 req, asyncResp->res, // in handleHypervisorEthernetInterfacePatch()
763 messages::propertyNotWritable(asyncResp->res, "IPv4Addresses"); in handleHypervisorEthernetInterfacePatch()
769 [asyncResp, ifaceId, hostName = std::move(hostName), in handleHypervisorEthernetInterfacePatch()
775 messages::resourceNotFound(asyncResp->res, "EthernetInterface", in handleHypervisorEthernetInterfacePatch()
787 messages::propertyValueTypeError(asyncResp->res, in handleHypervisorEthernetInterfacePatch()
796 messages::propertyValueFormatError(asyncResp->res, "[]", in handleHypervisorEthernetInterfacePatch()
818 asyncResp); in handleHypervisorEthernetInterfacePatch()
824 handleHypervisorHostnamePatch(*hostName, asyncResp); in handleHypervisorEthernetInterfacePatch()
829 setDHCPEnabled(ifaceId, *ipv4DHCPEnabled, asyncResp); in handleHypervisorEthernetInterfacePatch()
835 setIPv4InterfaceEnabled(ifaceId, false, asyncResp); in handleHypervisorEthernetInterfacePatch()
837 asyncResp->res.result(boost::beast::http::status::accepted); in handleHypervisorEthernetInterfacePatch()
841 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorResetActionGet() argument
848 [asyncResp]( in handleHypervisorResetActionGet()
859 messages::resourceNotFound(asyncResp->res, "hypervisor", in handleHypervisorResetActionGet()
864 messages::internalError(asyncResp->res); in handleHypervisorResetActionGet()
871 messages::internalError(asyncResp->res); in handleHypervisorResetActionGet()
879 asyncResp->res.jsonValue["@odata.type"] = in handleHypervisorResetActionGet()
881 asyncResp->res.jsonValue["@odata.id"] = in handleHypervisorResetActionGet()
883 asyncResp->res.jsonValue["Name"] = "Reset Action Info"; in handleHypervisorResetActionGet()
884 asyncResp->res.jsonValue["Id"] = "ResetActionInfo"; in handleHypervisorResetActionGet()
894 asyncResp->res.jsonValue["Parameters"] = std::move(parameters); in handleHypervisorResetActionGet()
900 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) in handleHypervisorSystemResetPost() argument
903 if (!json_util::readJsonAction(req, asyncResp->res, "ResetType", resetType)) in handleHypervisorSystemResetPost()
911 messages::actionParameterMissing(asyncResp->res, "ComputerSystem.Reset", in handleHypervisorSystemResetPost()
919 messages::propertyValueNotInList(asyncResp->res, *resetType, in handleHypervisorSystemResetPost()
927 asyncResp, "xyz.openbmc_project.State.Hypervisor", in handleHypervisorSystemResetPost()