Configures, modifies, or retrieves the switching characteristics of the Layer 2 interface
| URI | Description |
|---|---|
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport | Sets the switching characteristics of the Layer 2 interface. Supported interface types: Ethernet, Port-Channel. |
| GET URIs | Description |
|---|---|
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport | Sets the switching characteristics of the Layer 2 interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/mode | Sets mode of the Layer 2 interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/mode/vlan-mode | Sets mode of the Layer 2 interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/access | Sets the interface as access. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/access/vlan | Set the default VLAN for the interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk | Sets the Layer 2 interface as trunk. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed | Set the VLANs that will Xmit/Rx through Layer2. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | Allow Dot1Q VLANs to Xmit/Rx through Layer2. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/all | Allow all Dot1Q VLANs to Xmit/Rx through Layer2. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/add | Allow the specified VLANs to Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/except | Allow all VLANs except the specified VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/remove | Remove a VLAN range that Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/tag | Enable tagging. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/tag/native-vlan | Set the native VLAN characteristics. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/native-vlan | Set the native VLAN characteristics. Supported interface types: Ethernet, Port-Channel. |
| PUT URIs | Payload | Description |
|---|---|---|
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport | <switchport>true</switchport> | Make an interface a switchport. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/mode/vlan-mode | <vlan-mode>trunk</vlan-mode> | Make interface mode to trunk. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/access/vlan | <vlan>101</vlan> | Set the default VLAN for the interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/all | <all>{enumeration}</all> | Make interface part of all VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/none | <none>{enumeration}</none> | Remove interface membership from all VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/add | <add>(unit32)</add> | Allow the specified VLANs to Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/except | <except>(unit32)</except> | Allow all VLANs except the specified VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan/remove | <remove>(unit32)</remove> | Remove a VLAN range that Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/tag | <tag /> | Enable tagging. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/tag/native-vlan | <native-vlan>{enumeration}</native-vlan> | Set the native VLAN characteristics. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/native-vlan | <native-vlan>(unit32)</native-vlan> | Set the native VLAN characteristics. Supported interface types: Ethernet, Port-Channel. |
| PATCH URIs | Payload | Description |
|---|---|---|
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport | <switchport>true</switchport> | Make an interface a switchport. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/mode | <mode><vlan-mode>trunk</vlan-mode></mode> | Make interface mode to trunk. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/access | <access><vlan>101</vlan></access> | Set the default VLAN for the interface. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | <vlan><all>true</all></vlan> | Make interface part of all VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | <vlan><none>true</none></vlan> | Remove interface membership from all VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | <vlan><add>601-700</add></vlan> | Allow the specified VLANs to Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | <vlan><except>651-700</except></vlan> | Allow all VLANs except the specified VLAN. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/allowed/vlan | <vlan><remove>601-650</remove></vlan> | Remove a VLAN range that Xmit/Rx. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/tag | <tag><native-vlan>true</native-vlan></tag> | Enable tagging. Supported interface types: Ethernet, Port-Channel. |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk | <trunk><native-vlan>601</native-vlan></trunk> | Set the native VLAN characteristics. Supported interface types: Ethernet, Port-Channel. |
| DELETE URIs |
|---|
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/mode/vlan-mode |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/access/vlan |
| <base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/trunk/native-vlan |
GET, POST, PUT, PATCH, DELETE, OPTIONS, and HEAD operations are supported.
The following example uses the GET option to retrieve the configuration details.
http://host:80/rest/config/running/interface/Port-channel/{101}/switchport
None
<switchport xmlns="urn:brocade.com:mgmt:brocade-interface" xmlns:y="http://brocade.com/ns/rest"
y:self="/rest/config/running/interface/Port-channel/101/switchport">true</switchport>
<switchport xmlns="urn:brocade.com:mgmt:brocade-interface" xmlns:y="http://brocade.com/ns/rest"
y:self="/rest/config/running/interface/Port-channel/101/switchport">
<mode y:self="/rest/config/running/interface/Port-channel/101/switchport/mode">
<vlan-mode>access</vlan-mode>
</mode>
<access y:self="/rest/config/running/interface/Port-channel/101/switchport/access">
<vlan>1</vlan>
</access>
<trunk y:self="/rest/config/running/interface/Port-channel/101/switchport/trunk">
<allowed y:self="/rest/config/running/interface/Port-channel/101/switchport/trunk/allowed">
<vlan y:self="/rest/config/running/interface/Port-channel/101/switchport/trunk/allowed/vlan">
</vlan>
</allowed>
</trunk>
</switchport>
The following is an example of the POST operation to configure the switchport.
http://host:80/rest/config/running/interface/Port-channel/{101}/switchport
<switchport>true</switchport>
None
The following is an example of the DELETE operation to remove the switchport configuration.
http://host:80/rest/config/running/interface/Port-channel/{101}/switchport
None
None