RackHD/on-http

View on GitHub
data/views/redfish-1.0/redfish.1.0.0.chassiscollection.json

Summary

Maintainability
Test Coverage
{
    "@odata.context" : "<%= basepath %>/$metadata#ChassisCollection.ChassisCollection",
    "@odata.id": "<%= url %>",
    "@odata.type": "#ChassisCollection.ChassisCollection",
    "Oem" : {},
    "Name": "Chassis Collection",
    "Members@odata.count": <%= nodes.length %>,
    "Members": [
        <% nodes.forEach(function(node, i, arr) { %>
        {
            <% if (node.obms[0] !== undefined && node.obms[0].service === 'redfish-obm-service')
            {%>
                "@odata.id": "<%= basepath %>/Chassis/<%= node.identifiers[2] %>"
            <%} else {%>
                "@odata.id": "<%= basepath %>/Chassis/<%= node.id %>"
            <%}%>
}
        <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
        <% }); %>
    ]
}