initial commit
Change-Id: I5063800f2ddaf90a350325a9186479c25f90f8e1
diff --git a/roles/fabric-switch/files/connect b/roles/fabric-switch/files/connect
new file mode 100755
index 0000000..a114178
--- /dev/null
+++ b/roles/fabric-switch/files/connect
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+BG=0
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -bg|-background)
+ BG=1
+ esac
+ shift
+done
+
+if [ $BG -eq 1 ]; then
+ nohup brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller={{ controller_ip }} 2>&1 > connect.log &
+else
+ brcm-indigo-ofdpa-ofagent --dpid={{ switch_id }} --controller={{ controller_ip }}
+fi
diff --git a/roles/fabric-switch/files/killit b/roles/fabric-switch/files/killit
new file mode 100755
index 0000000..2ed34a1
--- /dev/null
+++ b/roles/fabric-switch/files/killit
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+killall -9 brcm-indigo-ofdpa-ofagent
diff --git a/roles/fabric-switch/files/purge b/roles/fabric-switch/files/purge
new file mode 100755
index 0000000..296a8cf
--- /dev/null
+++ b/roles/fabric-switch/files/purge
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+/usr/bin/ofdpa-i.12.1.1/examples/client_cfg_purge
diff --git a/roles/fabric-switch/files/reset b/roles/fabric-switch/files/reset
new file mode 100755
index 0000000..4f58bd5
--- /dev/null
+++ b/roles/fabric-switch/files/reset
@@ -0,0 +1,6 @@
+#!/bin/bash
+./killit
+./purge
+service ofdpa restart
+./purge
+