Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | remote=$ONOS_USER@$OCN |
| 4 | mininet="ssh -t -t $remote screen -L -S mininet" |
| 5 | |
| 6 | CONTROLLERS="$OC1" |
| 7 | |
| 8 | echo >/tmp/invoke_trellis_p4 "cd routing/trellis && sudo -E env PYTHONPATH=$PYTHONPATH:~/bmv2-mininet ./trellisp4.py --onos-ip '$CONTROLLERS'" |
| 9 | chmod +x /tmp/invoke_trellis_p4 |
| 10 | scp /tmp/invoke_trellis_p4 [$remote]: |
| 11 | |
| 12 | ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc" |
| 13 | ( |
| 14 | $mininet ./invoke_trellis_p4 |
| 15 | scp [$remote]:$log /tmp/mininet.log |
| 16 | ssh $remote rm -f $log |
| 17 | ) & |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |