Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing systems_utils.hpp and getSystemCollectionMembers
This change introduces a new a function similar to getCollectionMembers but specific to computerSystem discovery. Since more functionality will be added soon to support multi host redfish and in general request handling with the long term goal not using hardcoded URIs anymore, a new utility header for systems.hpp is being introduced in this patch that will hold the rest of the incoming definitions. getSystemCollectionMembers supports multi host platforms like yosemite4 or bletchley. Currently we have to distinguish between single and multi host platforms and unfortunately handle both separate from each other, thus cannot use the generic getCollectionMembers from collection.hpp. However, this should change sometime in the future. It should be mentioned, that functionalitywise the newly introduced function shares almost all of the code used in getCollectionMembers from collection.hpp. Only simplification has been done, since this function only serves a single usecase. Testing: To test the functionality, requests have been manually made to check the response for both, single and multi host emulated in qemu. For the multi host platform a yosemite4 image with 8 emulated eeproms has been used, single host was performed on the same image with only 1 emulated eeprom that EM would probe against to identify an available host. "single host" { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "[email protected]": 1, "Name": "Computer System Collection" } multi host { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_1" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_2" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_3" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_4" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_5" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_6" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_7" }, { "@odata.id": "/redfish/v1/Systems/Yosemite_4_Sentinel_Dome_T1_Slot_8" } ], "[email protected]": 8, "Name": "Computer System Collection" }% Change-Id: I82d59487b7c17b22cd638acd8f687f31c96ca156 Signed-off-by: Oliver Brewka <[email protected]>
- Loading branch information