blob: 8e8a8705d4d5a1f4512dcad1cccd7578b369e7d2 [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
Carmelo Cascone0bcbe262019-02-28 23:14:28 -08006set -e
7
Andrea Campanella4f9085e2018-05-29 12:04:16 +02008[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
9. $ONOS_ROOT/tools/build/envDefaults
10
11node=${1:-$OCN}
12user=$ONOS_WEB_USER
13pass=$ONOS_WEB_PASS
14
Carmelo Cascone0bcbe262019-02-28 23:14:28 -080015ssh -tt $ONOS_USER@$node "
16 mkdir -p /tmp/bmv2_py
17 sudo rm -rf /tmp/bmv2_py/*
18"
19scp -qr $ONOS_ROOT/tools/dev/mininet/bmv2.py $ONOS_USER@[$node]:/tmp/bmv2_py