Getting information about host groups or iSCSI targets

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
The following request gets information about host groups or iSCSI targets of the port.

Execution permission

Important:

If the storage system model is VSP E series, VSP G350, G370, G700, G900, VSP F350, F370, F700, F900, and if portId is not specified as a query parameter, pay attention to the number of concurrent executions of this API request. For details, see "Implementing retry processing".

Storage Administrator (View Only)

Request line

GET base-URL/v1/objects/host-groups

Request message

Object ID

None.

Query parameters

You can specify conditions to filter the execution results and get information about host groups at high speeds.

  • To filter the execution results

    Parameter

    Type

    Filter Condition

    portId

    string

    (Optional) Port number

    Only when this parameter is specified, the following attributes are also obtained:

    • iscsiName
    • authenticationMode
    • iscsiTargetDirection
    • hostModeOptions

    If this parameter is omitted, information about all ports is obtained.

    isUndefined

    boolean

    (Optional) Specify whether to get information even about host group numbers for which no host group or iSCSI target has been created.

    • true:

      Gets information about host group numbers for which no host group or iSCSI target has been created.

    • false:

      Does not get information about host group numbers for which no host group or iSCSI target has been created.

    You cannot specify this parameter at the same time as the hostGroupNumberList parameter.

    If this parameter is omitted, false is assumed to be specified.

  • When collecting additional detailed information

    Parameter

    Type

    Description

    detailInfoType

    string

    (Optional) Type of detailed information to be obtained

    • resourceGroup

      Gets information about resource groups of host groups or iSCSI targets.

      If you specify this parameter, also specify the portId parameter.

      The following parameter settings cannot be specified together with the detailInfoType parameter: storageCache specified for the accessMode parameter, or true specified for the isSimpleMode parameter.

  • To get information about host groups at high speeds

    Parameter

    Type

    Description

    accessMode

    string

    (Optional) To get information about host groups at high speeds, specify the following value:

    • storageCache

    You can specify this value if the storage system model is VSP 5000 series.

    If you specify this parameter, information about host groups is obtained from the cache. For this reason, you can get information more quickly by specifying this parameter than without specifying this parameter. After you use the REST API or CCI to create a host group, it usually takes anywhere from a few minutes to an hour before the latest information is applied to the cache.

    If you specify portId, you cannot specify this parameter.

    If you specify this parameter for VSP E series, VSP G350, G370, G700, G900, VSP F350, F370, F700, F900, the parameter is ignored.

  • To obtain only the attributes that fall under basic information

    You can obtain information more quickly than if you were to obtain all attributes.

    Parameter

    Type

    Description

    isSimpleMode

    boolean

    (Optional) Specify whether to obtain only the attributes that fall under basic information.

    • true: Obtain only the attributes that fall under basic information.
    • false: Obtain all attributes.

    If you specify the value true for this parameter, be sure to also specify the portId parameter.

    If this parameter is omitted, the value false is assumed.

    hostGroupNumberList

    string

    (Optional) Target IDs of iSCSI targets

    Specify this parameter to get basic information about the specified iSCSI targets.

    If you specify this parameter, be sure to specify true for the isSimpleMode parameter.

    You cannot specify this parameter at the same time as the isUndefined parameter.

    To specify multiple IDs, delimit each ID by using a comma.

Body

None.

Response message

Body

The following coding example obtains only the attributes that fall under basic information:

{
  "data": [
    {
      "hostGroupId": "CL1-A,0",
      "portId": "CL1-A",
      "hostGroupNumber": 0,
      "hostGroupName": "hostA"
    },
    {
      "hostGroupId": "CL1-B,0",
      "portId": "CL1-B",
      "hostGroupNumber": 0,
      "hostGroupName": "hostB"
    }
  ]
}

The following table describes the attributes that are obtained by a request that gets only attributes that fall under basic information:

Attribute

Type

Description

hostGroupId

string

Object ID for the host group or iSCSI target

portId

string

Port number

hostGroupNumber

int

Host group number of the port (for the iSCSI target, target ID)

hostGroupName

string

Host group name (for the iSCSI target, target ID)

If you do not specify the hostGroupNumberList parameter, only the first 16 characters are obtained.

iscsiName

string

iSCSI name of the iSCSI target of the port

This attribute is obtained only if you specify the hostGroupNumberList parameter.

authenticationMode

string

Authentication mode for the iSCSI target

This attribute is obtained only if you specify the hostGroupNumberList parameter.

  • CHAP: CHAP-authentication mode
  • NONE: No-authentication mode
  • BOTH: Both CHAP-authentication mode and no-authentication mode

iscsiTargetDirection

