redfish: Add Chassis associated Drive query
This change supports named drives being queried by their associated
chassis, by using the follow form:
/redfish/v1/Chassis/<chassis>/Drives/<drive>
This change is in accordance with redfish
Tested:
With the redfish validator: No new errors
$ wget -qO- http://localhost:80/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0
{
"@odata.context": "/redfish/v1/$metadata#Drive.Drive",
"@odata.id": "/redfish/v1/Chassis/DC_SCM/Drives/mmcblk0",
"@odata.type": "#Drive.v1_7_0.Drive",
"CapacityBytes": 15634268160,
"Id": "mmcblk0",
"Name": "mmcblk0",
"Status": {
"State": "Enabled"
}
}
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I3501ea4789bae57a905052d0e820d441665b72d7
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index 0f976d6..eae83e8 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -85,6 +85,7 @@
requestRoutesChassisResetAction(app);
requestRoutesChassisResetActionInfo(app);
requestRoutesChassisDrive(app);
+ requestRoutesChassisDriveName(app);
requestRoutesUpdateService(app);
requestRoutesStorageCollection(app);
requestRoutesStorage(app);