Create an Ethernet switch
Adds an Ethernet switch to your network configuration. This is used to manage and monitor switch settings, such as SNMP details and network roles, enhancing your network's operational scope.
HTTP method and endpoint
POST /network/ethernet/switches
Introduced in
ONTAP 9.11
Required properties
-
name- Name of the switch to create. -
address- Switch IP address. -
model- Switch model number. -
monitoring.enabled- Whether the switch should be monitored by CSHM. -
network-
cluster for cluster or shared switches.
-
storage for storage switches.
-
-
snmp.version- SNMP version. -
snmp.user- SNMP user.
Related ONTAP commands
-
system switch ethernet create
Learn more
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
| Name | Type | Description |
|---|---|---|
address |
string |
IP Address. |
discovered |
boolean |
Discovered By ONTAP CDP/LLDP
|
model |
string |
Model Number. |
monitoring |
||
name |
string |
Name. |
network |
string |
Switch Network. |
rcf_version |
string |
The switch reference configuration file (RCF) version. |
role |
string |
Switch role based on the interface configurations. Using '+' to combine multiple roles. Available role types are: cluster, multicluster, storage, multistorage, metrocluster. |
serial_number |
string |
Serial Number. |
snmp |
||
version |
string |
Software Version. |
Example request
{
"address": "string",
"model": "string",
"monitoring": {
"reason": "string"
},
"name": "string",
"network": "string",
"rcf_version": "RCF NX9336C-FX2 v1.13 1-CLUSTER",
"role": [
"cluster+storage"
],
"serial_number": "string",
"snmp": {
"user": "string",
"version": "string"
},
"version": "string"
}
Response
Status: 202, Accepted
| Name | Type | Description |
|---|---|---|
job |
Example response
{
"job": {
"uuid": "string"
}
}
Headers
| Name | Description | Type |
|---|---|---|
Location |
Useful for tracking the resource location |
string |
Response
Status: 201, Created
Error
Status: Default
ONTAP Error Response Codes
| Error Code | Description |
|---|---|
5636148 |
Failed to discover SNMPv3 engine ID of the remote switch. |
5636149 |
The " |
5636152 |
0.0.0.0 cannot be specified as the IP address for the " |
8912900 |
Invalid IP address. |
9044009 |
SNMPv3 client feature is not available until the effective cluster version is ONTAP 9.3 or later. |
12517377 |
Model number validation failed. Specify the correct model number and try the command again. |
12517378 |
The IP " |
12517380 |
SNMP validation request timed out. Verify that the " |
12517382 |
SNMPv3 validation request timed out. Verify that the " |
12517384 |
A switch with the same IP address is already being monitored. |
12517385 |
The " |
12517411 |
The input value for " |
Also see the table of common errors in the Response body overview section of this documentation.
Definitions
See Definitions
href
| Name | Type | Description |
|---|---|---|
href |
string |
self_link
monitoring
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
Enable Health Monitoring. |
monitored |
boolean |
Is Monitored. |
reason |
string |
Reason For Not Monitoring. |
snmp
| Name | Type | Description |
|---|---|---|
user |
string |
Community String or SNMPv3 Username. |
version |
string |
SNMP Version. |
switch
Ethernet Switch REST API
| Name | Type | Description |
|---|---|---|
address |
string |
IP Address. |
discovered |
boolean |
Discovered By ONTAP CDP/LLDP
|
model |
string |
Model Number. |
monitoring |
||
name |
string |
Name. |
network |
string |
Switch Network. |
rcf_version |
string |
The switch reference configuration file (RCF) version. |
role |
string |
Switch role based on the interface configurations. Using '+' to combine multiple roles. Available role types are: cluster, multicluster, storage, multistorage, metrocluster. |
serial_number |
string |
Serial Number. |
snmp |
||
version |
string |
Software Version. |
_links
job_link
| Name | Type | Description |
|---|---|---|
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
| Name | Type | Description |
|---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_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. |