VOL-3213 - (2) allow settings for onos and bbsim

- any values for onos and bbsim in *-values.yaml
- fix monitor.sh (bug)
- add bbsim index to ced script

Change-Id: I3b53ec546276fb57902d5fd475ce7fb44943e399
diff --git a/scripts/ced b/scripts/ced
index 1d85473..e1e1527 100755
--- a/scripts/ced
+++ b/scripts/ced
@@ -1,4 +1,12 @@
 #!/usr/bin/env bash
+REQ=$(test $# -gt 0 && echo $1 || echo 0)
+IDX=$((REQ + 1))
 set -x
-BBSIM=$(kubectl get --all-namespaces -l app=bbsim svc -o json | jq -r '.items[] | .metadata.name + "." + .metadata.namespace + ".svc:50060"' | head -1)
+BBSIM=$(kubectl get --all-namespaces -l app=bbsim svc -o json | jq -r '.items[] | .metadata.name + "." + .metadata.namespace + ".svc:50060"' | sed "$IDX!d")
+set +x
+if [[ -z "$BBSIM" ]]; then
+    >&2 echo "ERROR: No BBSIM instance found as index '$REQ'"
+    exit 1
+fi
+set -x
 exec voltctl device enable "$(voltctl device create -t openolt -H "$BBSIM")"