string

Direction of CHAP authentication for the iSCSI target

This attribute is obtained only if you specify the hostGroupNumberList parameter.

  • S: One-way (The iSCSI target authenticates the iSCSI initiator.)
  • D: Mutual (The iSCSI target and the iSCSI initiator authenticate each other.)

The following coding example obtains all attributes:

The following is an example of the output generated from the processing to get information about host groups or iSCSI targets of all ports:

{
  "data": [
    {
      "hostGroupId": "CL1-A,0",
      "portId": "CL1-A",
      "hostGroupNumber": 0,
      "hostGroupName": "hostA",
      "hostMode": "WIN",
      "hostModeOptions": [
        1,
        2
      ]
    },
    {
      "hostGroupId": "CL1-B,0",
      "portId": "CL1-B",
      "hostGroupNumber": 0,
      "hostGroupName": "hostB",
      "hostMode": "LINUX/IRIX"
    }
  ]
}

The following is an output example when information about the host group or the iSCSI target created for the specified port number is obtained:

{
  "data": [
    {
      "hostGroupId": "CL1-A,0",
      "portId": "CL1-A",
      "hostGroupNumber": 0,
      "hostGroupName": "hostA",
      "hostMode": "WIN",
      "hostModeOptions": [
        1,
        2
      ]
    },
    {
      "hostGroupId": "CL1-A,1",
      "portId": "CL1-A",
      "hostGroupNumber": 1,
      "hostGroupName": "hostB",
      "hostMode": "LINUX/IRIX"
    }
  ]
}

The following is an example of the output generated when information about resource groups is obtained:

In this example, information is also obtained about host group numbers for which no host group or iSCSI target has been created.

{
  "data": [
    {
      "hostGroupId": "CL1-A,0",
      "portId": "CL1-A",
      "hostGroupNumber": 0,
      "hostGroupName": "hostA",
      "hostMode": "WIN",
      "hostModeOptions": [
        1,
        2
      ],
      "resourceGroupId": 1,
      "isDefined": true
    },
    {
      "hostGroupId": "CL1-A,1",
      "portId": "CL1-A",
      "hostGroupNumber": 1,
      "hostGroupName": "-",
      "resourceGroupId": 2,
      "isDefined": false
    }
  ]
}

The following table describes the attributes that are obtained by a request that gets all attributes:

Attribute

Type

Description

hostGroupId

string

Object ID for the host group or iSCSI target

portId

string

Port number

hostGroupNumber

int

Host group number of the port (for the iSCSI target, target ID)

hostGroupName

string

Host group name (for the iSCSI target, target ID)

iscsiName

string

iSCSI name of the iSCSI target of the port

This information is obtained only when the portId parameter is specified.

authenticationMode

string

Authentication mode for the iSCSI target

This information is obtained only when the portId parameter is specified.

  • CHAP: CHAP-authentication mode
  • NONE: No-authentication mode
  • BOTH: Both CHAP-authentication mode and no-authentication mode

iscsiTargetDirection

string

Direction of CHAP authentication for the iSCSI target

This information is obtained only when the portId parameter is specified.

  • S: One-way (The iSCSI target authenticates the iSCSI initiator.)
  • D: Mutual (The iSCSI target and the iSCSI initiator authenticate each other.)

hostMode

string

Host mode for setting the host adapter of the host group

This attribute is obtained if the host group name is defined.

For details on the values to be obtained, see the description of the API function for changing the host group or iSCSI target settings.

hostModeOptions

int[]

Number of the host mode option set for the host group

This is not output if a host mode option is not set.

This information is obtained only when the portId parameter is specified.

This attribute is obtained if the host group name is defined.

For details on the number to be obtained, see the Provisioning Guide for Open Systems, or the Provisioning Guide.

resourceGroupId

int

ID of the resource group to which the host group or iSCSI target belongs

This information is obtained only when detailInfoType=resourceGroup is specified for the query.

isDefined

boolean

Whether the host group or iSCSI target has been created

This information is obtained only when detailInfoType=resourceGroup is specified for the query.

  • true: The host group or iSCSI target has been created.
  • false: The host group or iSCSI target has not been created.

Status codes

For details on the status codes of the request for this operation, see the description on HTTP status codes.

Coding example

When getting information about host groups or iSCSI targets of all ports:

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/host-groups

When information about the host group or the iSCSI target created for the specified port number is obtained:

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/host-groups?portId=CL1-A

When obtaining information about resource groups:

In this example, information is also obtained about host group numbers for which no host group or iSCSI target has been created.

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/host-groups?portId=CL1-A&isUndefined=true&detailInfoType=resourceGroup