Create Spanning-Tree APIs
Action |
Method |
Payload Required |
API |
---|---|---|---|
To create the spanning-tree elements |
PATCH |
Yes |
/api/running/switch/spanning-tree |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><bpdu>filtering</bpdu></spanning-tree>
Example for Create Spanning-Tree APIs Payload
<spanning-tree><forward-time>18</forward-time></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
forward-time |
Integer |
Specifies the spanning-tree forward time in seconds. (Range: 4–30) |
Yes |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><mode>rstp</mode></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
mode |
String |
Specifies the STP, RSTP or MSTP mode |
Yes |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><hello-time>6</hello-time></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
hello-time |
Integer |
Specifies the spanning-tree Hello time in seconds. (Range: 1–10) |
Yes |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><max-age>24</max-age></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
max-age |
Integer |
Specifies the spanning-tree bridge maximum age in seconds. (Range:6–40) |
Yes |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><loopback-guard></loopback-guard></spanning-tree>
Example for Create Spanning-Tree APIs Payload
<spanning-tree><method>short</method></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
method |
String |
Specifies the default port path costs |
Yes |
Example for Create Spanning-Tree APIs Payload
<spanning-tree><priority>8192</priority></spanning-tree>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
priority |
String |
Specifies the device priority for the specified spanning-tree instance. |
yes |
Example: PATCH Create Spanning-Tree bpdu APIs
curl -k -u admin:admin -d "<spanning-tree><bpdu>filtering</bpdu></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree forward-time APIs
curl -k -u admin:admin -d "<spanning-tree><forward-time>18</forward-time></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree mode APIs
curl -k -u admin:admin -d "<spanning-tree><mode>rstp</mode></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree hello-time APIs
curl -k -u admin:admin -d "<spanning-tree><hello-time>6</hello-time></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree max-age APIs
curl -k -u admin:admin -d "<spanning-tree><max-age>24</max-age></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree loopback-guard APIs
curl -k -u admin:admin -d "<spanning-tree><loopback-guard></loopback-guard></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree method APIs
curl -k -u admin:admin -d "<spanning-tree><method>short</method></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree/pathcost -H "Content-Type: application/vnd.yang.data+xml"
Example: PATCH Create Spanning-Tree priority APIs
curl -k -u admin:admin -d "<spanning-tree><priority>8192</priority></spanning-tree>" -X PATCH https://209.165.201.1/api/running/switch/spanning-tree -H "Content-Type: application/vnd.yang.data+xml"