Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | remote=$ONOS_USER@$OCN |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 4 | remote_scp=$ONOS_USER@[$OCN] |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 5 | mininet="ssh -t -t $remote screen -L -S mininet" |
| 6 | |
| 7 | CONTROLLERS="$OC1" |
| 8 | |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 9 | echo >/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 Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 10 | chmod +x /tmp/invoke_trellis_p4 |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 11 | scp /tmp/invoke_trellis_p4 $remote_scp: |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 12 | |
| 13 | ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc" |
| 14 | ( |
| 15 | $mininet ./invoke_trellis_p4 |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 16 | scp $remote_scp:$log /tmp/mininet.log |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 17 | ssh $remote rm -f $log |
| 18 | ) & |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |