
********************************************************************************
* Copyright (C) 2019-2024 by Extreme Networks , Inc.                           *
* This file is part of rBreeze 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.                   *
*                                                                              *
* 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 -d -H "application/vnd.configuration.resource+json" "[DO NOT USE]{\"allow\": {\"non-profiled-macs\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/allow


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"port-profile\": {\"restrict-flooding\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"port-profile\": {\"activate\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"switchport\": \"true\"}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"mode\": {\"vlan-mode\": \"%appm-sw-mode-type%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/mode


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"name\": \"%interface:vlan-type%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/access/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"all\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk/allowed/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"none\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk/allowed/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"add\": \"%interface:ui32-vlan-range%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk/allowed/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"except\": \"%interface:ui32-vlan-range%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk/allowed/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"vlan\": {\"remove\": \"%interface:ui32-vlan-range%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk/allowed/vlan


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"trunk\": {\"native-vlan\": \"%uint32%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"trunk\": {\"ctag\": \"%interface:dot1q-vlan-type%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"trunk\": {\"native-vlan\": \"%uint32%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/vlan-profile/switchport/trunk


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"cee\": \"%common-def:name-string32%\"}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/cee


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"qos\": {\"cos\": \"%int32%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"trust\": {\"cos\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos/trust


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"qos\": {\"cos-mutation\": \"%common-def:name-string32%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"qos\": {\"cos-traffic-class\": \"%common-def:name-string32%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"flowcontrol\": {\"tx\": \"%enumeration%\", \"rx\": \"%enumeration%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos/flowcontrol


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"pfc\": {\"tx\": \"%enumeration%\", \"rx\": \"%enumeration%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/qos-profile/qos/flowcontrol/pfc/%cos%


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"access-group\": {\"access-group-name\": \"%mac-access-list:mac-acl-name%\", \"in\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/security-profile/mac/access-group


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"access-group\": {\"ipv4-access-group-name\": \"%ip-access-list:l3-acl-policy-name%\", \"in\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/security-profile/ip/access-group


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"access-group\": {\"ipv6-access-group-name\": \"%ip-access-list:l3-acl-policy-name%\", \"in\": \"true\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/port-profile/%name%/security-profile/ipv6/access-group


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"port-profile-port\": \"true\"}"  -u admin:password http://%ipaddress%:80/rest/config/running/interface/Ethernet/%name%/port-profile-port


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"domain\": {\"profile-domain-name\": \"%port-profile-domain-name-type%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/interface/Ethernet/%name%/port-profile-port/domain


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"port-profile-port\": \"true\"}"  -u admin:password http://%ipaddress%:80/rest/config/running/interface/Port-channel/%name%/port-profile-port


curl -v -X PATCH -d -H "application/vnd.configuration.resource+json" "{\"domain\": {\"profile-domain-name\": \"%port-profile-domain-name-type%\"}}"  -u admin:password http://%ipaddress%:80/rest/config/running/interface/Port-channel/%name%/port-profile-port/domain

