From a25aeccf45933dbccfd68c633d0ae13ddd3e1962 Mon Sep 17 00:00:00 2001 From: Nikhil Potade Date: Fri, 23 Aug 2019 16:35:26 -0700 Subject: 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 Signed-off-by: James Feist --- redfish-core/include/redfish.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'redfish-core/include') diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp index bf0f51f..b39ea0b 100644 --- a/redfish-core/include/redfish.hpp +++ b/redfish-core/include/redfish.hpp @@ -30,6 +30,7 @@ #include "../lib/roles.hpp" #include "../lib/sensors.hpp" #include "../lib/service_root.hpp" +#include "../lib/storage.hpp" #include "../lib/systems.hpp" #include "../lib/thermal.hpp" #include "../lib/update_service.hpp" @@ -71,6 +72,9 @@ class RedfishService nodes.emplace_back(std::make_unique(app)); nodes.emplace_back(std::make_unique(app)); nodes.emplace_back(std::make_unique(app)); + nodes.emplace_back(std::make_unique(app)); + nodes.emplace_back(std::make_unique(app)); + nodes.emplace_back(std::make_unique(app)); #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE nodes.emplace_back( std::make_unique(app)); -- cgit v1.2.3