diff options
| author | Nikhil Potade <nikhil.potade@linux.intel.com> | 2019-08-23 16:35:26 -0700 |
|---|---|---|
| committer | James Feist <james.feist@linux.intel.com> | 2019-10-23 23:18:41 +0000 |
| commit | a25aeccf45933dbccfd68c633d0ae13ddd3e1962 (patch) | |
| tree | 32a6686ad83d65f895bb298d8326dfa43ea2bea0 /redfish-core/include | |
| parent | 02453b10810c2775236fd0ea4e2d7bc14c46645f (diff) | |
| download | bmcweb-a25aeccf45933dbccfd68c633d0ae13ddd3e1962.tar.gz bmcweb-a25aeccf45933dbccfd68c633d0ae13ddd3e1962.zip | |
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>
Diffstat (limited to 'redfish-core/include')
| -rw-r--r-- | redfish-core/include/redfish.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<ChassisCollection>(app)); nodes.emplace_back(std::make_unique<Chassis>(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)); + nodes.emplace_back(std::make_unique<Drive>(app)); #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE nodes.emplace_back( std::make_unique<UpdateServiceActionsSimpleUpdate>(app)); |

