blob: 3b8dabc8dd39dd4d391356076fbc9b8db6e0bdff [file] [log] [blame]
Brian Freeman8076a872018-11-13 11:34:48 -05001#! /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
10VGMUX_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
19curl -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
20echo
21
22curl -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
23echo
24
25curl -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
26echo
27
28curl -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
29echo
30
31
32curl -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
33echo
34curl -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
36curl -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
38curl -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
41echo "********************* vGMUX status ************************"
42curl -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
45exit;
46
47#########################################################################################
48# remove above exit if you want to interact with the other components
49#########################################################################################
50
51
52
53###################################
54# vBRG
55curl -u admin:admin -X DELETE http://$VBRG_IP:8183/restconf/config/ietf-interfaces:interfaces/interface/vxlanTun10.1.0.21
56
57# check
58echo "********************* vBRG status ************************"
59curl -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