18c5701cc5
The Storage emulator template did not include the Volumes navigation property. Without this property, a client cannot locate the Volumes collection. Adds the Volumes navigation property to the Storage emulator template. Change-Id: Iac05c0ee131cc077af43fea6c93d342ce11a81cd Story: 2003514 Task: 40776
56 lines
2.0 KiB
JSON
56 lines
2.0 KiB
JSON
{
|
|
"@odata.type": "##Storage.v1_4_0.Storage",
|
|
"Id": {{ storage['Id']|string|tojson }},
|
|
"Name": {{ storage['Name']|string|tojson }},
|
|
"Status": {
|
|
"@odata.type": "#Resource.Status",
|
|
"State": "Enabled",
|
|
"Health": "OK",
|
|
"HealthRollup": "OK"
|
|
},
|
|
{% if storage['StorageControllers'] %}
|
|
"StorageControllers": [
|
|
{%- for ctl in storage['StorageControllers'] %}
|
|
{
|
|
"@odata.id": {{ "/redfish/v1/Systems/%s/Storage/%s#/StorageControllers/%s"|format(identity, storage['Id'], ctl['MemberId'])|tojson }},
|
|
"@odata.type": "#Storage.v1_3_0.StorageController",
|
|
"MemberId": {{ ctl['MemberId']|string|tojson }},
|
|
"Name": {{ ctl['Name']|string|tojson }},
|
|
"Status": {
|
|
"@odata.type": "#Resource.Status",
|
|
"State": "Enabled",
|
|
"Health": "OK"
|
|
},
|
|
"Manufacturer": "Contoso",
|
|
"Model": "12Gbs Integrated RAID",
|
|
"SerialNumber": "2M220100SL",
|
|
"PartNumber": "CT18754",
|
|
"SpeedGbps": {{ ctl['SpeedGbps'] }},
|
|
"FirmwareVersion": "1.0.0.7",
|
|
"SupportedControllerProtocols": [
|
|
"PCIe"
|
|
],
|
|
"SupportedDeviceProtocols": [
|
|
"SAS",
|
|
"SATA"
|
|
]
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor -%}
|
|
],
|
|
{% endif -%}
|
|
{% if storage['Drives'] %}
|
|
"Drives": [
|
|
{%- for drive in storage['Drives'] %}
|
|
{
|
|
"@odata.id": {{ "/redfish/v1/Systems/%s/Storage/%s/Drives/%s"|format(identity, storage['Id'], drive)|tojson }}
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor -%}
|
|
],
|
|
{% endif -%}
|
|
"Volumes": {
|
|
"@odata.id": {{ "/redfish/v1/Systems/%s/Storage/%s/Volumes"|format(identity, storage['Id'])|tojson }}
|
|
},
|
|
"@odata.context": "/redfish/v1/$metadata#Storage.Storage",
|
|
"@odata.id": {{ "/redfish/v1/Systems/%s/Storage/%s"|format(identity, storage['Id'])|tojson }}
|
|
}
|