Skip to content

Commit

Permalink
Merge pull request RackHD#642 from longhornteam35/master
Browse files Browse the repository at this point in the history
on-http code merged conflict resolved and updated from upstream RackHD
  • Loading branch information
Rahman Muhammad authored May 17, 2017
2 parents bec8877 + 7936fed commit 4e3b72f
Show file tree
Hide file tree
Showing 8 changed files with 1,428 additions and 8 deletions.
84 changes: 84 additions & 0 deletions data/views/redfish-1.0/redfish.2016.3.computersystem.1.3.0.json
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"
}
}
133 changes: 133 additions & 0 deletions data/views/redfish-1.0/redfish.2016.3.drive.1.1.1.json
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 %>
}
]


}
85 changes: 85 additions & 0 deletions data/views/redfish-1.0/redfish.2016.3.storage.1.1.1.json
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 data/views/redfish-1.0/redfish.2016.3.storagecollection.json
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"
}
]
}
68 changes: 68 additions & 0 deletions data/views/redfish-1.0/redfish.2016.3.volume.1.0.2.json
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 ) ? ',': '' %>
<% }); %>
]
}
}
Loading

0 comments on commit 4e3b72f

Please sign in to comment.