Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | remote=$ONOS_USER@$OCN |
DongRyeol Cha | 5c0a9f0 | 2018-05-17 14:32:55 +0900 | [diff] [blame^] | 4 | remote_scp=$ONOS_USER@[$OCN] |
Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 5 | mininet="ssh -t -t $remote screen -L -S mininet" |
| 6 | |
| 7 | CONTROLLERS="$OC1" |
| 8 | if [ "$OC2" != "" ]; then |
| 9 | CONTROLLERS=${CONTROLLERS},${OC2} |
| 10 | fi |
| 11 | if [ "$OC3" != "" ]; then |
| 12 | CONTROLLERS=${CONTROLLERS},${OC3} |
| 13 | fi |
| 14 | |
| 15 | echo >/tmp/invoke_trellis_hag "cd routing/trellis && sudo ./trellis_hag.py -c '$CONTROLLERS'" |
| 16 | chmod +x /tmp/invoke_trellis_hag |
DongRyeol Cha | 5c0a9f0 | 2018-05-17 14:32:55 +0900 | [diff] [blame^] | 17 | scp /tmp/invoke_trellis_hag $remote_scp: |
Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 18 | |
| 19 | ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc" |
| 20 | ( |
| 21 | $mininet ./invoke_trellis_hag |
DongRyeol Cha | 5c0a9f0 | 2018-05-17 14:32:55 +0900 | [diff] [blame^] | 22 | scp $remote_scp:$log /tmp/mininet.log |
Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 23 | ssh $remote rm -f $log |
| 24 | ) & |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |