blob: 271c31db958b43a0364587b4cd8a4e7ee9619e0e [file] [log] [blame]
Andrea Campanella4f9085e2018-05-29 12:04:16 +02001#!/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
9node=${1:-$OCN}
10user=$ONOS_WEB_USER
11pass=$ONOS_WEB_PASS
12
13ssh $ONOS_USER@$node sudo rm -f ~/bmv2-mininet
14scp -qr $ONOS_ROOT/tools/dev/mininet/bmv2.py $ONOS_USER@[$node]:~/bmv2-mininet
15ssh $ONOS_USER@$node "
16 echo 'export ONOS_WEB_USER=`$user`' >> ~/.bashrc
17 echo 'export ONOS_WEB_PASS=`$pass`' >> ~/.bashrc
18 "