Add uninstall and test scripts for SEBA
[iec.git] / src / use_cases / seba_on_arm / install / test.sh
1 #!/bin/bash -ex
2 # shellcheck disable=SC2016
3
4 #Modified from https://github.com/cachengo/seba_charts/blob/master/scripts/mini_test.sh
5
6 TOSCA_POD=`kubectl get pods | grep xos-tosca | cut -d " " -f1`
7 TOSCA_IP=`kubectl describe pod $TOSCA_POD | grep Node: | cut -d "/" -f2`
8 BBSIM_IP=`kubectl get services -n voltha | grep bbsim | tr -s ' ' | cut -d " " -f3`
9
10
11 # Create the first model
12 curl \
13   -H "xos-username: admin@opencord.org" \
14   -H "xos-password: letmein" \
15   -X POST \
16   --data-binary @fabric.yaml \
17   http://$TOSCA_IP:30007/run
18
19 # Create the second model
20 sed "s/{{bbsim_ip}}/$BBSIM_IP/g" olt.yaml > olt.yaml.tmp
21 curl \
22   -H "xos-username: admin@opencord.org" \
23   -H "xos-password: letmein" \
24   -X POST \
25   --data-binary @olt.yaml.tmp \
26   http://$TOSCA_IP:30007/run
27 rm olt.yaml.tmp