Fixes to allow running p4 trellis scenario
Change-Id: I4882668168521b9119692ecd696189b2b8d5f9de
(cherry picked from commit a61ba5792d9e7a25d3446f37179fbf13ac152098)
diff --git a/tools/test/scenarios/bin/mininet-p4-trellis b/tools/test/scenarios/bin/mininet-p4-trellis
index 889fb77..aeb9ef6 100755
--- a/tools/test/scenarios/bin/mininet-p4-trellis
+++ b/tools/test/scenarios/bin/mininet-p4-trellis
@@ -1,18 +1,19 @@
#!/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 "cd routing/trellis && sudo -E env PYTHONPATH=$PYTHONPATH:~/bmv2-mininet ./trellisp4.py --onos-ip '$CONTROLLERS'"
+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 /tmp/invoke_trellis_p4 $remote_scp:
ssh $remote "rm -f $log; echo logfile flush 1 > ~/.screenrc"
(
$mininet ./invoke_trellis_p4
- scp [$remote]:$log /tmp/mininet.log
+ scp $remote_scp:$log /tmp/mininet.log
ssh $remote rm -f $log
) &