Add ResetActionInfo for ResetType
OCP mandate the ResetActionInfo for convey the
parameter requirements and allowable values on
parameters for actions. So add ResetActionInfo
uri for below URI's.
/redfish/v1/Systems/system/ResetActionInfo
/redfish/v1/Managers/bmc/ResetActionInfo
/redfish/v1/Chassis/<id>/ResetActionInfo
Tested:
- All action uri's show correct @Redfish.ActionInfo
"Actions": {
"#ComputerSystem.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
}
- All /ResetActionInfo uri's show correct allowable
values.
{
"@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": {
"AllowableValues": [
"On",
"ForceOff",
"ForceOn",
"ForceRestart",
"GracefulRestart",
"GracefulShutdown",
"PowerCycle",
"Nmi"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
}
- Ran redfish validator and its successful.
Change-Id: I656163dde300d97fe1923f1d58fa6d104c702d27
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index 959c643..cc98e1a 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -75,11 +75,13 @@
nodes.emplace_back(std::make_unique<ManagerCollection>(app));
nodes.emplace_back(std::make_unique<Manager>(app));
nodes.emplace_back(std::make_unique<ManagerResetAction>(app));
+ nodes.emplace_back(std::make_unique<ManagerResetActionInfo>(app));
nodes.emplace_back(std::make_unique<ManagerResetToDefaultsAction>(app));
nodes.emplace_back(std::make_unique<Power>(app));
nodes.emplace_back(std::make_unique<ChassisCollection>(app));
nodes.emplace_back(std::make_unique<Chassis>(app));
nodes.emplace_back(std::make_unique<ChassisResetAction>(app));
+ nodes.emplace_back(std::make_unique<ChassisResetActionInfo>(app));
nodes.emplace_back(std::make_unique<UpdateService>(app));
nodes.emplace_back(std::make_unique<StorageCollection>(app));
nodes.emplace_back(std::make_unique<Storage>(app));
@@ -145,6 +147,7 @@
nodes.emplace_back(std::make_unique<SystemsCollection>(app));
nodes.emplace_back(std::make_unique<Systems>(app));
nodes.emplace_back(std::make_unique<SystemActionsReset>(app));
+ nodes.emplace_back(std::make_unique<SystemResetActionInfo>(app));
nodes.emplace_back(std::make_unique<BiosService>(app));
nodes.emplace_back(std::make_unique<BiosReset>(app));
#ifdef BMCWEB_ENABLE_VM_NBDPROXY