The following request adds host groups (iSCSI target) to a specified server (specified by its server ID).
You cannot add a host group (iSCSI target) if it meets any of the following conditions:
- 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) is already added to another server.
- The port associated with the host group (or iSCSI target) and the server to which the host group is added is already connected.
- The total number of WWNs (or iSCSI names) registered in the server and the host group (or iSCSI target) to be added exceeds 32.
- The host group (iSCSI target) contains a volume that is not a virtual volume created from a pool.
- The security of the port associated with the host group (iSCSI target) is invalid.
- The host group (or iSCSI target) has a host group number (or iSCSI target number) of 0.
- The host group (iSCSI target) is attached to a virtual storage machine.
- The action mode of the port associated with the host group is NVMe.
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
- 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.
- (Required)
portId: (string)
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