Added support for bits proxy, where ONOS bits can survive borrow/return cycles.

Change-Id: I0ab9bac26bd88a246925750d26baaab228a37136
diff --git a/tools/test/bin/onos-push-bits-through-proxy b/tools/test/bin/onos-push-bits-through-proxy
index 1ec7107..e060a47 100755
--- a/tools/test/bin/onos-push-bits-through-proxy
+++ b/tools/test/bin/onos-push-bits-through-proxy
@@ -14,7 +14,7 @@
 echo "Pushing to proxy $node..."
 onos-push-bits $node
 
-others=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2 | grep -v $OCT)
+others=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2 | grep -vE "^$OCT\$")
 
 for other in $others; do
     echo "Pushing to $other..."
diff --git a/tools/test/bin/onos-verify-cell b/tools/test/bin/onos-verify-cell
index ec34cab..dad9063 100755
--- a/tools/test/bin/onos-verify-cell
+++ b/tools/test/bin/onos-verify-cell
@@ -6,6 +6,6 @@
 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
 . $ONOS_ROOT/tools/build/envDefaults
 
-for node in $OCN $(env | sort | egrep "OC[0-9]+" | cut -d= -f2); do
+for node in $OCT $OCN $(env | sort | egrep "OC[0-9]+" | cut -d= -f2); do
     printf "%s: " $node; ssh -n -o StrictHostKeyChecking=no -o PasswordAuthentication=no $ONOS_USER@$node hostname
 done
diff --git a/tools/test/scenarios/prerequisites.xml b/tools/test/scenarios/prerequisites.xml
index 4b963dd..ad6545d 100644
--- a/tools/test/scenarios/prerequisites.xml
+++ b/tools/test/scenarios/prerequisites.xml
@@ -24,5 +24,7 @@
             <step name="Check-Passwordless-Login-${#}"
                   exec="ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no ${ONOS_USER}@${OC#} date"/>
         </parallel>
+        <step name="Check-Passwordless-Login-Proxy" if="${OCT}"
+              exec="ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no ${ONOS_USER}@${OCT} date"/>
     </group>
 </scenario>
diff --git a/utils/warden/bin/cell-def b/utils/warden/bin/cell-def
index c7c7116..43656ee 100755
--- a/utils/warden/bin/cell-def
+++ b/utils/warden/bin/cell-def
@@ -11,6 +11,6 @@
     sed "s/^$name-/OC/" | tr "[:lower:]" "[:upper:]" | \
     sed -r 's/[ ]+/\=/;s/^/export /'
 
-echo "export OCT=\"\$OC1\""
+echo "export OCT=\"10.128.11.1\""
 echo "export ONOS_USE_SSH=true"
 echo "export ONOS_APPS=${apps}"
diff --git a/utils/warden/bin/clone-node b/utils/warden/bin/clone-node
index 484f0c7..14d0678 100755
--- a/utils/warden/bin/clone-node
+++ b/utils/warden/bin/clone-node
@@ -26,4 +26,3 @@
 sudo lxc-attach -n $name -- ping -c1 8.8.8.8
 sudo lxc-attach -n $name -- bash -c "echo $key >> /home/sdn/.ssh/authorized_keys"
 sudo lxc-attach -n $name -- bash -c "sed -i \"s/127.0.1.1.*/127.0.1.1   $name/\" /etc/hosts"
-sudo lxc-ls --fancy
diff --git a/utils/warden/bin/create-cell b/utils/warden/bin/create-cell
index 59ccb96..8cbb1e1 100755
--- a/utils/warden/bin/create-cell
+++ b/utils/warden/bin/create-cell
@@ -8,6 +8,8 @@
 
 cd $(dirname $0)
 
+sudo lxc-attach -n bit-proxy -- bash -c "grep -qF \"$key\" /home/sdn/.ssh/authorized_keys || echo $key >> /home/sdn/.ssh/authorized_keys"
+
 ./clone-node base-mininet ${ipx/x/0} $name-n "$key"
 
 for n in {1..3}; do