Andrea Campanella | da35498 | 2017-11-16 19:17:08 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Resets the E-CORD Global Pod |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | password=`cat /opt/credentials/xosadmin@opencord.org` |
| 7 | ip=${1:-localhost} |
| 8 | cord_json=${2:-wrong-path} |
| 9 | |
| 10 | docker exec -i ecordglobal_xos_db_1 psql <<-EOF |
| 11 | |
| 12 | \connect xos |
| 13 | |
| 14 | DELETE FROM vnaas_eline; |
| 15 | |
Andrea Campanella | 3a187e9 | 2017-11-24 14:37:33 +0100 | [diff] [blame] | 16 | DELETE FROM vnaas_usernetworkinterface; |
| 17 | |
Andrea Campanella | da35498 | 2017-11-16 19:17:08 -0800 | [diff] [blame] | 18 | EOF |
| 19 | |
| 20 | echo Resetting onos_cord |
| 21 | cd /opt/onos_cord |
| 22 | |
| 23 | docker-compose down |
| 24 | |
| 25 | sleep 5 |
| 26 | |
| 27 | docker-compose up -d |
| 28 | |
| 29 | sleep 20 |
| 30 | |
| 31 | echo sending tosca file |
| 32 | python /opt/cord/build/platform-install/scripts/run_tosca.py 9000 xosadmin@opencord.org ${password} /opt/cord_profile/carrierethernet-global-app.yaml |
| 33 | |
| 34 | echo sending json config onos_cord |
| 35 | |
| 36 | curl -X POST -H "content-type:application/json" http://${ip}:8182/onos/v1/network/configuration -d @${cord_json} --user onos:rocks |