Add PONSim installation scripts
[iec.git] / src / use_cases / seba_on_arm / test / bbsim / test.sh
old mode 100644 (file)
new mode 100755 (executable)
similarity index 53%
rename from src/use_cases/seba_on_arm/install/test.sh
rename to src/use_cases/seba_on_arm/test/bbsim/test.sh
index 3577d3f..b64acdd
@@ -1,11 +1,9 @@
 #!/bin/bash -ex
 # shellcheck disable=SC2016
 
-#Modified from https://github.com/cachengo/seba_charts/blob/master/scripts/mini_test.sh
-
-TOSCA_POD=`kubectl get pods | grep xos-tosca | cut -d " " -f1`
-TOSCA_IP=`kubectl describe pod $TOSCA_POD | grep Node: | cut -d "/" -f2`
-BBSIM_IP=`kubectl get services -n voltha | grep bbsim | tr -s ' ' | cut -d " " -f3`
+TOSCA_POD=$(kubectl get pods | grep xos-tosca | cut -d " " -f1)
+TOSCA_IP=$(kubectl describe pod "$TOSCA_POD" | grep Node: | cut -d "/" -f2)
+BBSIM_IP=$(kubectl get services -n voltha | grep bbsim | tr -s ' ' | cut -d " " -f3)
 
 
 # Create the first model
@@ -14,7 +12,7 @@ curl \
   -H "xos-password: letmein" \
   -X POST \
   --data-binary @fabric.yaml \
-  http://$TOSCA_IP:30007/run
+  "http://$TOSCA_IP:30007/run"
 
 # Create the second model
 sed "s/{{bbsim_ip}}/$BBSIM_IP/g" olt.yaml > olt.yaml.tmp
@@ -23,5 +21,5 @@ curl \
   -H "xos-password: letmein" \
   -X POST \
   --data-binary @olt.yaml.tmp \
-  http://$TOSCA_IP:30007/run
+  "http://$TOSCA_IP:30007/run"
 rm olt.yaml.tmp