Add Storage Schema
This takes the original commit below and updates it so that it
passes the validatior, and provides the Status attribute in
redfish when appropriate.
Tested: Passed the validator
{
"@odata.context": "/redfish/v1/$metadata#Drive.Drive",
"@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_2",
"@odata.type": "#Drive.v1_2_0.Drive",
"Id": "Drive_2",
"Manufacturer": "INTEL",
"Model": "P4800X",
"Name": "Drive_2",
"PartNumber": "INTEL SSDPE21K375GA",
"SerialNumber": "PHKE722600NL375AGN",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}
Original Commit Message:
-------------------------------------------------------------------
Add Storage Schema for NVMe on Redfish
This provides an implementation for the Get methods for the Storage
schemas using following classes :
- StorageCollection
- Storage
Tested:
- Ran Redfish Service Validator to verify no issues are reported.
- Tested that the NVMe drives in the system show up and proper fields
are populated with appropriate data.
- Tested with no drives present. Made sure the Storage interface shows
no drives and Drive interface returns error message.
Change-Id: Id0306ea413ac16a993110bb1a36cd95d939cff71
Signed-off-by: Nikhil Potade <nikhil.potade@linux.intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 2edce0a..0724c85 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1382,6 +1382,8 @@
{"@odata.id", "/redfish/v1/Systems/system/Processors"}};
res.jsonValue["Memory"] = {
{"@odata.id", "/redfish/v1/Systems/system/Memory"}};
+ res.jsonValue["Storage"] = {
+ {"@odata.id", "/redfish/v1/Systems/system/Storage"}};
// TODO Need to support ForceRestart.
res.jsonValue["Actions"]["#ComputerSystem.Reset"] = {