Add Storage Volume

  1. Add a QoS Group using the addQosGroup API.
    Following is a sample request:
    https://1.2.3.4/client/api?latency=15&graceallowed=true&name=QoS_b6834f859f604afbade5b578dbda19d1&iopscontrol=true&memlimit=0&tpcontrol=false&iops=5&throughput=0&command=addQosGroup&tsmid=cf25b459-f91e-3791-9475-254fd30f92ce&response=json&networkspeed=0

  2. Sample JSON Response
    { "addqosgroupresponse" :  { "qosgroup" : {
    	"id": "693a63c0-e961-3e54-a59d-fb033df7bf7b",
    	"name": "QoS_8376b84460bd4a3690256b99fb3a7980Acc1TSM1",
    	"tsmid": "cf25b459-f91e-3791-9475-254fd30f92ce",
    	"controllerid": "1745ab4e-84de-31a0-8fdc-f8fc001a8d58",
    	"poolid": "ca31777d-006c-390e-b507-4f79c501d572",
    	"parentid": "5ef6d74c-4b74-322d-bcfc-f1ad9a731b27",
    	"tsmName": "TSM1",
    	"offlinenodes": "",
    	"sitename": "Site1",
    	"clustername": "HAG1",
    	"controllerName": "Node1",
    	"clusterstatus": "Online",
    	"currentThroughput": 0,
    	"currentIOPS": 0,
    	"currentLatency": 0,
    	"currentThrottle": 0,
    	"iopsvalue": "(0/5)",
    	"throughputvalue": "(0/0)",
    	"iops": "5",
    	"iopscontrol": "true",
    	"throughput": "0",
    	"tpcontrol": "false",
    	"latency": "15",
    	"graceallowed": true,
    	"type": "1",
    	"revisionnumber": 0,
    	"managedstate": "Available",
    	"configurationstate": "init",
    	"standardproviops": 0,
    	"operatingblocksize": 0,
    	"operatingcachehit": 0,
    	"operatingiops": 0,
    	"standardoperatingiops": 0
    	} }  };10
  3. Create a Storage Volume using the createVolume API. 

  4. Following is a sample request:
    https://1.2.3.4/client/api?qosgroupid=f18ceb89-280f-36c8-add1-954d045b2af3&nameb6834f859f604afbade5b578dbda19d1&deduplication=off&blocklength=512B&quotasize=1G&sync=always&protocoltype=ISCSI&command=createVolume&datasetid=5ef6d74c-4b74-322d-bcfc-f1ad9a731b27&tsmid=cf25b459-f91e-3791-9475-254fd30f92ce&response=json&recordsize=16k&compression=off

    JSON Response
     { "createvolumeresponse" : {
    	"jobid": "25e2fd8e-ebf1-44bc-9f08-2faba195874f"
    
    } };13
  5. Use the queryAsyncJobResult API and retrieve the current status of asynchronous job.
    Following is a sample API request:
    https://1.2.3.4/client/api?command=queryAsyncJobResult&response=json&jobId=25e2fd8e-ebf1-44bc-9f08-2faba195874f

  6. JSON Response
    { "queryasyncjobresultresponse" : {
    	"accountid": "5d400e95-c5c2-4ea7-9f7c-604131f88875",
    	"userid": "c5edd12d-a5a5-451c-a238-a3c2364c4ed2",
    	"cmd": "com.cloudbyte.api.commands.CreateVolumeCmd",
    	"msg": "1",
    	"jobstatus": 0,
    	"jobprocstatus": 0,
    	"jobresultcode": 0,
    	"created": "2015-07-03 17:22:09",
    	"jobid": "25e2fd8e-ebf1-44bc-9f08-2faba195874f"
    } };35
  7. List all the existing file systems using the listFileSystem API.
    Following is a sample request:
    https://1.2.3.4/client/api?command=listFileSystem&response=json
  8. Sample JSON Response
    { "listFilesystemResponse" : { "count":3 ,"filesystem" : [  {
    	"id": "d244db0f-a280-3030-a216-4dce890b0933",
    	"name": "f58c23f050f84895968491f1d780faa1",
    	"simpleid": 33362,
    	"type": "volume",
    	"revisionnumber": 1,
    	"path": "iqn.2015-05.Acc1.TSM1:Acc1f58c23f050f84895968491f1d780faa1",
    	"clusterid": "c5f02013-3767-4de5-a5be-90df197c783c",
    	"clusterstatus": "Online",
    	"Tsmid": "cf25b459-f91e-3791-9475-254fd30f92ce",
    	"tsmType": "1",
    	"tsmCifsAuth": "user",
    	"accountid": "7b791118-55be-4439-8cd4-c9ac9bc1bf24",
    	"poolid": "ca31777d-006c-390e-b507-4f79c501d572",
    	"controllerid": "1745ab4e-84de-31a0-8fdc-f8fc001a8d58",
    	"groupid": "be9b105f-f078-35d0-9c01-c458cd51fb38",
    	"parentid": "5ef6d74c-4b74-322d-bcfc-f1ad9a731b27",
    	"compression": "off",
    	"sync": "always",
    	"noofcopies": 1,
    	"recordsize": "16k",
    	"quota": "2G", "pooltakeover": "noTakeOver",
    	"blocklength": "512B",
    	"volumeaccessible": "false",
    	"minrecommendedvolblocksize": 0,
    	"localschedulecount": 0
    } ] } };47

  9. List the iSCSI configuration details of Storage Volume using the listVolumeiSCSIService API.
    Following is a sample request:
    https://1.2.3.4/client/api?command=listVolumeiSCSIService&storageid=d0997909-2841-32d4-b2a5-58d2d75c89ac&response=json

  10. JSON Response
    { "listVolumeiSCSIServiceResponse" : { "count":1 ,"iSCSIService" : [  {
    	"id": "c880a1b5-8dc6-3753-9f97-dd22a21bacb7",
    	"volume_id": "e297a156-6af5-350d-a60b-7e615c8ad24e",
    	"ag_id": "2e7180b6-dddf-3440-b8fb-51ec310a2b7f",
    	"ig_id": "af349cc2-6687-32c0-9350-062920d7c5c9",
    	"iqnname": "iqn.2015-05.Acc1.TSM1:Acc18376b84460bd4a3690256b99fb3a7980",
    	"authmethod": "None",
    	"status": true,
    	"usn": "e297a1566af5350da60b7e615c8ad24e",
    	"initialdigest": "Auto",
    	"queuedepth": "32",
    	"inqproduct": 0,
    	"inqrevision": 0,
    	"blocklength": "512B",
    	"workerthreads": 6
    } ] } };8
    		
  11. Use the listiSCSIInitiator API to list the iSCSI initiators.
    Following is a sample request:
    https://1.2.3.4/client/api?command=listiSCSIInitiator&response=json&accountid=7b791118-55be-4439-8cd4-c9ac9bc1bf24

  12. JSON Response
    { "listInitiatorsResponse" : { "count":2 ,"initiator" : [  {
    	"id": "a1331f10-22f0-32ab-92c6-c93ad39b0c0a",
    	"accountid": "7b791118-55be-4439-8cd4-c9ac9bc1bf24",
    	"name": "ALL",
    	"netmask": "ALL",
    	"initiatorgroup": "ALL"
    }, {
    	"id": "af349cc2-6687-32c0-9350-062920d7c5c9",
    	"accountid": "7b791118-55be-4439-8cd4-c9ac9bc1bf24",
    	"name": "None",
    	"netmask": "None",
    	"initiatorgroup": "None"
    } ] } };4
  13. Update the Storage Volume iSCSI configurations using the updateVolumeiSCSIService API.
    Following is a sample request:
    https://1.2.3.4/client/api?igid=a1331f10-22f0-32ab-92c6-c93ad39b0c0a&command=updateVolumeiSCSIService&response=json&id=e44aa2d1-6427-3037-8084-c2a294e83e76

  14. JSON Response
    { "updatingvolumeiscsidetails" :  { "viscsioptions" : {
    	"id": "72e3a6ac-4bcf-3264-ad03-a6399088d8d0",
    	"volume_id": "bfc5a6b7-fefb-31b6-9e32-a33e405b2a59",
    	"ag_id": "2e7180b6-dddf-3440-b8fb-51ec310a2b7f",
    	"ig_id": "a1331f10-22f0-32ab-92c6-c93ad39b0c0a",
    	"iqnname": "iqn.2015-05.Acc1.TSM1:Acc114ef818d41014e0198a5c2f7ab767f57",
    	"authmethod": "None",
    	"status": true,
    	"usn": "bfc5a6b7fefb31b69e32a33e405b2a59",
    	"initialdigest": "Auto",
    	"queuedepth": "32",
    	"inqproduct": 0,
    	"inqrevision": 0,
    	"blocklength": "512B",
    	"workerthreads": 0
    } }  };184