Jon Hall
Committed by Gerrit Code Review

Update ONOS_INSTANCES when updating OCI

Change-Id: I416901175ba8662a07afe58ff2eb835cd51be242
...@@ -99,6 +99,7 @@ alias sshnet='onos-ssh $OCN' ...@@ -99,6 +99,7 @@ alias sshnet='onos-ssh $OCN'
99 99
100 # Sets the primary instance to the specified instance number. 100 # Sets the primary instance to the specified instance number.
101 function setPrimaryInstance { 101 function setPrimaryInstance {
102 + export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
102 export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2) 103 export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2)
103 echo $OCI 104 echo $OCI
104 } 105 }
...@@ -129,7 +130,6 @@ function cell { ...@@ -129,7 +130,6 @@ function cell {
129 curl -sS -X POST "http://$CELL_WARDEN:4321/?$query" -d "$(cat ~/.ssh/id_rsa.pub)" > $aux 130 curl -sS -X POST "http://$CELL_WARDEN:4321/?$query" -d "$(cat ~/.ssh/id_rsa.pub)" > $aux
130 . $aux 131 . $aux
131 rm -f $aux 132 rm -f $aux
132 - export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
133 setPrimaryInstance 1 >/dev/null 133 setPrimaryInstance 1 >/dev/null
134 onos-verify-cell 134 onos-verify-cell
135 ;; 135 ;;
...@@ -159,7 +159,6 @@ function cell { ...@@ -159,7 +159,6 @@ function cell {
159 export ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks} 159 export ONOS_WEB_PASS=${ONOS_WEB_PASS:-rocks}
160 export ONOS_CELL=$1 160 export ONOS_CELL=$1
161 . $ONOS_ROOT/tools/test/cells/$1 161 . $ONOS_ROOT/tools/test/cells/$1
162 - export ONOS_INSTANCES=$(env | grep 'OC[0-9]*=' | sort | cut -d= -f2)
163 setPrimaryInstance 1 >/dev/null 162 setPrimaryInstance 1 >/dev/null
164 cell 163 cell
165 esac 164 esac
......