Adding host groups (iSCSI target) to a server

Storage Advisor Embedded Guide

Version
88-06-0x
Audience
anonymous
Part Number
MK-97HM85022-12

The following request adds host groups (iSCSI target) to a specified server (specified by its server ID).

Important:

You cannot add a host group (iSCSI target) if it meets any of the following conditions:

  • The security of the port associated with a host group (iSCSI target) is invalid.
  • The protocol of the host group (iSCSI target) differs from that of the server to which the host group is added.
  • The host group (iSCSI target) contains a volume that is not a virtual volume created from a pool.
  • The host group (iSCSI target) is already added to another server.
  • The host group (iSCSI target) is attached to a virtual storage machine.

Execution permission

Storage Administrator (Provisioning)

Request line

POST base-URL/simple/v1/objects/servers/object-ID/actions/add-host-groups/invoke

Request message

Object ID

Specify the id value obtained by getting information about the server.

Attribute

Type

Description

id

int

(Required) Server ID

Query parameters
None.
Body

The following is an example of adding a host group by specifying the host group ID:

{
  "hostGroups": [
    {
      "portId": "CL1-C",
      "hostGroupId": 1
    }
  ]
}

The following is an example of adding an iSCSI target by specifying the host group name:

{
  "hostGroups": [
    {
      "portId": "CL1-D",
      "hostGroupName": "My_REST_API_HOST"
    }
  ]
}

Attribute

Type

Description

hostGroups

object[]

Information about the host group (iSCSI target) to add

  • (Required) portId: (string)

    Specify the port ID by using five characters.

  • (Optional) hostGroupId: (int)

    Specify the host group (iSCSI target) ID by using an integer in the range from 1 through 254.

    Specify either hostGroupId or hostGroupName. Do not specify both of these parameters together.

  • (Optional) hostGroupName: (string)

    Specify the host group name (iSCSI target name) by using a character string consisting of 1 through 64 characters.

    Specify either hostGroupId or hostGroupName. Do not specify both of these parameters together.

Response message

Body

Attribute

Type

Description

statusResource

string

URL to use to obtain the execution results of the processing to add host groups (iSCSI targets)

Note:

Execute the API function for obtaining information about the status of the API function that performs asynchronous processing. For details, see Getting status information about an API function that performs asynchronous processing.

Status codes

See HTTP status codes.

Coding example

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session b74777a3f9f04ea8bd8f09847fac48d3" -X POST --data-binary @./InputParameters.json https://192.0.2.100/ConfigurationManager/simple/v1/objects/servers/8/actions/add-host-groups/invoke