Skip to main content
A newer release of this product is available.

Create a portset

Contributors

POST /protocols/san/portsets

Introduced In: 9.9

Creates a portset.

Required properties

  • svm.uuid or svm.name - Existing SVM in which to create the portset.

  • name - Name of the portset.

  • protocol - The network protocol of the interfaces in the portset.

  • interfaces - Network interfaces to include in the portset. This property can be used to create the portset and populate it with network interfaces in a single request.

Default property values

If not specified in POST, the following default property values are assigned.

  • protocol - mixed - Data protocol of the portset's network interfaces.

  • lun portset create

Parameters

Name Type In Required Description

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

Request Body

Name Type Description

_links

_links

igroups

array[igroups]

An array initiator groups to which the portset is bound.

interfaces

array[interfaces]

An array of network interfaces that are members of the portset. These are the only network interfaces through which the initiators of a bound igroup can access mapped LUNs.

Zero or more network interfaces can be supplied when the portset is created. After creation, network interfaces can be added or removed from the portset using the /protocols/san/portsets/{portset.uuid}/interfaces endpoint. See link:post-protocols-san-portsets-interfaces(#-san-portset-interface-create)anddelete-protocols-san-portsets-interfaces-.htmlPOST /protocols/san/portsets/{portset.uuid}/interfaces and [DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}] for more details.

name

string

The name of the portset. Required in POST.

The name of a portset cannot be changed after creation.

protocol

string

The protocols supported by the portset. This restricts the type of network interfaces that can be added to the portset. Optional in POST; if not supplied, this defaults to mixed.

The protocol of a portset cannot be changed after creation.

svm

svm

uuid

string

The unique identifier for a portset.

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "igroups": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "igroup1",
    "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
  },
  "interfaces": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "fc": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "fc_lif1",
      "uuid": "3a09ab42-4da1-32cf-9d35-3385a6101a0b",
      "wwpn": "20:00:00:50:56:b4:13:a8"
    },
    "ip": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "ip": {
        "address": "10.10.10.7"
      },
      "name": "lif1",
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
    },
    "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
  },
  "name": "portset1",
  "protocol": "fcp",
  "svm": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}

Response

Status: 201, Created
Name Type Description

_links

_links

num_records

integer

Number of records.

records

array[portset]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "igroups": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "igroup1",
      "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
    },
    "interfaces": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "fc": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "fc_lif1",
        "uuid": "3a09ab42-4da1-32cf-9d35-3385a6101a0b",
        "wwpn": "20:00:00:50:56:b4:13:a8"
      },
      "ip": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "ip": {
          "address": "10.10.10.7"
        },
        "name": "lif1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
    },
    "name": "portset1",
    "protocol": "fcp",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  }
}

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

1254259

A portset with the same name already exists in the SVM.

2621462

The specified SVM does not exist.

2621706

The specified svm.uuid and svm.name do not refer to the same SVM.

2621707

No SVM was specified. Either svm.name or svm.uuid must be supplied.

5373958

The specified portset name contains invalid characters.

5374905

An invalid interfaces array element was specified.

5374906

A specified network interface was not found.

5374907

The specified network interface UUID and name don't identify the same network interface.

5374914

An attempt was made to add a network interface of an incompatible protocol to a portset.

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": {
      "code": "string",
      "message": "string"
    },
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

igroups

Name Type Description

_links

_links

name

string

The name of the initiator group.

uuid

string

The unique identifier of the initiator group.

fc

An FC interface.

Name Type Description

_links

_links

name

string

The name of the FC interface.

uuid

string

The unique identifier of the FC interface.

wwpn

string

The WWPN of the FC interface.

ip

IP information

Name Type Description

address

string

IPv4 or IPv6 address

ip

A network interface. Either UUID or name may be supplied on input.

Name Type Description

_links

_links

ip

ip

IP information

name

string

The name of the interface.

uuid

string

The UUID that uniquely identifies the interface.

interfaces

A container for either a Fibre Channel network interface or an IP network interface. On POST fc and ip are mutually exclusive.

Name Type Description

_links

_links

fc

fc

An FC interface.

ip

ip

A network interface. Either UUID or name may be supplied on input.

uuid

string

The unique identifier of the network interface.

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

portset

Name Type Description

_links

_links

igroups

array[igroups]

An array initiator groups to which the portset is bound.

interfaces

array[interfaces]

An array of network interfaces that are members of the portset. These are the only network interfaces through which the initiators of a bound igroup can access mapped LUNs.

Zero or more network interfaces can be supplied when the portset is created. After creation, network interfaces can be added or removed from the portset using the /protocols/san/portsets/{portset.uuid}/interfaces endpoint. See link:post-protocols-san-portsets-interfaces(#-san-portset-interface-create)anddelete-protocols-san-portsets-interfaces-.htmlPOST /protocols/san/portsets/{portset.uuid}/interfaces and [DELETE /protocols/san/portsets/{portset.uuid}/interfaces/{uuid}] for more details.

name

string

The name of the portset. Required in POST.

The name of a portset cannot be changed after creation.

protocol

string

The protocols supported by the portset. This restricts the type of network interfaces that can be added to the portset. Optional in POST; if not supplied, this defaults to mixed.

The protocol of a portset cannot be changed after creation.

svm

svm

uuid

string

The unique identifier for a portset.

Name Type Description

next

href

self

href

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.