blob: aeb9ef624e7400204a9654da7ac7f64bdfd58142 [file] [log] [blame]
Andrea Campanella4f9085e2018-05-29 12:04:16 +02001#!/bin/bash
2
3remote=$ONOS_USER@$OCN
Ray Milkey51cf3072018-12-11 08:46:52 -08004remote_scp=$ONOS_USER@[$OCN]
Andrea Campanella4f9085e2018-05-29 12:04:16 +02005mininet="ssh -t -t $remote screen -L -S mininet"
6
7CONTROLLERS="$OC1"
8
Ray Milkey51cf3072018-12-11 08:46:52 -08009echo >/tmp/invoke_trellis_p4 "export ONOS_WEB_USER=$ONOS_WEB_USER && export ONOS_WEB_PASS=$ONOS_WEB_PASS && cd routing/trellis && sudo -E env PYTHONPATH=$PYTHONPATH:/home/sdn/bmv2-mininet ./trellisp4.py --onos-ip '$CONTROLLERS'"
Andrea Campanella4f9085e2018-05-29 12:04:16 +020010chmod +x /tmp/invoke_trellis_p4
Ray Milkey51cf3072018-12-11 08:46:52 -080011scp /tmp/invoke_trellis_p4 $remote_scp:
Andrea Campanella4f9085e2018-05-29 12:04:16 +020012
13ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc"
14 (
15 $mininet ./invoke_trellis_p4
Ray Milkey51cf3072018-12-11 08:46:52 -080016 scp $remote_scp:$log /tmp/mininet.log
Andrea Campanella4f9085e2018-05-29 12:04:16 +020017 ssh $remote rm -f $log
18 ) &
19
20
21
22
23