summaryrefslogtreecommitdiffstats
path: root/redfish-core/lib/storage.hpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove error for empty subtree responseJames Feist2019-11-271-1/+1
| | | | | | | This interface doesn't have to exist Change-Id: If0ea4e3c201c80c25e825f64ba3601685ef9ed95 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Storage: Add Storage ControllerJames Feist2019-11-271-19/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Storage Controllers. Tested: Validator passed { "@odata.context": "/redfish/v1/$metadata#Storage.Storage", "@odata.id": "/redfish/v1/Systems/system/Storage/1", "@odata.type": "#Storage.v1_7_1.Storage", "Drives": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_1" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_2" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_3" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_4" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_5" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_6" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_7" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drives/Drive_8" } ], "Drives@odata.count": 8, "Id": "1", "Name": "Storage Controller", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "StorageControllers": [ { "@odata.context": "/redfish/v1/$metadata#Storage.StorageController", "@odata.id": "/redfish/v1/Systems/system/Storage/1#/StorageControllers/0", "@odata.type": "#Storage.v1_7_0.StorageController", "Manufacturer": "$BOARD_MANUFACTURER", "MemberId": "HSBP_1", "Model": "$BOARD_PRODUCT_NAME", "Name": "HSBP_1", "PartNumber": "$BOARD_PART_NUMBER", "SerialNumber": "$BOARD_SERIAL_NUMBER", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ] } Change-Id: I9d956343daa74ddfa912e3cbe0d38b0e42a4859f Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add Storage Health & Update Systems HealthJames Feist2019-11-041-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds health to storage based on drive inventory and updates systems health to include drives. This also fixes properties that are manditory in drives to make this patch pass the validator. Tested: Validator Passed. Failed a drive and saw: { "@odata.context": "/redfish/v1/$metadata#Storage.Storage", "@odata.id": "/redfish/v1/Systems/system/Storage/1", "@odata.type": "#Storage.v1_7_1.Storage", "Drives": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_1" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_2" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_3" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_4" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_5" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_6" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_7" }, { "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_8" } ], "Drives@odata.count": 8, "Id": "1", "Name": "Storage Controller", "Status": { "Health": "Warning", "HealthRollup": "Warning", "State": "Enabled" } } And In systems: "Status": { "Health": "Warning", "HealthRollup": "Warning", "State": "Enabled" }, Change-Id: I7abf042ac51b1fbe9e4ee0b72876e9be96e60b7c Signed-off-by: James Feist <james.feist@linux.intel.com>
* storage: s/Drive/DrivesJames Feist2019-11-011-3/+3
| | | | | | | | | | | The link was wrong, fix it. Tested: Navigated to a drive using new path, and it worked. Change-Id: Ie008efef23f4a7a17bfc0c3f74a4deac87e0d94c Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add Rebuilding to DrivesJames Feist2019-10-231-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the xyz.openbmc_project.Drive.State has rebuilding set true, make the state Updating. Tested: { "@odata.context": "/redfish/v1/$metadata#Drive.Drive", "@odata.id": "/redfish/v1/Systems/system/Storage/1/Drive/Drive_1", "@odata.type": "#Drive.v1_2_0.Drive", "Id": "Drive_1", "Manufacturer": "INTEL", "Model": "P4800X", "Name": "Drive_1", "PartNumber": "INTEL SSDPE21K375GA", "SerialNumber": "PHKE722600NL375AGN", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Updating" } } Change-Id: I401e5a8c416d969831cebde8b5b0723f41c3e1c7 Signed-off-by: James Feist <james.feist@linux.intel.com>
* Add Storage SchemaNikhil Potade2019-10-231-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "Add Storage Schema for NVMe on Redfish"Ed Tanous2019-10-021-250/+0
| | | | | | | | | | This reverts commit e56c7b7092298c609831a65bcc8c21e62d422ba7. Reason for revert: /redfish/v1/Systems/1 returns no result. This should've been flagged in service validator, but the commit mentions that test was run, so it's not clear how this was missed. Reverting for a moment until we can determine what happened. Change-Id: I276d4cd239adb87b77264bc65ab4856705274ff0
* Add Storage Schema for NVMe on RedfishNikhil Potade2019-09-301-0/+250
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. Signed-off-by: Nikhil Potade <nikhil.potade@linux.intel.com> Change-Id: I9fa9f4cd69fe07cde15604c5405a6987774065fd
OpenPOWER on IntegriCloud