RackHD/on-http

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

Summary

Maintainability
Test Coverage
{
    "@odata.context" : "<%= basepath %>/$metadata#EthernetInterface.EthernetInterface"
    ,"@odata.id": "<%= url %>"
    ,"@odata.type": "#EthernetInterface.v1_2_0.EthernetInterface"
    <% if (typeof autoneg !== 'undefined') { %>
        ,"AutoNeg": <%= autoneg %>
    <% } %>
    <% if (typeof description !== 'undefined') { %>
        ,"Description": "<%= description %>"
    <% } %>
    <% if (typeof fqdn !== 'undefined') { %>
        ,"FQDN": "<%= fqdn %>"
    <% } %>
    <% if (typeof fullduplex !== 'undefined') { %>
        ,"FullDuplex": <%= fullduplex %>
    <% } %>
    <% if (typeof hostname !== 'undefined') { %>
        ,"HostName": "<%= hostname %>"
    <% } %>
    <% if (typeof ipv4 !== 'undefined') { %>
        ,"IPv4Addresses" : [
        <% ipv4.forEach(function(ipv4, i, arr) { %>
            {
                "Address": "<%= ipv4.ipaddr %>"
                <% if(typeof ipv4.ipsubnet !== 'undefined') { %>
                ,"SubnetMask": "<%= ipv4.ipsubnet %>"
                <% } %>
                <% if(typeof ipv4.ipsrc !== 'undefined') { %>
                ,"AddressOrigin": "<%= ipv4.ipsrc %>"
                <% } %>
                <% if(typeof ipv4.ipgateway !== 'undefined') { %>
                ,"Gateway": "<%= ipv4.ipgateway %>"
                <% } %>
            }
            <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
        <% }); %>
        ]
    <% } %>
    <% if (typeof ipv6addresspolicytable !== 'undefined') { %>
        ,"IPv6AddressPolicyTable": []
    <% } %>
    <% if (typeof ipv6 !== 'undefined') { %>
        ,"IPv6Addresses" : [
        <% ipv6.forEach(function(ipv6, i, arr) { %>
            {
                "Address": "<%= ipv6.ipaddr %>"
                <% if(typeof ipv6.prefixlength !== 'undefined') { %>
                ,"PrefixLength": <%= ipv6.prefixlength %>
                <% } %>
                <% if(typeof ipv6.ipsrc !== 'undefined') { %>
                ,"AddressOrigin": "<%= ipv6.ipsrc %>"
                <% } %>
                <% if(typeof ipv6.addressstate !== 'undefined') { %>
                ,"AddressState": "<%= ipv6.addressstate %>"
                <% } %>
            }
            <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
        <% }); %>
        ]

    <% } %>
    <% if (typeof ipv6defaultgateway !== 'undefined') { %>
        ,"IPv6DefaultGateway": null
    <% } %>
    <% if (typeof ipv6staticaddresses !== 'undefined') { %>
        ,"IPv6StaticAddresses" : []
    <% } %>
    ,"Id": "<%= index %>"
    <% if(typeof interfaceenabled !== 'undefined') { %>
        ,"InterfaceEnabled": <%= interfaceenable %>
    <% } %>
    <% if(typeof linkstatus !== 'undefined') { %>
        <% if(typeof linkstatus === 'string') { %>
            ,"LinkStatus": "<%= linkstatus %>"
        <% } %>
    <% } %>
    <% if(typeof links !== 'undefined') { %>
        ,"Links": <%= links %>
    <% } %>
    <% if(typeof permanentmacaddress !== 'undefined') { %>
        ,"PermanentMACAddress": "<%= permanentmacaddress %>"
    <% } %>
    <% if(typeof macaddress !== 'undefined') { %>
        ,"MACAddress": "<%= macaddress %>"
    <% } %>
    <% if(typeof mtusize !== 'undefined') { %>
        ,"MTUSize": <%= mtusize %>
    <% } %>
    <% if(typeof maxipv6staticadresses !== 'undefined') { %>
        ,"MaxIPv6StaticAddresses": <%= maxipv6staticadresses %>
    <% } %>
    ,"Name": "<%= name %>"
    <% if(typeof nameservers !== 'undefined') { %>
        ,"NameServers": []
    <% } %>
    <% if(typeof oem !== 'undefined') { %>
        ,"Oem": {}
    <% } %>
    <% if(typeof speedmbps !== 'undefined') { %>
        ,"SpeedMbps": <%= speedmbps %>
    <% } %>
    <% if(typeof status !== 'undefined') { %>
        ,"Status": {}
    <% } %>
    <% if(typeof uefidevicepath !== 'undefined') { %>
        ,"UefiDevicePath": "<%= uefidevicepath %>"
    <% } %>
    <% if (typeof vlan !== 'undefined') { %>
        ,"VLAN": {
            "VLANEnable": true,
            "VLANId": <%= vlan %>
        }
    <% } %>
    <% if (typeof vlans !== 'undefined') { %>
        ,"VLANs": {}
    <% } %>
}