Skip to content

Commit 9b0141f

Browse files
1050:Pull lamptest related commits to 1050 (#572)
This commit pulls the following commits into 1050 a1b2b76 Trigger panel lamp test 893571c SW541807:Changing error to debug trace for lamp test Tested and code works as expected. Signed-off-by: Priyanga Ramasamy <[email protected]>
1 parent ea05892 commit 9b0141f

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

redfish-core/lib/oem/ibm/lamp_test.hpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ inline void getLampTestState(const std::shared_ptr<bmcweb::AsyncResp>& aResp)
2727
const dbus::utility::MapperGetObject& object) {
2828
if (ec || object.empty())
2929
{
30+
if (ec.value() == 5) // generic:5 error
31+
{
32+
BMCWEB_LOG_DEBUG << "lamp test not available yet!!";
33+
return;
34+
}
3035
BMCWEB_LOG_ERROR << "DBUS response error " << ec.message();
3136
messages::internalError(aResp->res);
3237
return;
@@ -84,7 +89,7 @@ inline void setLampTestState(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
8489
*crow::connections::systemBus, object.begin()->first,
8590
"/xyz/openbmc_project/led/groups/lamp_test",
8691
"xyz.openbmc_project.Led.Group", "Asserted", state,
87-
[aResp](const boost::system::error_code& ec1) {
92+
[aResp, state](const boost::system::error_code& ec1) {
8893
if (ec1)
8994
{
9095
if (ec1.value() != EBADR)
@@ -93,6 +98,19 @@ inline void setLampTestState(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
9398
}
9499
return;
95100
}
101+
102+
crow::connections::systemBus->async_method_call(
103+
[aResp](const boost::system::error_code& ec2) {
104+
if (ec2)
105+
{
106+
BMCWEB_LOG_DEBUG
107+
<< "Panel Lamp test failed with error code " << ec2;
108+
messages::internalError(aResp->res);
109+
return;
110+
}
111+
},
112+
"com.ibm.PanelApp", "/com/ibm/panel_app", "com.ibm.panel",
113+
"TriggerPanelLampTest", state);
96114
});
97115
});
98116
}

0 commit comments

Comments
 (0)