Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Remotely pushes bmv2 custom mininet script to a remote mininet test machine. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
| 9 | node=${1:-$OCN} |
| 10 | user=$ONOS_WEB_USER |
| 11 | pass=$ONOS_WEB_PASS |
| 12 | |
| 13 | ssh $ONOS_USER@$node sudo rm -f ~/bmv2-mininet |
| 14 | scp -qr $ONOS_ROOT/tools/dev/mininet/bmv2.py $ONOS_USER@[$node]:~/bmv2-mininet |
| 15 | ssh $ONOS_USER@$node " |
| 16 | echo 'export ONOS_WEB_USER=`$user`' >> ~/.bashrc |
| 17 | echo 'export ONOS_WEB_PASS=`$pass`' >> ~/.bashrc |
| 18 | " |