Create a portset
POST /protocols/san/portsets
Introduced In: 9.9
Creates a portset.
Required properties
-
svm.uuid
orsvm.name
- Existing SVM in which to create the portset. -
name
- Name of the portset.
Recommended optional properties
-
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.
Related ONTAP commands
-
lun portset create
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
_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 |
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 |
||
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": "string",
"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 |
||
num_records |
integer |
The number of records in the response. |
records |
array[portset] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"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": "string",
"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 |
2621707 |
No SVM was specified. Either |
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 |
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 |
_links
Name | Type | Description |
---|---|---|
self |
igroups
Name | Type | Description |
---|---|---|
_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 |
||
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
Name | Type | Description |
---|---|---|
_links |
||
ip |
IP information |
|
name |
string |
The name of the interface. If only the name is provided, the SVM scope must be provided by the object this object is embedded in. |
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 |
||
fc |
An FC interface. |
|
ip |
||
uuid |
string |
The unique identifier of the network interface. |
svm
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
portset
Name | Type | Description |
---|---|---|
_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 |
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 |
||
uuid |
string |
The unique identifier for a portset. |
_links
Name | Type | Description |
---|---|---|
next |
||
self |
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. |