
********************************************************************************
* Copyright (C) 2019-2024 by Extreme Networks , Inc.                           *
* This file is part of rcBreeze Dump                                            *
*                                                                              *
* Author: Pradeep Raj.                                                         *
*                                                                              *
*                                                                              *
* Directions to Use:                                                           *
* 1. Replace all the values enclosed in the "%" with                           *
*    the values to be configured. The string present with in the braces        * 
*    indicates its type.                                                       *
* 2. To pass "" in the request replace the " with %22.                         *
* 3. To pass multiple keys in the URI enclose seperate them with %2c or        *
*    comma(",").                                                               *
* 4. Avoid using the requests with [DO NOT USE] tag in the payload. These could*
*    be defective because of the tailf extensions they have.                   *
*                                                                              *
* 5. RestConf also supports Json formatting which can be obtained by simply    *
*    updating Content-Type: application/yang-data+xml to                       *
*    Content-Type: application/yang-data+json                                  * 
*                                                                              * 

* Disclaimer:                                                                  *
* 1. The queries mentioned here do not have a one-to-one correlation with CLI. *
* 2. The queries inferred here are based on an automated tool and are not      *
*    gauranteed to work. Its the functional teams responsibilty to ensure its  *
*    working.                                                                  *
* 3. In case if you find any discrepancy you can always contact the author to  *
*    get it fixed.                                                             *
* 4. Avoid using the requests with [DO NOT USE] tag in the payload. These could*
*    be defective because of the tailf extensions they have.                   *
********************************************************************************
curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "<session><description>%string%</description></session>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "[DO NOT USE]<span-command><source>%enumeration%</source><src-ethernet>%enumeration%</src-ethernet><src-ethernet-val>%span-if-type%</src-ethernet-val><src-port-channel-val>%interface:portchannel-type%</src-port-channel-val><src-ve-val>%interface:ui32-vlan-range%</src-ve-val><src-vlan-val>%interface:ui32-vlan-range%</src-vlan-val><destination>%enumeration%</destination><dest-ethernet>%enumeration%</dest-ethernet><dest-ethernet-val>%span-if-type%</dest-ethernet-val><dest-vlan-val>%interface:vlan-type%</dest-vlan-val><dest-port-channel-val>%interface:portchannel-type%</dest-port-channel-val><direction>%enumeration%</direction></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "[DO NOT USE]<span-command><span-session-type>%enumeration%</span-session-type></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "[DO NOT USE]<span-command><dest-erspan-id>%uint32%</dest-erspan-id><source-ip>%inet:ipv4-address%</source-ip><destination-ip>%inet:ipv4-address%</destination-ip><vrf>%common-def:use-vrf%</vrf><erspan-direction>%enumeration%</erspan-direction></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "[DO NOT USE]<span-command><erspan-session-type>%enumeration%</erspan-session-type></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "<span-command><dest-rspan-port-type>%enumeration%</dest-rspan-port-type><dest-rspan-ethernet-val>%span-if-type%</dest-rspan-ethernet-val><dest-rspan-port-channel-val>%interface:portchannel-type%</dest-rspan-port-channel-val><rspan-direction>%enumeration%</rspan-direction></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

curl -v -X PATCH -H "Content-Type: application/yang-data+xml" -k -d "<span-command><rspan-session-type>%enumeration%</rspan-session-type></span-command>"  -u admin:password https://%ipaddress%:443/restconf/data/brocade-span:monitor/session=%session-number%/span-command

