blob: aeb9ef624e7400204a9654da7ac7f64bdfd58142 [file] [log] [blame]
#!/bin/bash
remote=$ONOS_USER@$OCN
remote_scp=$ONOS_USER@[$OCN]
mininet="ssh -t -t $remote screen -L -S mininet"
CONTROLLERS="$OC1"
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'"
chmod +x /tmp/invoke_trellis_p4
scp /tmp/invoke_trellis_p4 $remote_scp:
ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc"
(
$mininet ./invoke_trellis_p4
scp $remote_scp:$log /tmp/mininet.log
ssh $remote rm -f $log
) &