iSCSI qualified names

Use this REST API to obtain a list of iSCSI Qualified Names (IQNs) for a specified tiebreaker iSCSI IP address.

Get a list of IQNs

Parameter Description
URI /admin/resources/iscsi_get_disks
Method POST
Returns 200 Returns a list of iSCSI targets
400 Bad request
404 Discovery of the target IQNs failed. Most likely the IP address could not be found.
Message CWZIP5521E is displayed with one of the error codes in the following nested table:
RC Comment
0 Command executed successfully.
1 Generic error code.
2 Session could not be found.
3 Could not allocate resource for operation.
4 Connect problem caused operation to fail
5 Generic iSCSI login failure
6 Error accessing/managing iSCSI DB
7 Invalid argument
8 Connection timer expired while trying to connect
9 Generic internal iscsid/kernel failure
10 iSCSI logout failed
11 iSCSI PDU timed out
12 iSCSI transport module not loaded in kernel or iscsid
13 Did not have proper OS permissions to access iscsid or execute iscsiadm command
14 Transport module did not support operation
15 Session is logged in
16 Invalid IPC MGMT request
17 iSNS service is not supported
18 A read/write to iscsid failed
19 Fatal iSCSI login error
20 Could not connect to iscsid
21 No records/targets/sessions/portals found to execute operation on
22 Could not lookup object in sysfs
23 Could not lookup host
24 Login failed due to authorization failure
25 iSNS query failure
26 iSNS registration/deregistration failed
500 Invalid IP address

Example: Successful return of multiple iSCSI target IQNs

POST /admin/resources/iscsi_get_disks

Request JSON:
{
   "ip":"172.16.99.203"
}
Response JSON:
{
      "iscsi_targets": [
      {
        "ip": "172.16.99.203",
        "port": "3260",
        "group_tag": "1279",
        "targetname": "iqn.2005-10.com.xivstorage:020364"
      },
      {
        "ip": "172.16.99.204",
        "port": "3260",
        "group_tag": "1535",
        "targetname": "iqn.2005-10.com.xivstorage:020364"
      },
      {
        "ip": "172.16.99.205",
        "port": "3260",
        "group_tag": "1791",
        "targetname": "iqn.2005-10.com.xivstorage:020364"
      },
     {
        "ip": "172.16.99.206",
        "port": "3260",
        "group_tag": "2047",
        "targetname": "iqn.2005-10.com.xivstorage:020364"
      }
   ]
} 

Example: 400 Bad Request

POST /admin/resources/iscsi_get_disks

Request JSON:
{
   "ipx":"172.16.99.201"
}
Response JSON:
{ 
	"id": "CWZIP5519E", 
	"messages": { 
		"message": "CWZIP5519E The iSCSI IP Address was not supplied. ", 
		"lang": "en_US" 
	}, 
	"type": "Error", 
	"time": "Thu 25 Sep 2014 14:44:36.857 UTC", 
	"suggestedAction": "Not Applicable", 
	"uri": "/resources/iscsi_get_disks" 
} 

Examples: 404 Not Found

POST /admin/resources/iscsi_get_disks

Request JSON:
{
   "ip":"172.16.99.101"
}
Response JSON for message CWZIP5520E:
{
   "id": "CWZIP5520E",
   "messages": {
      "message": "CWZIP5520E No route to the iSCSI host 172.16.99.101: Either the iSCSI host is not defined or there are network connectivity problems.",
      "lang": "en_US"
   },
   "type": "Error",
   "time": "Thu 25 Sep 2014 14:51:24.451 UTC",
   "suggestedAction": "Not Applicable",
   "uri": "/resources/iscsi_get_disks"
}
Request JSON:
{
   "ip":"172.16.1.1"
}
Response JSON for message CWZIP5521E (with return code 4):
{
    "id": "CWZIP5521E",
    "messages": {
       "message": "CWZIP5521E Discovery of the iSCSI targets for host 172.16.1.1 failed with error: 4
        (connect problem caused operation to fail) ",
       "lang": "en_US"
       },
    "type": "Error",
    "time": "Tue 23 Sep 2014 20:52:02.109 UTC",
    "suggestedAction": "Not Applicable",
    "uri": "/resources/iscsi_get_disks"
}

Example: 500 Internal Server Error

POST /admin/resources/iscsi_get_disks

Request JSON:
{
   "ip":"172.16.99.257"
}
Response JSON:
{
   "rootCause": "java.net.UnknownHostException: 172.16.99.257: 172.16.99.257: Name or service not known",
   "errorStatusCode": 500,
   "errorMessage": "Error"
}