Remove unused variables for setSensorsOverride
Remove unused variables for setSensorsOverride and
checkAndDoSensorsOverride methods
Tested:
1. Redfish validator - passed for this new change
Case 1:
1. Enable manufacturing mode by pressing power button while bmc booting
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}
Response:
{
"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal",
"@odata.type": "#Thermal.v1_4_0.Thermal",
"Fans": [],
"Id": "Thermal",
"Name": "Thermal",
"Temperatures": []
}
3. Sensor value Overridden successfully
Case 2: Varified for ValidationUnsecure mode.
Case 3: Tested without SpecialMode mode
1. Stop the specialmodemgr.service service
2. Patch sensor values from Redfish.
3. Sensor value Overridden successfully
Case 4:
1. Disable manufacturing mode
Command: ipmitool raw 0x30 0xB4 3 0
Response: //Success
2. Patch sensor values from Redfish.
Redfish URI:
PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal
Body:
{
"Temperatures": [
{
"MemberId": "SSB_Temp",
"ReadingCelsius":112
}
]
}
3. Returning proper error.
Response :
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource.",
"MessageArgs": [
"Overriding of Sensor Value for non manufacturing mode"
],
"MessageId": "Base.1.4.0.ActionNotSupported",
"Resolution": "The action supplied cannot be resubmitted to
the implementation. Perhaps the action was invalid, the
wrong resource was the target or the implementation
documentation may be of assistance.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.ActionNotSupported",
"message": "The action Overriding of Sensor Value for
non manufacturing mode is not supported by the resource."
}
}
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I0598f1ff16a391864cd1371e514fb8da1797d8d5
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 5e6ba8a..67e40b2 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -360,8 +360,7 @@
std::unordered_map<std::string, std::vector<nlohmann::json>>
allCollections;
allCollections.emplace("Voltages", *std::move(voltageCollections));
- checkAndDoSensorsOverride(asyncResp, allCollections, chassisName,
- typeList);
+ checkAndDoSensorsOverride(asyncResp, allCollections);
}
}
};