forked from RackHD/on-http
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RackHD#642 from longhornteam35/master
on-http code merged conflict resolved and updated from upstream RackHD
- Loading branch information
Showing
8 changed files
with
1,428 additions
and
8 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
data/views/redfish-1.0/redfish.2016.3.computersystem.1.3.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@odata.context" : "<%= basepath %>/$metadata#Systems/Members/$entity", | ||
"@odata.id": "<%= url %>", | ||
"@odata.type": "#ComputerSystem.1.3.0.ComputerSystem", | ||
"Oem" : {}, | ||
"Id": "<%= identifier %>", | ||
"Description": "<%= hardware.data.system.systemGeneration %>", | ||
"Name": "Computer System", | ||
"SystemType": "<%= systemType %>", | ||
"AssetTag": "<%= hardware.data.system.assetTag || 'Not Specified' %>", | ||
"Manufacturer": "<%= hardware.data.system.manufacturer %>", | ||
"Model": "<%= hardware.data.system.model %>", | ||
"SKU": "<%= hardware.data.system.boardSerialNumber %>", | ||
"SerialNumber": "<%= hardware.data.system.serviceTag %>", | ||
"PartNumber": "", | ||
"UUID": "<%= hardware.data.system.uuid.toLowerCase() %>", | ||
"HostName": "<% hardware.data.system.hostName %>", | ||
"IndicatorLED": "<%= hardware.data.leds[0] || 'Unknown' %>", | ||
"PowerState": "<%= hardware.data.system.powerState == 2 ? 'On' : 'Off' %>", | ||
"Boot": {}, | ||
"BiosVersion": "<%= hardware.data.system.biosVersionString.trim() %> <%= hardware.data.system.biosReleaseDate.trim() %> ", | ||
"ProcessorSummary": { | ||
"Count": <%= hardware.data.system.populatedCpuSockets %>, | ||
"Model": "<%= hardware.data.cpus[0].model %>", | ||
"Status": {} | ||
}, | ||
"MemorySummary": { | ||
"TotalSystemMemoryGiB": <%= hardware.data.system.sysMemTotalSize %>, | ||
"Status": {} | ||
}, | ||
"Actions": { | ||
"Oem": { | ||
"RackHD": { | ||
"#RackHD.BootImage": { | ||
"target": "<%=basepath%>/Systems/<%=identifier%>/Actions/RackHD.BootImage" | ||
} | ||
} | ||
}, | ||
"#ComputerSystem.Reset": { | ||
"target": "<%=basepath%>/Systems/<%=identifier%>/Actions/ComputerSystem.Reset" | ||
} | ||
}, | ||
"Status": {}, | ||
"Processors": { | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/Processors" | ||
}, | ||
"EthernetInterfaces": { | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/EthernetInterfaces" | ||
}, | ||
"SimpleStorage": { | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/SimpleStorage" | ||
}, | ||
"LogServices": { | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/LogServices" | ||
}, | ||
"Links": { | ||
"Oem": {}, | ||
"[email protected]": <%= obm.length %>, | ||
"ManagedBy": [ | ||
<% obm.forEach(function(obm, i, arr) { %> | ||
{ | ||
"@odata.id": "<%= basepath %>/Managers/<%= obm %>" | ||
} | ||
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> | ||
<% }); %> | ||
], | ||
"[email protected]": 0, | ||
"PoweredBy": [], | ||
"[email protected]": 0, | ||
"CooledBy": [], | ||
"[email protected]": <%= chassis.length %>, | ||
"Chassis": [ | ||
<% chassis.forEach(function(chassis, i, arr) { %> | ||
{ | ||
"@odata.id": "<%= basepath %>/Chassis/<%= chassis %>" | ||
} | ||
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> | ||
<% }); %> | ||
] | ||
}, | ||
"Storage":{ | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/Storage" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"@odata.context": "<%= basepath %>/$metadata#Systems/Members/<%= identifier %>/Storage/Members/<%= index%>/Drives/$entity", | ||
"@odata.id": "<%= url %>", | ||
"@odata.type": "#Drive.1.1.1.Drive", | ||
"Oem": {}, | ||
"Id": "<%= driveIndex %>", | ||
"Description": "<%= drive.deviceDescription %>", | ||
"Name": "Drive", | ||
"Model": "<%= drive.model%>", | ||
"Revision": "<%= drive.revision%>", | ||
"Status": { | ||
"Health": <% | ||
switch(drive.primaryStatus){ | ||
case '1': %> | ||
"OK" | ||
<% break; | ||
case '2': %> | ||
"Warning" | ||
<% break; | ||
case '3': %> | ||
"Critical" | ||
<% break; | ||
default: %> | ||
"OK" | ||
<%} %> | ||
}, | ||
"CapacityBytes": <%= drive.sizeInBytes %>, | ||
"FailurePredicted": <%=drive.predictiveFailureState == 0 ? false:true%>, | ||
"Protocol": <% | ||
switch(drive.busProtocol){ | ||
case '1': %> | ||
"iSCSI", | ||
<% break; | ||
case '3': %> | ||
"FC", | ||
<% break; | ||
case '4': %> | ||
"USB", | ||
<% break; | ||
case '5': %> | ||
"SATA", | ||
<% break; | ||
case '6': %> | ||
"SAS", | ||
<% break; | ||
default: %> | ||
"SATA", | ||
<%} %> | ||
"MediaType": "<%= drive.mediaType == 0 ? 'HDD':'SSD'%>", | ||
"Manufacturer": "<%= drive.manufacturer %>", | ||
"SKU": "", | ||
"SerialNumber": "<%= drive.serialNumber %>", | ||
"PartNumber": "<%= drive.ppid %>", | ||
"AssetTag": "", | ||
"Identifiers" :[ { | ||
"DurableName" : "<%= drive.sasaddress %>", | ||
"DurableNameFormat" : "EUI" | ||
}], | ||
"Location":[{ | ||
"Info": "<%= drive.fqdd %>" | ||
}], | ||
"HotspareType": <% | ||
switch(drive.hotSpareStatus){ | ||
case '0': %> | ||
"None", | ||
<% break; | ||
case '1': %> | ||
"Dedicated", | ||
<% break; | ||
case '2': %> | ||
"Global", | ||
<% break; | ||
default: %> | ||
"None", | ||
<%} %> | ||
"EncryptionAbility": "<%= drive.securityStatus == 0 ? 'None':'SelfEncryptingDrive'%>", | ||
"EncryptionStatus": <% | ||
switch(drive.securityStatus){ | ||
case '0': %> | ||
"Unencrypted", | ||
<% break; | ||
case '1': %> | ||
"Unlocked", | ||
<% break; | ||
case '2': %> | ||
"Locked", | ||
<% break; | ||
case '5': %> | ||
"Foreign", | ||
<% break; | ||
default: %> | ||
"Unencrypted", | ||
<%} %> | ||
"BlockSizeBytes": <%= drive.blockSizeInBytes %>, | ||
"CapableSpeedGbs": <% | ||
switch(drive.maxCapableSpeed){ | ||
case '0': %> | ||
0, | ||
<% break; | ||
case '1': %> | ||
1.5, | ||
<% break; | ||
case '2': %> | ||
3, | ||
<% break; | ||
case '3': %> | ||
6, | ||
<% break; | ||
case '4': %> | ||
12, | ||
<% break; | ||
default: %> | ||
0, | ||
<%} %> | ||
"Links": { | ||
"[email protected]": <%= volumeIds.length %>, | ||
"Volumes": [ | ||
<% volumeIds.forEach(function(n, i, arr) { %> | ||
{ | ||
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/Storage/<%=index%>/Volumes/<%=n%>" | ||
} | ||
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> | ||
<% }); %> | ||
] | ||
}, | ||
"Operations": [ | ||
{"OperationName": "<%= drive.operationName %>", | ||
"PercentageComplete": <%= drive.operationPercentComplete %> | ||
} | ||
] | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/Storage/Members/$entity", | ||
"@odata.id" : "<%= url %>", | ||
"@odata.type" : "#Storage.1.1.1.Storage", | ||
"Id" : "<%= index %>", | ||
"Description" : "", | ||
"Name" : "", | ||
"Links" : { }, | ||
"Status": { | ||
"HealthRollup": <% | ||
switch(hardware.data.system.storageRollupStatus){ | ||
case '1': %> | ||
"OK" | ||
<% break; | ||
case '2': %> | ||
"Warning" | ||
<% break; | ||
case '3': %> | ||
"Critical" | ||
<% break; | ||
default: %> | ||
"OK" | ||
<%} %> | ||
}, | ||
|
||
"[email protected]" : <%= controllers.length %>, | ||
"StorageControllers" : [ | ||
<% controllers.forEach(function(controller, i, arr) { %> | ||
{ | ||
"MemberId" : "<%= controller.fqdd %>", | ||
"Status" : { | ||
"Health" : <% | ||
switch(controller.primaryStatus){ | ||
case 1: %> | ||
"OK" | ||
<% break; | ||
case 2: %> | ||
"Warning" | ||
<% break; | ||
case 3: %> | ||
"Critical" | ||
<% break; | ||
default: %> | ||
"OK" | ||
<%} %>, | ||
"HealthRollup" : <% | ||
switch(controller.rollupStatus){ | ||
case 1: %> | ||
"OK" | ||
<% break; | ||
case 2: %> | ||
"Warning" | ||
<% break; | ||
case 3: %> | ||
"Critical" | ||
<% break; | ||
default: %> | ||
"OK" | ||
<%} %> | ||
}, | ||
"SpeedGbps" : <%= controller.possibleSpeed %>, | ||
"FirmwareVersion" : "<%= controller.controllerFirmwareVersion %>", | ||
"Manufacturer" : "<%= controller.deviceCardManufacturer %>", | ||
"Model" : "<%= controller.productName %>", | ||
"Identifiers" : [ { | ||
"DurableName" : "<%= controller.sasaddress %>", | ||
"DurableNameFormat" : "EUI" | ||
}] | ||
} | ||
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> | ||
<% }); %> | ||
], | ||
"[email protected]" : <%= drives.length %>, | ||
"Drives" : [ | ||
<% drives.forEach(function(drive, i, arr) { %> | ||
{ | ||
"@odata.id" : "<%= basepath %>/Systems/<%= identifier %>/Storage/<%= index %>/Drives/<%= i %>" | ||
} | ||
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> | ||
<% }); %> | ||
], | ||
"Volumes" : { | ||
"@odata.id": "<%= basepath %>/Systems/<%= identifier %>/Storage/<%= index %>/Volumes" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
data/views/redfish-1.0/redfish.2016.3.storagecollection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"@odata.context" : "<%= basepath %>/$metadata#StorageCollection.StorageCollection", | ||
"@odata.id": "<%= url %>", | ||
"@odata.type": "#StorageCollection.StorageCollection", | ||
"Description": "", | ||
"Oem" : {}, | ||
"Name": "Storage Collection", | ||
"[email protected]": 1, | ||
"[email protected]": "", | ||
"Members": [ | ||
{ | ||
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/Storage/1" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"@odata.context": "<%= basepath %>/$metadata#Systems/Members/<%= identifier %>/Storage/Members/<%= index%>/Volumes/$entity", | ||
"@odata.id": "<%= url %>", | ||
"@odata.type": "#Volume.1.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": { | ||
"[email protected]": <%= 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 ) ? ',': '' %> | ||
<% }); %> | ||
] | ||
} | ||
} |
Oops, something went wrong.