diff --git a/data/views/redfish-1.0/redfish.2016.3.computersystem.1.3.0.json b/data/views/redfish-1.0/redfish.2016.3.computersystem.1.3.0.json new file mode 100755 index 000000000..19542d49c --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.computersystem.1.3.0.json @@ -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": {}, + "ManagedBy@odata.count": <%= obm.length %>, + "ManagedBy": [ + <% obm.forEach(function(obm, i, arr) { %> + { + "@odata.id": "<%= basepath %>/Managers/<%= obm %>" + } + <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> + <% }); %> + ], + "PoweredBy@odata.count": 0, + "PoweredBy": [], + "CooledBy@odata.count": 0, + "CooledBy": [], + "Chassis@odata.count": <%= 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" + } +} diff --git a/data/views/redfish-1.0/redfish.2016.3.drive.1.1.1.json b/data/views/redfish-1.0/redfish.2016.3.drive.1.1.1.json new file mode 100755 index 000000000..c064ab17e --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.drive.1.1.1.json @@ -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": { + "Volumes@odata.count": <%= 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 %> + } + ] + + +} diff --git a/data/views/redfish-1.0/redfish.2016.3.storage.1.1.1.json b/data/views/redfish-1.0/redfish.2016.3.storage.1.1.1.json new file mode 100755 index 000000000..33e59f443 --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.storage.1.1.1.json @@ -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" + <%} %> + }, + + "StorageControllers@odata.count" : <%= 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 ) ? ',': '' %> + <% }); %> + ], + "Drives@odata.count" : <%= 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" + } +} diff --git a/data/views/redfish-1.0/redfish.2016.3.storagecollection.json b/data/views/redfish-1.0/redfish.2016.3.storagecollection.json new file mode 100755 index 000000000..441b275dc --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.storagecollection.json @@ -0,0 +1,15 @@ +{ + "@odata.context" : "<%= basepath %>/$metadata#StorageCollection.StorageCollection", + "@odata.id": "<%= url %>", + "@odata.type": "#StorageCollection.StorageCollection", + "Description": "", + "Oem" : {}, + "Name": "Storage Collection", + "Members@odata.count": 1, + "Members@odata.navigationLink": "", + "Members": [ + { + "@odata.id": "<%= basepath %>/Systems/<%=identifier%>/Storage/1" + } + ] +} \ No newline at end of file diff --git a/data/views/redfish-1.0/redfish.2016.3.volume.1.0.2.json b/data/views/redfish-1.0/redfish.2016.3.volume.1.0.2.json new file mode 100755 index 000000000..fc76c9147 --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.volume.1.0.2.json @@ -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": { + "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 ) ? ',': '' %> + <% }); %> + ] + } +} diff --git a/data/views/redfish-1.0/redfish.2016.3.volumecollection.json b/data/views/redfish-1.0/redfish.2016.3.volumecollection.json new file mode 100755 index 000000000..c9ee4feb4 --- /dev/null +++ b/data/views/redfish-1.0/redfish.2016.3.volumecollection.json @@ -0,0 +1,16 @@ +{ + "@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/Volume/$entity", + "@odata.id": "<%= url %>", + "@odata.type": "#VolumeCollection.VolumeCollection", + "Oem" : {}, + "Name": "Volume Collection", + "Members@odata.count": <%= virtualDisks.length %>, + "Members": [ + <% virtualDisks.forEach(function(n, i, arr) { %> + { + "@odata.id": "<%= basepath %>/Systems/<%=identifier%>/Storage/<%=index%>/Volumes/<%=i%>" + } + <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %> + <% }); %> + ] +} diff --git a/lib/api/redfish-1.0/systems.js b/lib/api/redfish-1.0/systems.js old mode 100644 new mode 100755 index b2f98e067..ca9d48a6f --- a/lib/api/redfish-1.0/systems.js +++ b/lib/api/redfish-1.0/systems.js @@ -274,7 +274,7 @@ var getSystem = controller(function(req, res) { return obms; }) }).then(function(data) { - return redfish.render('redfish.1.0.0.computersystem.1.1.0.json', + return redfish.render('redfish.1.0.0.computersystem.1.0.0.json', 'ComputerSystem.v1_3_0.json#/definitions/ComputerSystem', _.merge(options, data)); }).catch(function(error) { @@ -536,6 +536,256 @@ var getSimpleStorage = controller(function(req, res) { }); }); +/** + * Generate information about the storage adapters of a specific system + * @param {Object} req + * @param {Object} res + */ +var listStorage = controller(function(req, res) { + var identifier = req.swagger.params.identifier.value; + var options = redfish.makeOptions(req, res, identifier); + + return waterline.nodes.getNodeById(identifier) + .then(function(node){ + var dellFound = false; + for(var i=0; i 1){ + speedInDecimal += "." + speed[1]; + } + } + else { + speedInDecimal = 0; + } + ele.possibleSpeed = speedInDecimal; + //console.log("speedInGbs: " + speedInDecimal); + options.controllers.push(ele); + }); + + options.drives = []; +// console.log("CONTROLLER: " + JSON.stringify(options.controller, null, 4)); + _.forEach(hardware.data.storage.physicalDisks, function(ele) { +// console.log("DEVICE: " + JSON.stringify(ele, null, 4)); + //ele.size = ele.size.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " bytes"; + options.drives.push(ele); + }); + + return redfish.render('redfish.2016.3.storage.1.1.1.json', + 'Storage.v1_1_1.json#/definitions/Storage', + options); + }).catch(function(error) { + return redfish.handleError(error, res); + }); + // } else { + // } + }); +}); + +/** + * Generate information about the storage devices on an adapter of a specific system + * @param {Object} req + * @param {Object} res + */ +var getDrive = controller(function(req, res) { + var identifier = req.swagger.params.identifier.value; + var index = req.swagger.params.index.value; + var driveIndex = req.swagger.params.driveIndex.value; + var options = redfish.makeOptions(req, res, identifier); + + options.driveIndex = driveIndex; + options.identifier = identifier; + options.index = index; + + return waterline.nodes.getNodeById(identifier) + .then(function(node){ + var dellFound = false; + for(var i=0; i -1){ + options.volumeIds.push(i); + } + } + return redfish.render('redfish.2016.3.drive.1.1.1.json', + 'Drive.v1_1_1.json#/definitions/Drive', + options); + }).catch(function(error) { + return redfish.handleError(error, res); + }); + // } else { + // } + }); +}); + +var listVolume = controller(function(req, res) { + var identifier = req.swagger.params.identifier.value; + var index = req.swagger.params.index.value; + var options = redfish.makeOptions(req, res, identifier); + + options.identifier = identifier; + options.index = index; + return waterline.nodes.getNodeById(identifier) + .then(function(node){ + var dellFound = false; + for(var i=0; i= hardware.data.storage.physicalDisks.length){ + throw "No drive exists with id " + driveIndices[i]; + } + graphOptions.defaults.drives += hardware.data.storage.physicalDisks[driveIndices[i]].fqdd; + if (i+1 < driveIndices.length){ + graphOptions.defaults.drives += ','; + } + } + var raidLevel = payload.volume.VolumeType; + switch(raidLevel) + { + case "NonRedundant": + graphOptions.defaults.raidLevel = 'r0'; + break; + case "Mirrored": + graphOptions.defaults.raidLevel = 'r1'; + break; + case "StripedWithParity": + graphOptions.defaults.raidLevel = 'r5'; + break; + case "SpannedMirrors": + graphOptions.defaults.raidLevel = 'r10'; + break; + case "SpannedStripesWithParity": + graphOptions.defaults.raidLevel = 'r50'; + break; + default: + throw "Invalid Raid Level for creating volume"; + } + }).then(function(){ + return nodeApi.setNodeWorkflowById({ name: graphName, options: graphOptions }, identifier); + }).then(function reportTask(data) { + return { + '@odata.id': options.basepath + '/TaskService/Tasks/' + data.instanceId + }; + }).then(function(output) { + res.setHeader('Location', output['@odata.id']); + res.status(202).json(output); + }).catch(function(error) { + return redfish.handleError(error, res); + }); + + // } + }); +}); + +var addHotspare = controller(function(req,res) { + var identifier = req.swagger.params.identifier.value; + var options = redfish.makeOptions(req, res, identifier); + var driveIndex = req.swagger.params.driveIndex.value; + var payload = req.swagger.params.payload.value; + console.log(" type: " + payload.hotspareType); + /* + payload looks like for dhs: + { + username: + password: + volumeId:(fqdd of volume) + + } + */ + if(payload.hotspareType == 'dhs'){ + console.log("username: " + payload.username + " password: " + payload.password + " volumeId " + payload.volumeId); + + } + else{ + console.log("username: " + payload.username + " password: " + payload.password); + + } + console.log("reached add hotspare method"); + + var graphName = 'Graph.Add.Hotspare'; + var graphOptions = { + defaults: payload + }; + return waterline.nodes.getNodeById(identifier) + .then(function(node){ + var dellFound = false; + for(var i=0; i + Defines a collection of simple storage collections that are + present on the system described by identifier + operationId: listStorage + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + responses: + 200: + description: Success + schema: + $ref: "#/definitions/StorageCollection_StorageCollection" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + /Systems/{identifier}/Storage/{index}: + x-swagger-router-controller: systems + get: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Retrieve the specific storage instance based on the index + description: > + Defines a storage subsystem on the device specified by + identifier that are present on the system described by identifier + operationId: getStorage + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + responses: + 200: + description: Success + schema: + $ref: "#/definitions/Storage.1.1.1_Storage" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + /Systems/{identifier}/Storage/{index}/Drives/{driveIndex}: + x-swagger-router-controller: systems + get: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Retrieve the specific drive instance based on the driveIndex + description: > + Defines a Drive specified by the driveIndex within a Storage subsystem + specified by the index + operationId: getDrive + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + - name: driveIndex + in: path + required: true + type: string + responses: + 200: + description: Success + schema: + $ref: "#/definitions/Drive.1.1.1_Drive" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + post: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Add a hot spare the specific drive instance based on the driveIndex + description: > + Defines a Drive specified by the driveIndex within a Storage subsystem + specified by the index + operationId: addHotspare + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + - name: driveIndex + in: path + required: true + type: string + - name: payload + in: body + required: true + schema: + $ref: "#/definitions/Drive.addHotspare" + responses: + 200: + description: Success + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + /Systems/{identifier}/Storage/{index}/Volumes: + x-swagger-router-controller: systems + get: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Retrieve the collection of volumes contained in the storage subsystem + description: > + Defines a collection of volumes contained within a resource + operationId: listVolume + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + responses: + 200: + description: Success + schema: + $ref: "#/definitions/VolumeCollection_VolumeCollection" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + post: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Add a volume to the collection of volumes contained in the storage subsystem + description: > + Defines a collection of volumes contained within a resource + operationId: addVolume + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + - name: payload + in: body + required: true + schema: + $ref: "#/definitions/Volume.add" + responses: + 200: + description: Success + schema: + $ref: "#/definitions/VolumeCollection_VolumeCollection" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + + /Systems/{identifier}/Storage/{index}/Volumes/{volumeIndex}: + x-swagger-router-controller: systems + get: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Retrieve the specific volume instance based on the volumeIndex + description: > + Defines a Volume specified by the volumeIndex within a Storage subsystem + specified by the index + operationId: getVolume + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + - name: volumeIndex + in: path + required: true + type: string + responses: + 200: + description: Success + schema: + $ref: "#/definitions/Volume.1.0.2_Volume" + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" + delete: + x-privileges: [ 'Login' ] + x-authentication-type: [ 'redfish', 'basic' ] + summary: Retrieve the specific volume instance based on the volumeIndex + description: > + Defines a Volume specified by the volumeIndex within a Storage subsystem + specified by the index + operationId: deleteVolume + tags: [ "/redfish/v1" ] + parameters: + - name: identifier + in: path + required: true + type: string + x-param-handler: sku + - name: index + in: path + required: true + type: string + - name: volumeIndex + in: path + required: true + type: string + - name: payload + in: body + required: true + schema: + $ref: "#/definitions/Volume.delete" + responses: + 200: + description: Success + 400: + $ref: "#/responses/status_400" + 401: + $ref: "#/responses/status_401" + 403: + $ref: "#/responses/status_403" + 404: + $ref: "#/responses/status_404" + 500: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" /Systems/{identifier}/LogServices: x-swagger-router-controller: systems get: @@ -1857,8 +2177,7 @@ responses: and is not capable of supporting the method for any resource. definitions: AccountService.1.0.0_AccountService: - description: This is the schema definition for the Account Service. It represents - the properties for the service itself and has links to the actual list of accounts. + description: This is the schema definition for the Account Service. It represents the properties for the service itself and has links to the actual list of accounts. properties: '@odata.context': format: uri @@ -2493,6 +2812,8 @@ definitions: description: This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections. type: object + Drive.1.1.1_Drive: #TODO + description: This schema defines a single physical disk EthernetInterface.1.0.0_EthernetInterface: description: This schema defines a simple ethernet NIC resource. properties: @@ -5432,6 +5753,48 @@ definitions: description: This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections. type: object + Storage.1.1.1_Storage: #TODO + description: This is the schema definition for the Storage resource. It represents a set + of storage controllers (physical or virtual) and the resources such as volumes that can + be accessed from that subsystem. + StorageCollection_StorageCollection: + properties: + '@odata.context': + format: uri + readOnly: true + type: string + '@odata.id': + format: uri + readOnly: true + type: string + '@odata.type': + readOnly: true + type: string + Description: + description: Provides a description of this resource and is used for commonality in + the schema definitions. + readOnly: true + type: string + Members: + description: Contains the members of this collection. + items: + $ref: '#/definitions/odata.4.0.0_idRef' + readOnly: true + type: array + Members@odata.count: + readOnly: true + type: number + Members@odata.navigationLink: + $ref: '#/definitions/odata.4.0.0_idRef' + Name: + description: The name of the resource or array element. + readOnly: true + type: string + Oem: + $ref: '#/definitions/Resource_Oem' + description: This is the manufacturer/provider specific extension moniker + used to divide the Oem object into sections. + type: object Task.1.0.0_Task: description: This is the schema definition for a Task resource. properties: @@ -6024,6 +6387,203 @@ definitions: description: This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections. type: object + VolumeCollection_VolumeCollection: + properties: + '@odata.context': + format: uri + readOnly: true + type: string + '@odata.id': + format: uri + readOnly: true + type: string + '@odata.type': + readOnly: true + type: string + Description: + description: Provides a description of this resource and is used for commonality in + the schema definitions. + readOnly: true + type: string + Members: + description: Contains the members of this collection. + items: + $ref: '#/definitions/odata.4.0.0_idRef' + readOnly: true + type: array + Members@odata.count: + readOnly: true + type: number + Members@odata.navigationLink: + $ref: '#/definitions/odata.4.0.0_idRef' + Name: + description: The name of the resource or array element. + readOnly: true + type: string + Oem: + $ref: '#/definitions/Resource_Oem' + description: This is the manufacturer/provider specific extension moniker + used to divide the Oem object into sections. + type: object + Volume.1.0.2_Volume: #TODO + type: object + properties: + '@odata.context': + format: uri + readOnly: true + type: string + '@odata.id': + format: uri + readOnly: true + type: string + '@odata.type': + readOnly: true + type: string + Oem: + $ref: '#/definitions/Resource_Oem' + description: This is the manufacturer/provider specific extension moniker + used to divide the Oem object into sections. + Id: + description: Uniquely identifies the resource within the collection of like resources. + readOnly: true + type: string + Description: + description: Provides a description of this resource and is used for commonality in the schema definitions. + readOnly: true + type: string + Name: + description: The name of the resource or array element. + readOnly: true + type: string + Status: + $ref: '#/definitions/Resource_Status' + CapacityBytes: + type: number + readOnly: true + description: The size in bytes of this Volume. + VolumeType: + enum: + - RawDevice + - NonRedundant + - Mirrored + - StripedWithParity + - SpannedMirrors + - SpannedStripesWithParity + type: string + readOnly: true + description: The type of this volume. + Encrypted: + type: boolean + readOnly: false + description: Is this Volume encrypted. + EncryptionTypes: + type: array + items: + enum: + - NativeDriveEncryption + - ControllerAssisted + - SoftwareAssisted + readOnly: false + description: The types of encryption used by this Volume. + BlockSizeBytes: + type: number + readOnly: true + description: The size of the smallest addressible unit (Block) of this volume in bytes. + Operations: + type: array + items: + properties: + OperationName: + type: string + readOnly: true + description: The name of the operation. + PercentageComplete: + type: number + readOnly: true + description: The percentage of the operation that has been completed. + AssociatedTask: + $ref: '#/definitions/Task.1.0.0_Task' + readOnly: true + description: A reference to the task associated with the operation if any. + description: The operations currently running on the Volume. + OptimumIOSizeBytes: + type: number + readOnly: true + description: The size in bytes of this Volume's optimum IO size. + Links: + properties: + Oem: + $ref: '#/definitions/Resource_Oem' + description: This is the manufacturer/provider specific extension moniker + used to divide the Oem object into sections. + Drives@odata.count: + readOnly: true + type: number + Drives@odata.navigationLink: + $ref: '#/definitions/odata.4.0.0_idRef' + Drives: + description: An array of references to the drives which contain this volume. This will reference Drives that either wholly or only partly contain this volume. + items: + $ref: '#/definitions/odata.4.0.0_idRef' + readOnly: true + type: array + description: Contains references to other resources that are related to this resource. + Actions: + type: object + properties: + Oem: + $ref: '#/definitions/Resource_Oem' + description: This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections. + "#Volume.Initialize": + type: object + properties: + title: + type: string + description: Friendly action name + target: + type: string + format: uri + description: Link to invoke action + description: This action is used to prepare the contents of the volume for use by the system. + description: The available actions for this resource. + required: + - Id + - Name + description: Volume contains properties used to describe a volume, virtual disk, LUN, or other logical storage entity for any system. + Volume.delete: + properties: + username: + type: string + password: + type: string + required: + - username + - password + Volume.add: + properties: + username: + type: string + password: + type: string + volume: + $ref: '#/definitions/Volume.1.0.2_Volume' + required: + - username + - password + Drive.addHotspare: + properties: + username: + type: string + password: + type: string + hotspareType: + type: string + volumeId: + type: string + required: + - username + - password + - hotspareType odata.4.0.0_idRef: properties: '@odata.id':