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