|
Post by tmakatos on Jan 26, 2023 11:13:38 GMT
I'm trying to create an example of what a simple storage system and I don't understand how StoragePools are structured. I'm hacking Resources/ in the Swordfish emulator to implement a static example of a system with four NVMe controllers and two storage pools. What I don't understand is whether I need a StoragePools index.json (is it called a resource?) or the StoragePools entity can be simply contained in the Storage resource. I'm looking at www.snia.org/sites/default/files/technical-work/swordfish/release/v1.2.4a/html/Specification/Swordfish_v1.2.4a_Specification.html and in the URIs that mention StoragePools, there's no .../StoragePools/{StoragePoolsId}/... , only .../StoragePools/{StoragePoolId}/... (note the trailing 's' in the former URI), which makes me believe that I don't need a StoragePools index.json. However, in "9.6.32. StoragePoolCollection", there's Description, Members etc., which AFAICT requires its own resource? Also, in "9.6.34. StorageService 1.5.0", StoragePools is defined as an object, however the description states: "An array of references to StoragePools. Contains a link to a resource.". How can it be an array of references while the content can be only one @odata.id? Also, because of the "Link to Collection of StoragePool." statement, I'm led to believe that there should be a .../StoragePools/{StoragePoolsId}/... ? To me it seems pointless to have an @odata.id for StoragePools, why would we want to have multiple StoragePoolCollections?
|
|
|
Post by tmakatos on Jan 26, 2023 11:41:21 GMT
I'm having a closer look at the Redfish spec (Redfish Resource and Schema Guide) and in the explanation of the Resource Collection where ComputerSystemCollection is used an example I see "@odata.id": "/redfish/v1/Systems", which makes me think that a StoragePoolsCollection is only one and its @odata.id is "/redfish/v1/Storage/Storage/StoragePools", right?
|
|
|
Post by Richelle Ahlvers on Jan 26, 2023 18:30:54 GMT
Regarding "StoragePools" vs {StoragePoolId} = the CollectionName is generally plural, to refer to multiple resource instances, where the {instanceId} is singular in the reference. This is the general pattern throughout Redfish and Swordfish. For the emulator, there is an "index.json" file in every level of the system; for the "StoragePools", it will be for the Collection itself. For the StoragePools/{StoragePoolId} level, it will be for the instance of a specific StoragePool. In RF and SF, there are two ways to use the Collection notation. One is, effectively, an array vs a collection. In this format: Collection (StoragePool.StoragePool), this is an array. If in this format, StoragePoolCollection.StoragePoolCollection, it is a resource Collection. Resource collections are used when the number of objects may change, and also when the set is likely to be large. (Arrays are used when a simpler construct may suffice.) For the question related to "why have multiple StoragePool Collections". Large storage systems can have 1000's of drives, allocated into many storage pools. For some systems, these are also hierarchical. For example, a file system may have pools of file systems created on top of pools of block storage. For NVMe environments, this is also true. NVMe devices using endurance groups are created on top of NVM sets; these are modeled using storage pools. We have examples of these configurations available at storagemockups.com
|
|
|
Post by Richelle Ahlvers on Jan 27, 2023 17:20:26 GMT
RE: "a StoragePoolsCollection is only one and its @odata.id is "/redfish/v1/Storage/Storage/StoragePools", right?"
Correct - there is only one Collection. Each collection contains either one to many instances of the resources, or references to the instances.
|
|