ethernet: Fix for MAC address patch response
While Patching MAC address from Redfish, response is showing
as empty but HTTPS status code is "200 OK" on successful case.
So provided fix for Proper response on Success.
Tested:
1. Verified RedFish validator passed
2. Verified the response on Redfish by updating MAC address.
PATCH: https://<bmc_ip>/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Body:
{
"MACAddress": "xx:xx:xx:xx:xx:xx"
}
Response:
{
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [],
"MessageId": "Base.1.8.1.Success",
"MessageSeverity": "OK",
"Resolution": "None"
}
]
}
Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I91a34f414b854593b4873e4ed923734030d6562d
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index cd0584c..f7cffcc 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -1212,6 +1212,7 @@
messages::internalError(asyncResp->res);
return;
}
+ messages::success(asyncResp->res);
},
"xyz.openbmc_project.Network",
"/xyz/openbmc_project/network/" + ifaceId,