CreateInitiators

Contributors netapp-mwallis amgrissino Download PDF of this page

You can use CreateInitiators to create multiple new initiator IQNs or World Wide Port Names (WWPNs) and optionally assign them aliases and attributes. When you use CreateInitiators to create new initiators, you can also add them to volume access groups.

If the operation fails to create one of the initiators provided in the parameter, the method returns an error and does not create any initiators (no partial completion is possible).

Parameter

This method has the following input parameter:

Name Description Type Default value Required

initiators

A list of objects containing characteristics of each new initiator. Objects:

  • alias: (Optional) The friendly name to assign to this initiator. (string)

  • attributes: (Optional) A set of JSON attributes to assign to this initiator. (JSON object)

  • chapUsername: (Optional) The unique CHAP username for this initiator. Defaults to the initiator name (IQN) if not specified during creation and requireChap is true. (string)

  • initiatorSecret: (Optional) The CHAP secret used to authenticate the initiator. Defaults to a randomly generated secret if not specified during creation and requireChap is true. (string)

  • name: (Required) The name of the initiator (IQN or WWPN) to create. (string)

  • requireChap: (Optional) True if CHAP is required during session login for this initiator. (boolean)

  • targetSecret: (Optional) The CHAP secret used to authenticate the target (when using mutual CHAP authentication). Defaults to a randomly generated secret if not specified during creation and requireChap is true. (string)

  • virtualNetworkIDs: (Optional) The list of virtual network identifiers associated with this initiator. If you define one or more virtual networks, this initiator is only able to login to those virtual networks. If you don’t define any virtual networks, this initiator can login to all networks.

  • volumeAccessGroupID: (Optional) The ID of the volume access group to which this newly created initiator will be added. (integer)

JSON object array

None

Yes

Return value

This method has the following return value:

Name

Description

Type

initiators

List of objects describing the newly created initiators.

initiator array

Error

This method can return the following error:

Name

Description

xInitiatorExists

Returned if the initiator name you chose already exists.

Request example

Requests for this method are similar to the following example:

{
  "id": 3291,
  "method": "CreateInitiators",
  "params": {
    "initiators": [
      {
        "name": "iqn.1993-08.org.debian:01:288170452",
        "alias": "example1"
      },
      {
        "name": "iqn.1993-08.org.debian:01:297817012",
        "alias": "example2"
      }
    ]
  }
}

Response example

This method returns a response similar to the following example:

{
  "id": 3291,
  "result": {
    "initiators": [
      {
        "alias": "example1",
        "attributes": {},
        "initiatorID": 145,
        "initiatorName": "iqn.1993-08.org.debian:01:288170452",
        "volumeAccessGroups": []
      },
      {
        "alias": "example2",
        "attributes": {},
        "initiatorID": 146,
        "initiatorName": "iqn.1993-08.org.debian:01:297817012",
        "volumeAccessGroups": []
      }
    ]
  }
}

New since version

9.6

Find more information