blob: 4ec52d66b15dd631ee0454ef47f06b2993bf7946 [file] [log] [blame]
Ray Milkey922db302018-04-02 08:54:51 -07001#!/bin/bash
2
3remote=$ONOS_USER@$OCN
DongRyeol Cha5c0a9f02018-05-17 14:32:55 +09004remote_scp=$ONOS_USER@[$OCN]
Ray Milkey922db302018-04-02 08:54:51 -07005mininet="ssh -t -t $remote screen -L -S mininet"
6
7CONTROLLERS="$OC1"
8if [ "$OC2" != "" ]; then
9 CONTROLLERS=${CONTROLLERS},${OC2}
10fi
11if [ "$OC3" != "" ]; then
12 CONTROLLERS=${CONTROLLERS},${OC3}
13fi
14
15echo >/tmp/invoke_trellis_hag "cd routing/trellis && sudo ./trellis_hag.py -c '$CONTROLLERS'"
16chmod +x /tmp/invoke_trellis_hag
DongRyeol Cha5c0a9f02018-05-17 14:32:55 +090017scp /tmp/invoke_trellis_hag $remote_scp:
Ray Milkey922db302018-04-02 08:54:51 -070018
19ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc"
20 (
21 $mininet ./invoke_trellis_hag
DongRyeol Cha5c0a9f02018-05-17 14:32:55 +090022 scp $remote_scp:$log /tmp/mininet.log
Ray Milkey922db302018-04-02 08:54:51 -070023 ssh $remote rm -f $log
24 ) &
25
26
27
28
29