Adding ability to get borrowed cell definition without changing the existing reservation.
Change-Id: Ib1fba430371f49f3c928998af98a6d347fabd93d
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index b43ac32..1c449a2 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -120,13 +120,17 @@
export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
setPrimaryInstance 1 >/dev/null
cell
+ onos-verify-cell
;;
"return")
curl -sS -X DELETE "http://$CELL_WARDEN:4321/?user=$(id -un)"
+ unset ONOS_CELL ONOS_NIC ONOS_IP ONOS_APPS ONOS_BOOT_FEATURES
+ unset OCI OCN OCT ONOS_INSTANCES ONOS_FEATURES
+ unset $(env | sed -n 's:\(^OC[0-9]\{1,\}\)=.*:\1 :g p')
;;
"status")
- curl -sS "http://$CELL_WARDEN:4321/"
+ curl -sS "http://$CELL_WARDEN:4321/" | sort
;;
"")
diff --git a/tools/test/bin/onos-cell b/tools/test/bin/onos-cell
new file mode 100755
index 0000000..45a68b9
--- /dev/null
+++ b/tools/test/bin/onos-cell
@@ -0,0 +1,9 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# List available ONOS cells configuration.
+# -----------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/dev/bash_profile
+
+cell "$@"
\ No newline at end of file