summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-01-27 22:47:14 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-01-28 02:23:52 +0300
commit7c5f8839ec3d71a2170b8f3514a16a67c69d1c7c (patch)
tree729dbf87ba33bf4d83b5d95496ce18f99a61ef03 /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch
parent98cc5cd6483975b64d80e8323f7f659dd1337d75 (diff)
downloadopenbmc-7c5f8839ec3d71a2170b8f3514a16a67c69d1c7c.tar.xz
Update to internal 0.29
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch
new file mode 100644
index 000000000..983eb170a
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0008-Add-support-to-ResetBios-action.patch
@@ -0,0 +1,62 @@
+From 2f5b401bb36be7a1f800bea20fb489a7b2ac6d45 Mon Sep 17 00:00:00 2001
+From: Kuiying Wang <kuiying.wang@intel.com>
+Date: Wed, 23 Dec 2020 22:47:56 +0800
+Subject: [PATCH] Add support to ResetBios action
+
+Tested:
+
+Bios reset flag can be modified throw redfish
+POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios
+
+Change-Id: I5e5fbdd70d4a3ce3b976cc2eb0a7d9a2a3adb124
+Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+
+---
+ redfish-core/lib/bios.hpp | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
+index 4727ef2..888c511 100644
+--- a/redfish-core/lib/bios.hpp
++++ b/redfish-core/lib/bios.hpp
+@@ -663,7 +663,7 @@ class BiosReset : public Node
+ Node(app, "/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios/")
+ {
+ entityPrivileges = {
+- {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
++ {boost::beast::http::verb::post, {{"ConfigureComponents"}}}};
+ }
+
+ private:
+@@ -675,19 +675,23 @@ class BiosReset : public Node
+ const std::vector<std::string>&) override
+ {
+ auto asyncResp = std::make_shared<AsyncResp>(res);
+-
++ std::string resetFlag =
++ "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag.FactoryDefaults";
+ crow::connections::systemBus->async_method_call(
+ [asyncResp](const boost::system::error_code ec) {
+ if (ec)
+ {
+- BMCWEB_LOG_ERROR << "Failed to reset bios: " << ec;
++ BMCWEB_LOG_ERROR << "doPost bios reset got error " << ec;
+ messages::internalError(asyncResp->res);
+ return;
+ }
++ BMCWEB_LOG_DEBUG << "bios reset action is done";
+ },
+- "org.open_power.Software.Host.Updater",
+- "/xyz/openbmc_project/software",
+- "xyz.openbmc_project.Common.FactoryReset", "Reset");
++ "xyz.openbmc_project.BIOSConfigManager",
++ "/xyz/openbmc_project/bios_config/manager",
++ "org.freedesktop.DBus.Properties", "Set",
++ "xyz.openbmc_project.BIOSConfig.Manager", "ResetBIOSSettings",
++ std::variant<std::string>(resetFlag));
+ }
+ };
+ } // namespace redfish
+--
+2.17.1
+