Execution permission
Storage Administrator (Provisioning)
Request line
POST base-URL/v1/objects/host-groups
Request message
- Body
-
The following coding example creates a host group:
{ "portId": "CL1-A", "hostGroupName": "My_REST_API_HOST", "hostModeOptions": [12,33], "hostMode": "AIX" }
The following coding example creates an iSCSI target:
{ "portId": "CL1-A", "hostGroupName": "My_REST_API_HOST", "iscsiName": "iqn.20150908iscsi" }
Attribute
Type
Description
portId
string
(Required) Port number
hostGroupNumber
int
(Optional) Host group number
Specify a decimal (base 10) number in the range from 0 to 254. If this attribute is omitted, a value is automatically set.
For iSCSI ports, this number is called target ID.
hostGroupName
string
(Required) Host group name or iSCSI target name
- To create a host group
Specify a host group name consisting of 1 to 64 characters.
- To create an iSCSI target
Specify the iSCSI target name consisting of 1 to 32 characters. For the iSCSI target, you cannot specify the default name of the iSCSI target whose ID is 0.
You can use the following characters.
- Alphanumeric characters
- The following symbols:
. @ _ : -
The label cannot start with a hyphen (-).
You cannot create host groups or iSCSI targets that have the same name for a single port.
iscsiName
string
(Optional) iSCSI name
Specify this item when creating an iSCSI target. If this attribute is omitted, a value is automatically set.
Specify this item in the iqn or eui format.
- iqn format
Specify a value in the range from 5 to 223. You can use the following characters:
alphanumeric characters (lowercase), periods (.), hyphens (-), and colons (:)
Specification example: iqn.rest.example.of.iqn.form
-
eui format
After "eui.", specify a hexadecimal number. Specify a value consisting of 20 characters.
Specification example: eui.0900ABDC32598D26
hostMode
string
(Optional) Host mode
The specifiable values are as follows:
HP-UX, SOLARIS, AIX, WIN, LINUX/IRIX, TRU64, OVMS, NETWARE, VMWARE, VMWARE_EX, WIN_EX
If this attribute is omitted, LINUX/IRIX is set.
hostModeOptions
int[]
(Optional) Number of options for setting host mode options
For the specifiable numbers, see the Provisioning Guide for Open Systems , or the Provisioning Guide .
When specifying more than one attribute, use a comma to separate the values.
When specifying this attribute, make sure to also specify the hostMode attribute.
isQuickCreating
boolean
(Optional) When creating a host group by specifying hostGroupNumber, if you want to omit the process of checking whether the host group is created, specify true. If you specify true and a host group or iSCSI target already exists for the specified hostGroupNumber, the setting is overwritten.
- true: Does not check whether the host group has been created.
- false: Checks whether the host group has been created.
If this attribute is omitted, false is assumed.
If hostGroupNumber is not specified, this attribute is ignored.
- To create a host group
Response message
Status codes
The following table describes the meaning of the status code of the request for this operation. For details on other status codes, see the section explaining HTTP status codes.
Status code |
Message |
Description |
---|---|---|
409 |
Conflict |
A host group already exists for the specified host group number. |
Coding example
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X POST --data-binary @./InputParameters.json https://192.0.2.100/ConfigurationManager/v1/objects/host-groups