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 | |
Carmelo Cascone | 0bcbe26 | 2019-02-28 23:14:28 -0800 | [diff] [blame] | 6 | set -e |
| 7 | |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 8 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 9 | . $ONOS_ROOT/tools/build/envDefaults |
| 10 | |
| 11 | node=${1:-$OCN} |
| 12 | user=$ONOS_WEB_USER |
| 13 | pass=$ONOS_WEB_PASS |
| 14 | |
Carmelo Cascone | 0bcbe26 | 2019-02-28 23:14:28 -0800 | [diff] [blame] | 15 | ssh -tt $ONOS_USER@$node " |
| 16 | mkdir -p /tmp/bmv2_py |
| 17 | sudo rm -rf /tmp/bmv2_py/* |
| 18 | " |
| 19 | scp -qr $ONOS_ROOT/tools/dev/mininet/bmv2.py $ONOS_USER@[$node]:/tmp/bmv2_py |