Brian Freeman | 8076a87 | 2018-11-13 11:34:48 -0500 | [diff] [blame] | 1 | #! /usr/bin/env bash |
| 2 | ######################################################################################### |
| 3 | # Script to cleanpu vGMUX and other parts of the vCPE Use Case |
| 4 | # |
| 5 | # Edit the IP addresses and portas as appropriate |
| 6 | # |
| 7 | ####################################################################################### |
| 8 | |
| 9 | |
| 10 | VGMUX_IP=10.12.6.242 |
| 11 | #VBRG_IP=10.12.5.142 |
| 12 | #SDNC_IP=10.12.5.180 |
| 13 | |
| 14 | #curl -X DELETE -u admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U http://$SDNC_IP:8282/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources |
| 15 | #curl -X DELETE -u admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U http://$SDNC_IP:8282/restconf/config/GENERIC-RESOURCE-API:brg-allotted-resources |
| 16 | |
| 17 | ################################### |
| 18 | # vGMUX |
| 19 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.3.0.2/v3po:l2 |
| 20 | echo |
| 21 | |
| 22 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.22/v3po:l2 |
| 23 | echo |
| 24 | |
| 25 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.22 |
| 26 | echo |
| 27 | |
| 28 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.3.0.2 |
| 29 | echo |
| 30 | |
| 31 | |
| 32 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.106 |
| 33 | echo |
| 34 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.107 |
| 35 | |
| 36 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.111 |
| 37 | |
| 38 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X DELETE http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.5.0.110 |
| 39 | |
| 40 | # Check by listing interfaces |
| 41 | echo "********************* vGMUX status ************************" |
| 42 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X GET http://$VGMUX_IP:8183/restconf/config/ietf-interfaces:interfaces| python -m json.tool |
| 43 | |
| 44 | |
| 45 | exit; |
| 46 | |
| 47 | ######################################################################################### |
| 48 | # remove above exit if you want to interact with the other components |
| 49 | ######################################################################################### |
| 50 | |
| 51 | |
| 52 | |
| 53 | ################################### |
| 54 | # vBRG |
| 55 | curl -u admin:admin -X DELETE http://$VBRG_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.1.0.21 |
| 56 | |
| 57 | # check |
| 58 | echo "********************* vBRG status ************************" |
| 59 | curl -H 'Content-Type: application/json' -H 'Accept: application/json' -u admin:admin -X GET http://$VBRG_IP:8183/restconf/config/ietf-interfaces:interfaces| python -m json.tool |
| 60 | |
| 61 | |
| 62 | |