data/views/redfish-1.0/redfish.2016.3.volume.1.0.2.json
{
"@odata.context": "<%= basepath %>/$metadata#Volume.Volume",
"@odata.id": "<%= url %>",
"@odata.type": "#Volume.v1_0_2.Volume",
"Oem": {},
"Id": "<%= volumeIndex %>",
"Description": "<%= volume.DeviceDescription %>",
"Name": "<%= volume.name %>",
"Status": {
"Health": <%
switch(volume.primaryStatus){
case '1': %>
"OK"
<% break;
case '2': %>
"Warning"
<% break;
case '3': %>
"Critical"
<% break;
default: %>
"OK"
<%} %>
},
"CapacityBytes": <%= volume.sizeInBytes %>,
"VolumeType": <%
switch(volume.raidTypes){
case '1': %>
"RawDevice",
<% break;
case '2': %>
"NonRedundant",
<% break;
case '4': %>
"Mirrored",
<% break;
case '64': %>
"StripedWithParity",
<% break;
case '2048': %>
"SpannedMirrors",
<% break;
case '8192': %>
"SpannedStripesWithParity",
<% break;
default: %>
"RawDevice",
<%} %>
"Identifiers": [],
"BlockSizeBytes": <%= volume.blockSizeInBytes %>,
"Operations": [
{"OperationName": "<%= volume.operationName %>",
"PercentageComplete": <%= volume.operationPercentComplete %>
}
],
"Links": {
"Drives@odata.count": <%= driveIds.length %>,
"Drives": [
<% driveIds.forEach(function(n, i, arr) { %>
{
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/Storage/<%=index%>/Drives/<%=n%>"
}
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
<% }); %>
]
}
}