Integration tests for GBP and GBP-SFC
[integration/test.git] / csit / suites / groupbasedpolicy / common_scripts / resetcontroller.sh
diff --git a/csit/suites/groupbasedpolicy/common_scripts/resetcontroller.sh b/csit/suites/groupbasedpolicy/common_scripts/resetcontroller.sh
new file mode 100644 (file)
index 0000000..ac72564
--- /dev/null
@@ -0,0 +1,11 @@
+hostnum=${HOSTNAME#"gbpsfc"}
+sw="sw$hostnum"
+echo "Deleting controller for $sw"
+ovs-vsctl del-controller $sw;
+if [[ $? -ne 0 ]] ; then
+    exit 1
+fi
+echo "Sleeping for 6sec..."
+sleep 6
+echo "Setting controller to $ODL"
+ovs-vsctl set-controller $sw tcp:$ODL:6653