Merge branch 'clearhw'
diff --git a/cassandra.titan b/cassandra.titan
index 6c6670f..c36ecc0 100644
--- a/cassandra.titan
+++ b/cassandra.titan
@@ -3,3 +3,5 @@
 storage.keyspace=onos
 storage.connection-pool-size=4096
 storage.replication-factor=3
+storage.write-consistency-level=ALL
+storage.read-consistency-level=ONE
diff --git a/cassandra.titan.nothrift b/cassandra.titan.nothrift
new file mode 100644
index 0000000..04f9fd7
--- /dev/null
+++ b/cassandra.titan.nothrift
@@ -0,0 +1,7 @@
+storage.backend=cassandra
+storage.hostname=localhost
+storage.keyspace=onos
+storage.connection-pool-size=4096
+storage.replication-factor=3
+storage.write-consistency-level=ALL
+storage.read-consistency-level=ONE
diff --git a/cluster-mgmt/bin/demo-reset-hw.sh b/cluster-mgmt/bin/demo-reset-hw.sh
new file mode 100755
index 0000000..c5101a1
--- /dev/null
+++ b/cluster-mgmt/bin/demo-reset-hw.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+DIR=${HOME}/ONOS
+$DIR/scripts/all-linkup-hw.sh
+$DIR/web/delete_flow.py 201 300
+$DIR/web/clean_flow.py 201 300
+$DIR/web/add_flow.py -m onos -f $DIR/web/flowdef_demo_start.txt
+onos stop 5
+onos stop 7
+for i in 1 2 3 4 6 8; do
+  status=`onos status $i | grep instance | awk '{print $2}'`
+  echo "onos $i status $status"
+  if [ x$status == "x0" ]; then
+    onos start $i
+  fi
+done
+sleep 2
+switch local
diff --git a/cluster-mgmt/bin/demo-scale-out-hw.sh b/cluster-mgmt/bin/demo-scale-out-hw.sh
new file mode 100755
index 0000000..eb06c56
--- /dev/null
+++ b/cluster-mgmt/bin/demo-scale-out-hw.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+onos start 5
+onos start 7
+sleep 2
+cd ONOS/web; ./add_flow.py -m onos -f flowdef_demo_add.txt
+sleep 3
+switch all
diff --git a/scripts/runiperf.sh b/scripts/runiperf.sh
index 3df4fb0..7066bc6 100755
--- a/scripts/runiperf.sh
+++ b/scripts/runiperf.sh
@@ -4,14 +4,15 @@
 
 # Usage: flowid src_dpid dst_dpid params
 def usage():
-  print "%s flowid src_dpid dst_dpid svr|client <proto>/<duration>/<interval>/<samples>" % sys.argv[0]
+  print "%s flowid src_dpid dst_dpid hw:svr|sw:svr|hw:client|sw:client <proto>/<duration>/<interval>/<samples>" % sys.argv[0]
   sys.exit()
 
 def main():
   flowid = sys.argv[1]
   src_dpid = sys.argv[2]
   dst_dpid = sys.argv[3]
-  server = sys.argv[4].upper()[0]
+  (testbed,server) = sys.argv[4].upper().split(':')
+  server = server[0]
   params = sys.argv[5].split('/')
   proto = params[0]
   duration = params[1]
@@ -24,23 +25,27 @@
   dst_hostid=int(dst_dpid.split(':')[-1], 16)
 
   if (proto == "tcp"):
-#    cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperf_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
-    cmd="${HOME}/ONOS/test-network/mininet/mrun host%d \'/home/ubuntu/ONOS/scripts/iperf -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperf_%s.out -c 192.168.%d.%d 2>&1 &\' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
-    killcmd='sudo pkill -KILL -f \"iperf .* -o .*/iperf_%s.out\"' % (flowid)
-    print killcmd
-    print cmd
-    os.popen(killcmd)
-    os.popen(cmd)
+    if (testbed == "SW"):
+      cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperf_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
+      killcmd='sudo pkill -KILL -f \"iperf .* -o .*/iperf_%s.out\"' % (flowid)
+      print killcmd
+      print cmd
+      os.popen(killcmd)
+      os.popen(cmd)
   else:
     if (server == 'S'):
-#      cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -us -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfsvr_%s.out 2>&1 &' &" % (dst_hostid, interval, samples, flowid)
-      cmd="${HOME}/ONOS/test-network/mininet/mrun host%d \'/home/ubuntu/ONOS/scripts/iperf -us -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfsvr_%s.out 2>&1 &\' &" % (dst_hostid, interval, samples, flowid)
+      if (testbed == "SW"): 
+        cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -us -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfsvr_%s.out 2>&1 &' &" % (dst_hostid, interval, samples, flowid)
+      else:
+        cmd="~/mininet/util/m g%sh%02d '/home/ubuntu/ONOS/scripts/iperf -us -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfsvr_%s.out 2>&1 &' &" % (dst_nwid, dst_hostid, interval, samples, flowid)
       killcmd='sudo pkill -KILL -f \"iperf .* -o .*/iperfsvr_%s.out\"' % (flowid)
       print killcmd
       print cmd
     else:
-      cmd="${HOME}/ONOS/test-network/mininet/mrun host%d \'/home/ubuntu/ONOS/scripts/iperf -l 1000 -u -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfclient_%s.out -c 192.168.%d.%d 2>&1 &\' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
-#      cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -l 1000 -u -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfclient_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
+      if (testbed == "SW"): 
+        cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -u -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfclient_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid)
+      else:
+        cmd="~/mininet/util/m g%sh%02d '/home/ubuntu/ONOS/scripts/iperf -u -t%s -i%s -k%s -yJ -o /home/ubuntu/ONOS/web/log/iperfclient_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_nwid, src_hostid, duration, interval, samples, flowid, dst_nwid, dst_hostid + 1)
       killcmd='sudo pkill -KILL -f \"iperf .* -o .*/iperfclient_%s.out\"' % (flowid)
       print killcmd
       print cmd
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
index 4de2cbc..c562556 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
@@ -7,15 +7,12 @@
 import java.util.Comparator;
 import java.util.EnumSet;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
-import java.util.TreeMap;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
 
 import net.floodlightcontroller.core.IFloodlightProviderService;
@@ -59,7 +56,6 @@
 import org.openflow.protocol.OFType;
 import org.openflow.protocol.action.OFAction;
 import org.openflow.protocol.action.OFActionOutput;
-import org.openflow.util.HexString;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,8 +65,8 @@
     public GraphDBConnection conn;
 
     protected IRestApiService restApi;
-    protected IFloodlightProviderService floodlightProvider;
-    protected ITopoRouteService topoRouteService;
+    protected volatile IFloodlightProviderService floodlightProvider;
+    protected volatile ITopoRouteService topoRouteService;
     protected FloodlightModuleContext context;
 
     protected OFMessageDamper messageDamper;
@@ -99,14 +95,21 @@
     private static Logger log = LoggerFactory.getLogger(FlowManager.class);
 
     // The periodic task(s)
-    private final ScheduledExecutorService mapReaderScheduler =
-	Executors.newScheduledThreadPool(1);
-
-    private final ScheduledExecutorService shortestPathReconcileScheduler =
-	Executors.newScheduledThreadPool(1);
+    private ScheduledExecutorService mapReaderScheduler;
+    private ScheduledExecutorService shortestPathReconcileScheduler;
 
     final Runnable mapReader = new Runnable() {
 	    public void run() {
+		try {
+		    runImpl();
+		} catch (Exception e) {
+		    log.debug("Exception processing All Flow Entries from the Network MAP: ", e);
+		    conn.endTx(Transaction.ROLLBACK);
+		    return;
+		}
+	    }
+
+	    private void runImpl() {
 		long startTime = System.nanoTime();
 		int counterAllFlowEntries = 0;
 		int counterMyNotUpdatedFlowEntries = 0;
@@ -243,6 +246,16 @@
 
     final Runnable shortestPathReconcile = new Runnable() {
 	    public void run() {
+		try {
+		    runImpl();
+		} catch (Exception e) {
+		    log.debug("Exception processing All Flows from the Network MAP: ", e);
+		    conn.endTx(Transaction.ROLLBACK);
+		    return;
+		}
+	    }
+
+	    private void runImpl() {
 		long startTime = System.nanoTime();
 		int counterAllFlowPaths = 0;
 		int counterMyFlowPaths = 0;
@@ -386,15 +399,15 @@
 	    }
 	};
 
-    final ScheduledFuture<?> mapReaderHandle =
-	mapReaderScheduler.scheduleAtFixedRate(mapReader, 3, 3, TimeUnit.SECONDS);
+    //final ScheduledFuture<?> mapReaderHandle =
+	//mapReaderScheduler.scheduleAtFixedRate(mapReader, 3, 3, TimeUnit.SECONDS);
 
-    final ScheduledFuture<?> shortestPathReconcileHandle =
-	shortestPathReconcileScheduler.scheduleAtFixedRate(shortestPathReconcile, 3, 3, TimeUnit.SECONDS);
+    //final ScheduledFuture<?> shortestPathReconcileHandle =
+	//shortestPathReconcileScheduler.scheduleAtFixedRate(shortestPathReconcile, 3, 3, TimeUnit.SECONDS);
 
     @Override
     public void init(String conf) {
-	conn = GraphDBConnection.getInstance(conf);
+    	conn = GraphDBConnection.getInstance(conf);
     }
 
     public void finalize() {
@@ -449,6 +462,9 @@
 	// TODO: An ugly hack!
 	String conf = "/tmp/cassandra.titan";
 	this.init(conf);
+	
+		mapReaderScheduler = Executors.newScheduledThreadPool(1);
+		shortestPathReconcileScheduler = Executors.newScheduledThreadPool(1);
     }
 
     private long getNextFlowEntryId() {
@@ -471,10 +487,15 @@
 
     @Override
     public void startUp(FloodlightModuleContext context) {
-	restApi.addRestletRoutable(new FlowWebRoutable());
-
-	// Initialize the Flow Entry ID generator
-	nextFlowEntryIdPrefix = randomGenerator.nextInt();
+		restApi.addRestletRoutable(new FlowWebRoutable());
+	
+		// Initialize the Flow Entry ID generator
+		nextFlowEntryIdPrefix = randomGenerator.nextInt();
+		
+		mapReaderScheduler.scheduleAtFixedRate(
+				mapReader, 3, 3, TimeUnit.SECONDS);
+		shortestPathReconcileScheduler.scheduleAtFixedRate(
+				shortestPathReconcile, 3, 3, TimeUnit.SECONDS);
     }
 
     /**
diff --git a/web/flowdef_demo_add.txt b/web/flowdef_demo_add.txt
new file mode 100644
index 0000000..7ef2fbb
--- /dev/null
+++ b/web/flowdef_demo_add.txt
@@ -0,0 +1,61 @@
+# Demo flow scale down
+201 ps_101_1 00:00:00:00:00:00:05:01 1 00:00:00:00:00:00:02:01 1 matchSrcMac 00:00:c0:a8:05:01 matchDstMac 00:00:c0:a8:02:01
+202 ps_101_2 00:00:00:00:00:00:02:01 1 00:00:00:00:00:00:05:01 1 matchSrcMac 00:00:c0:a8:02:01 matchDstMac 00:00:c0:a8:05:01
+203 ps_102_1 00:00:00:00:00:00:05:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:05:02 matchDstMac 00:00:c0:a8:02:02
+204 ps_102_2 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:05:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:05:02
+205 ps_103_1 00:00:00:00:00:00:05:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:05:03 matchDstMac 00:00:c0:a8:02:03
+206 ps_103_2 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:05:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:05:03
+207 ps_104_1 00:00:00:00:00:00:05:01 1 00:00:00:00:00:00:03:01 1 matchSrcMac 00:00:c0:a8:05:01 matchDstMac 00:00:c0:a8:03:01
+208 ps_104_2 00:00:00:00:00:00:03:01 1 00:00:00:00:00:00:05:01 1 matchSrcMac 00:00:c0:a8:03:01 matchDstMac 00:00:c0:a8:05:01
+209 ps_105_1 00:00:00:00:00:00:05:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:05:02 matchDstMac 00:00:c0:a8:03:02
+210 ps_105_2 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:05:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:05:02
+211 ps_106_1 00:00:00:00:00:00:05:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:05:03 matchDstMac 00:00:c0:a8:03:03
+212 ps_106_2 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:05:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:05:03
+213 ps_107_1 00:00:00:00:00:00:05:01 1 00:00:00:00:00:00:04:01 1 matchSrcMac 00:00:c0:a8:05:01 matchDstMac 00:00:c0:a8:04:01
+214 ps_107_2 00:00:00:00:00:00:04:01 1 00:00:00:00:00:00:05:01 1 matchSrcMac 00:00:c0:a8:04:01 matchDstMac 00:00:c0:a8:05:01
+215 ps_108_1 00:00:00:00:00:00:05:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:05:02 matchDstMac 00:00:c0:a8:04:02
+216 ps_108_2 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:05:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:05:02
+217 ps_109_1 00:00:00:00:00:00:05:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:05:03 matchDstMac 00:00:c0:a8:04:03
+218 ps_109_2 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:05:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:05:03
+219 ps_110_1 00:00:00:00:00:00:05:01 1 00:00:00:00:00:00:06:01 1 matchSrcMac 00:00:c0:a8:05:01 matchDstMac 00:00:c0:a8:06:01
+220 ps_110_2 00:00:00:00:00:00:06:01 1 00:00:00:00:00:00:05:01 1 matchSrcMac 00:00:c0:a8:06:01 matchDstMac 00:00:c0:a8:05:01
+221 ps_111_1 00:00:00:00:00:00:05:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:05:02 matchDstMac 00:00:c0:a8:06:02
+222 ps_111_2 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:05:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:05:02
+223 ps_112_1 00:00:00:00:00:00:05:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:05:03 matchDstMac 00:00:c0:a8:06:03
+224 ps_112_2 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:05:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:05:03
+225 ps_113_1 00:00:00:00:00:00:05:01 1 00:00:00:00:00:00:08:01 1 matchSrcMac 00:00:c0:a8:05:01 matchDstMac 00:00:c0:a8:08:01
+226 ps_113_2 00:00:00:00:00:00:08:01 1 00:00:00:00:00:00:05:01 1 matchSrcMac 00:00:c0:a8:08:01 matchDstMac 00:00:c0:a8:05:01
+227 ps_114_1 00:00:00:00:00:00:05:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:05:02 matchDstMac 00:00:c0:a8:08:02
+228 ps_114_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:05:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:05:02
+229 ps_115_1 00:00:00:00:00:00:05:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:05:03 matchDstMac 00:00:c0:a8:08:03
+230 ps_115_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:05:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:05:03
+231 ps_116_1 00:00:00:00:00:00:07:01 1 00:00:00:00:00:00:02:01 1 matchSrcMac 00:00:c0:a8:07:01 matchDstMac 00:00:c0:a8:02:01
+232 ps_116_2 00:00:00:00:00:00:02:01 1 00:00:00:00:00:00:07:01 1 matchSrcMac 00:00:c0:a8:02:01 matchDstMac 00:00:c0:a8:07:01
+233 ps_117_1 00:00:00:00:00:00:07:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:07:02 matchDstMac 00:00:c0:a8:02:02
+234 ps_117_2 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:07:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:07:02
+235 ps_118_1 00:00:00:00:00:00:07:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:07:03 matchDstMac 00:00:c0:a8:02:03
+236 ps_118_2 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:07:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:07:03
+237 ps_119_1 00:00:00:00:00:00:07:01 1 00:00:00:00:00:00:03:01 1 matchSrcMac 00:00:c0:a8:07:01 matchDstMac 00:00:c0:a8:03:01
+238 ps_119_2 00:00:00:00:00:00:03:01 1 00:00:00:00:00:00:07:01 1 matchSrcMac 00:00:c0:a8:03:01 matchDstMac 00:00:c0:a8:07:01
+239 ps_120_1 00:00:00:00:00:00:07:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:07:02 matchDstMac 00:00:c0:a8:03:02
+240 ps_120_2 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:07:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:07:02
+241 ps_121_1 00:00:00:00:00:00:07:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:07:03 matchDstMac 00:00:c0:a8:03:03
+242 ps_121_2 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:07:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:07:03
+243 ps_122_1 00:00:00:00:00:00:07:01 1 00:00:00:00:00:00:04:01 1 matchSrcMac 00:00:c0:a8:07:01 matchDstMac 00:00:c0:a8:04:01
+244 ps_122_2 00:00:00:00:00:00:04:01 1 00:00:00:00:00:00:07:01 1 matchSrcMac 00:00:c0:a8:04:01 matchDstMac 00:00:c0:a8:07:01
+245 ps_123_1 00:00:00:00:00:00:07:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:07:02 matchDstMac 00:00:c0:a8:04:02
+246 ps_123_2 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:07:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:07:02
+247 ps_124_1 00:00:00:00:00:00:07:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:07:03 matchDstMac 00:00:c0:a8:04:03
+248 ps_124_2 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:07:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:07:03
+249 ps_125_1 00:00:00:00:00:00:07:01 1 00:00:00:00:00:00:06:01 1 matchSrcMac 00:00:c0:a8:07:01 matchDstMac 00:00:c0:a8:06:01
+250 ps_125_2 00:00:00:00:00:00:06:01 1 00:00:00:00:00:00:07:01 1 matchSrcMac 00:00:c0:a8:06:01 matchDstMac 00:00:c0:a8:07:01
+251 ps_126_1 00:00:00:00:00:00:07:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:07:02 matchDstMac 00:00:c0:a8:06:02
+252 ps_126_2 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:07:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:07:02
+253 ps_127_1 00:00:00:00:00:00:07:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:07:03 matchDstMac 00:00:c0:a8:06:03
+254 ps_127_2 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:07:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:07:03
+255 ps_128_1 00:00:00:00:00:00:07:01 1 00:00:00:00:00:00:08:01 1 matchSrcMac 00:00:c0:a8:07:01 matchDstMac 00:00:c0:a8:08:01
+256 ps_128_2 00:00:00:00:00:00:08:01 1 00:00:00:00:00:00:07:01 1 matchSrcMac 00:00:c0:a8:08:01 matchDstMac 00:00:c0:a8:07:01
+257 ps_129_1 00:00:00:00:00:00:07:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:07:02 matchDstMac 00:00:c0:a8:08:02
+258 ps_129_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:07:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:07:02
+259 ps_130_1 00:00:00:00:00:00:07:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:07:03 matchDstMac 00:00:c0:a8:08:03
+260 ps_130_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:07:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:07:03
diff --git a/web/flowdef_demo_start.txt b/web/flowdef_demo_start.txt
new file mode 100644
index 0000000..fe0e3b5
--- /dev/null
+++ b/web/flowdef_demo_start.txt
@@ -0,0 +1,201 @@
+# Demo flow scale down
+1 ps_1_1 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:03:02
+2 ps_1_2 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:02:02
+3 ps_2_1 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:03:03
+4 ps_2_2 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:02:03
+5 ps_3_1 00:00:00:00:00:00:02:04 1 00:00:00:00:00:00:03:04 1 matchSrcMac 00:00:c0:a8:02:04 matchDstMac 00:00:c0:a8:03:04
+6 ps_3_2 00:00:00:00:00:00:03:04 1 00:00:00:00:00:00:02:04 1 matchSrcMac 00:00:c0:a8:03:04 matchDstMac 00:00:c0:a8:02:04
+7 ps_4_1 00:00:00:00:00:00:02:05 1 00:00:00:00:00:00:03:05 1 matchSrcMac 00:00:c0:a8:02:05 matchDstMac 00:00:c0:a8:03:05
+8 ps_4_2 00:00:00:00:00:00:03:05 1 00:00:00:00:00:00:02:05 1 matchSrcMac 00:00:c0:a8:03:05 matchDstMac 00:00:c0:a8:02:05
+9 ps_5_1 00:00:00:00:00:00:02:06 1 00:00:00:00:00:00:03:06 1 matchSrcMac 00:00:c0:a8:02:06 matchDstMac 00:00:c0:a8:03:06
+10 ps_5_2 00:00:00:00:00:00:03:06 1 00:00:00:00:00:00:02:06 1 matchSrcMac 00:00:c0:a8:03:06 matchDstMac 00:00:c0:a8:02:06
+11 ps_6_1 00:00:00:00:00:00:02:07 1 00:00:00:00:00:00:03:07 1 matchSrcMac 00:00:c0:a8:02:07 matchDstMac 00:00:c0:a8:03:07
+12 ps_6_2 00:00:00:00:00:00:03:07 1 00:00:00:00:00:00:02:07 1 matchSrcMac 00:00:c0:a8:03:07 matchDstMac 00:00:c0:a8:02:07
+13 ps_7_1 00:00:00:00:00:00:02:08 1 00:00:00:00:00:00:03:08 1 matchSrcMac 00:00:c0:a8:02:08 matchDstMac 00:00:c0:a8:03:08
+14 ps_7_2 00:00:00:00:00:00:03:08 1 00:00:00:00:00:00:02:08 1 matchSrcMac 00:00:c0:a8:03:08 matchDstMac 00:00:c0:a8:02:08
+15 ps_8_1 00:00:00:00:00:00:02:09 1 00:00:00:00:00:00:03:09 1 matchSrcMac 00:00:c0:a8:02:09 matchDstMac 00:00:c0:a8:03:09
+16 ps_8_2 00:00:00:00:00:00:03:09 1 00:00:00:00:00:00:02:09 1 matchSrcMac 00:00:c0:a8:03:09 matchDstMac 00:00:c0:a8:02:09
+17 ps_9_1 00:00:00:00:00:00:02:0a 1 00:00:00:00:00:00:03:0a 1 matchSrcMac 00:00:c0:a8:02:0a matchDstMac 00:00:c0:a8:03:0a
+18 ps_9_2 00:00:00:00:00:00:03:0a 1 00:00:00:00:00:00:02:0a 1 matchSrcMac 00:00:c0:a8:03:0a matchDstMac 00:00:c0:a8:02:0a
+19 ps_10_1 00:00:00:00:00:00:02:0b 1 00:00:00:00:00:00:03:0b 1 matchSrcMac 00:00:c0:a8:02:0b matchDstMac 00:00:c0:a8:03:0b
+20 ps_10_2 00:00:00:00:00:00:03:0b 1 00:00:00:00:00:00:02:0b 1 matchSrcMac 00:00:c0:a8:03:0b matchDstMac 00:00:c0:a8:02:0b
+21 ps_11_1 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:04:02
+22 ps_11_2 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:02:02
+23 ps_12_1 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:04:03
+24 ps_12_2 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:02:03
+25 ps_13_1 00:00:00:00:00:00:02:04 1 00:00:00:00:00:00:04:04 1 matchSrcMac 00:00:c0:a8:02:04 matchDstMac 00:00:c0:a8:04:04
+26 ps_13_2 00:00:00:00:00:00:04:04 1 00:00:00:00:00:00:02:04 1 matchSrcMac 00:00:c0:a8:04:04 matchDstMac 00:00:c0:a8:02:04
+27 ps_14_1 00:00:00:00:00:00:02:05 1 00:00:00:00:00:00:04:05 1 matchSrcMac 00:00:c0:a8:02:05 matchDstMac 00:00:c0:a8:04:05
+28 ps_14_2 00:00:00:00:00:00:04:05 1 00:00:00:00:00:00:02:05 1 matchSrcMac 00:00:c0:a8:04:05 matchDstMac 00:00:c0:a8:02:05
+29 ps_15_1 00:00:00:00:00:00:02:06 1 00:00:00:00:00:00:04:06 1 matchSrcMac 00:00:c0:a8:02:06 matchDstMac 00:00:c0:a8:04:06
+30 ps_15_2 00:00:00:00:00:00:04:06 1 00:00:00:00:00:00:02:06 1 matchSrcMac 00:00:c0:a8:04:06 matchDstMac 00:00:c0:a8:02:06
+31 ps_16_1 00:00:00:00:00:00:02:07 1 00:00:00:00:00:00:04:07 1 matchSrcMac 00:00:c0:a8:02:07 matchDstMac 00:00:c0:a8:04:07
+32 ps_16_2 00:00:00:00:00:00:04:07 1 00:00:00:00:00:00:02:07 1 matchSrcMac 00:00:c0:a8:04:07 matchDstMac 00:00:c0:a8:02:07
+33 ps_17_1 00:00:00:00:00:00:02:08 1 00:00:00:00:00:00:04:08 1 matchSrcMac 00:00:c0:a8:02:08 matchDstMac 00:00:c0:a8:04:08
+34 ps_17_2 00:00:00:00:00:00:04:08 1 00:00:00:00:00:00:02:08 1 matchSrcMac 00:00:c0:a8:04:08 matchDstMac 00:00:c0:a8:02:08
+35 ps_18_1 00:00:00:00:00:00:02:09 1 00:00:00:00:00:00:04:09 1 matchSrcMac 00:00:c0:a8:02:09 matchDstMac 00:00:c0:a8:04:09
+36 ps_18_2 00:00:00:00:00:00:04:09 1 00:00:00:00:00:00:02:09 1 matchSrcMac 00:00:c0:a8:04:09 matchDstMac 00:00:c0:a8:02:09
+37 ps_19_1 00:00:00:00:00:00:02:0a 1 00:00:00:00:00:00:04:0a 1 matchSrcMac 00:00:c0:a8:02:0a matchDstMac 00:00:c0:a8:04:0a
+38 ps_19_2 00:00:00:00:00:00:04:0a 1 00:00:00:00:00:00:02:0a 1 matchSrcMac 00:00:c0:a8:04:0a matchDstMac 00:00:c0:a8:02:0a
+39 ps_20_1 00:00:00:00:00:00:02:0b 1 00:00:00:00:00:00:04:0b 1 matchSrcMac 00:00:c0:a8:02:0b matchDstMac 00:00:c0:a8:04:0b
+40 ps_20_2 00:00:00:00:00:00:04:0b 1 00:00:00:00:00:00:02:0b 1 matchSrcMac 00:00:c0:a8:04:0b matchDstMac 00:00:c0:a8:02:0b
+41 ps_21_1 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:06:02
+42 ps_21_2 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:02:02
+43 ps_22_1 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:06:03
+44 ps_22_2 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:02:03
+45 ps_23_1 00:00:00:00:00:00:02:04 1 00:00:00:00:00:00:06:04 1 matchSrcMac 00:00:c0:a8:02:04 matchDstMac 00:00:c0:a8:06:04
+46 ps_23_2 00:00:00:00:00:00:06:04 1 00:00:00:00:00:00:02:04 1 matchSrcMac 00:00:c0:a8:06:04 matchDstMac 00:00:c0:a8:02:04
+47 ps_24_1 00:00:00:00:00:00:02:05 1 00:00:00:00:00:00:06:05 1 matchSrcMac 00:00:c0:a8:02:05 matchDstMac 00:00:c0:a8:06:05
+48 ps_24_2 00:00:00:00:00:00:06:05 1 00:00:00:00:00:00:02:05 1 matchSrcMac 00:00:c0:a8:06:05 matchDstMac 00:00:c0:a8:02:05
+49 ps_25_1 00:00:00:00:00:00:02:06 1 00:00:00:00:00:00:06:06 1 matchSrcMac 00:00:c0:a8:02:06 matchDstMac 00:00:c0:a8:06:06
+50 ps_25_2 00:00:00:00:00:00:06:06 1 00:00:00:00:00:00:02:06 1 matchSrcMac 00:00:c0:a8:06:06 matchDstMac 00:00:c0:a8:02:06
+51 ps_26_1 00:00:00:00:00:00:02:07 1 00:00:00:00:00:00:06:07 1 matchSrcMac 00:00:c0:a8:02:07 matchDstMac 00:00:c0:a8:06:07
+52 ps_26_2 00:00:00:00:00:00:06:07 1 00:00:00:00:00:00:02:07 1 matchSrcMac 00:00:c0:a8:06:07 matchDstMac 00:00:c0:a8:02:07
+53 ps_27_1 00:00:00:00:00:00:02:08 1 00:00:00:00:00:00:06:08 1 matchSrcMac 00:00:c0:a8:02:08 matchDstMac 00:00:c0:a8:06:08
+54 ps_27_2 00:00:00:00:00:00:06:08 1 00:00:00:00:00:00:02:08 1 matchSrcMac 00:00:c0:a8:06:08 matchDstMac 00:00:c0:a8:02:08
+55 ps_28_1 00:00:00:00:00:00:02:09 1 00:00:00:00:00:00:06:09 1 matchSrcMac 00:00:c0:a8:02:09 matchDstMac 00:00:c0:a8:06:09
+56 ps_28_2 00:00:00:00:00:00:06:09 1 00:00:00:00:00:00:02:09 1 matchSrcMac 00:00:c0:a8:06:09 matchDstMac 00:00:c0:a8:02:09
+57 ps_29_1 00:00:00:00:00:00:02:0a 1 00:00:00:00:00:00:06:0a 1 matchSrcMac 00:00:c0:a8:02:0a matchDstMac 00:00:c0:a8:06:0a
+58 ps_29_2 00:00:00:00:00:00:06:0a 1 00:00:00:00:00:00:02:0a 1 matchSrcMac 00:00:c0:a8:06:0a matchDstMac 00:00:c0:a8:02:0a
+59 ps_30_1 00:00:00:00:00:00:02:0b 1 00:00:00:00:00:00:06:0b 1 matchSrcMac 00:00:c0:a8:02:0b matchDstMac 00:00:c0:a8:06:0b
+60 ps_30_2 00:00:00:00:00:00:06:0b 1 00:00:00:00:00:00:02:0b 1 matchSrcMac 00:00:c0:a8:06:0b matchDstMac 00:00:c0:a8:02:0b
+61 ps_31_1 00:00:00:00:00:00:02:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:02:02 matchDstMac 00:00:c0:a8:08:02
+62 ps_31_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:02:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:02:02
+63 ps_32_1 00:00:00:00:00:00:02:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:02:03 matchDstMac 00:00:c0:a8:08:03
+64 ps_32_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:02:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:02:03
+65 ps_33_1 00:00:00:00:00:00:02:04 1 00:00:00:00:00:00:08:04 1 matchSrcMac 00:00:c0:a8:02:04 matchDstMac 00:00:c0:a8:08:04
+66 ps_33_2 00:00:00:00:00:00:08:04 1 00:00:00:00:00:00:02:04 1 matchSrcMac 00:00:c0:a8:08:04 matchDstMac 00:00:c0:a8:02:04
+67 ps_34_1 00:00:00:00:00:00:02:05 1 00:00:00:00:00:00:08:05 1 matchSrcMac 00:00:c0:a8:02:05 matchDstMac 00:00:c0:a8:08:05
+68 ps_34_2 00:00:00:00:00:00:08:05 1 00:00:00:00:00:00:02:05 1 matchSrcMac 00:00:c0:a8:08:05 matchDstMac 00:00:c0:a8:02:05
+69 ps_35_1 00:00:00:00:00:00:02:06 1 00:00:00:00:00:00:08:06 1 matchSrcMac 00:00:c0:a8:02:06 matchDstMac 00:00:c0:a8:08:06
+70 ps_35_2 00:00:00:00:00:00:08:06 1 00:00:00:00:00:00:02:06 1 matchSrcMac 00:00:c0:a8:08:06 matchDstMac 00:00:c0:a8:02:06
+71 ps_36_1 00:00:00:00:00:00:02:07 1 00:00:00:00:00:00:08:07 1 matchSrcMac 00:00:c0:a8:02:07 matchDstMac 00:00:c0:a8:08:07
+72 ps_36_2 00:00:00:00:00:00:08:07 1 00:00:00:00:00:00:02:07 1 matchSrcMac 00:00:c0:a8:08:07 matchDstMac 00:00:c0:a8:02:07
+73 ps_37_1 00:00:00:00:00:00:02:08 1 00:00:00:00:00:00:08:08 1 matchSrcMac 00:00:c0:a8:02:08 matchDstMac 00:00:c0:a8:08:08
+74 ps_37_2 00:00:00:00:00:00:08:08 1 00:00:00:00:00:00:02:08 1 matchSrcMac 00:00:c0:a8:08:08 matchDstMac 00:00:c0:a8:02:08
+75 ps_38_1 00:00:00:00:00:00:02:09 1 00:00:00:00:00:00:08:09 1 matchSrcMac 00:00:c0:a8:02:09 matchDstMac 00:00:c0:a8:08:09
+76 ps_38_2 00:00:00:00:00:00:08:09 1 00:00:00:00:00:00:02:09 1 matchSrcMac 00:00:c0:a8:08:09 matchDstMac 00:00:c0:a8:02:09
+77 ps_39_1 00:00:00:00:00:00:02:0a 1 00:00:00:00:00:00:08:0a 1 matchSrcMac 00:00:c0:a8:02:0a matchDstMac 00:00:c0:a8:08:0a
+78 ps_39_2 00:00:00:00:00:00:08:0a 1 00:00:00:00:00:00:02:0a 1 matchSrcMac 00:00:c0:a8:08:0a matchDstMac 00:00:c0:a8:02:0a
+79 ps_40_1 00:00:00:00:00:00:02:0b 1 00:00:00:00:00:00:08:0b 1 matchSrcMac 00:00:c0:a8:02:0b matchDstMac 00:00:c0:a8:08:0b
+80 ps_40_2 00:00:00:00:00:00:08:0b 1 00:00:00:00:00:00:02:0b 1 matchSrcMac 00:00:c0:a8:08:0b matchDstMac 00:00:c0:a8:02:0b
+81 ps_41_1 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:04:02
+82 ps_41_2 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:03:02
+83 ps_42_1 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:04:03
+84 ps_42_2 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:03:03
+85 ps_43_1 00:00:00:00:00:00:03:04 1 00:00:00:00:00:00:04:04 1 matchSrcMac 00:00:c0:a8:03:04 matchDstMac 00:00:c0:a8:04:04
+86 ps_43_2 00:00:00:00:00:00:04:04 1 00:00:00:00:00:00:03:04 1 matchSrcMac 00:00:c0:a8:04:04 matchDstMac 00:00:c0:a8:03:04
+87 ps_44_1 00:00:00:00:00:00:03:05 1 00:00:00:00:00:00:04:05 1 matchSrcMac 00:00:c0:a8:03:05 matchDstMac 00:00:c0:a8:04:05
+88 ps_44_2 00:00:00:00:00:00:04:05 1 00:00:00:00:00:00:03:05 1 matchSrcMac 00:00:c0:a8:04:05 matchDstMac 00:00:c0:a8:03:05
+89 ps_45_1 00:00:00:00:00:00:03:06 1 00:00:00:00:00:00:04:06 1 matchSrcMac 00:00:c0:a8:03:06 matchDstMac 00:00:c0:a8:04:06
+90 ps_45_2 00:00:00:00:00:00:04:06 1 00:00:00:00:00:00:03:06 1 matchSrcMac 00:00:c0:a8:04:06 matchDstMac 00:00:c0:a8:03:06
+91 ps_46_1 00:00:00:00:00:00:03:07 1 00:00:00:00:00:00:04:07 1 matchSrcMac 00:00:c0:a8:03:07 matchDstMac 00:00:c0:a8:04:07
+92 ps_46_2 00:00:00:00:00:00:04:07 1 00:00:00:00:00:00:03:07 1 matchSrcMac 00:00:c0:a8:04:07 matchDstMac 00:00:c0:a8:03:07
+93 ps_47_1 00:00:00:00:00:00:03:08 1 00:00:00:00:00:00:04:08 1 matchSrcMac 00:00:c0:a8:03:08 matchDstMac 00:00:c0:a8:04:08
+94 ps_47_2 00:00:00:00:00:00:04:08 1 00:00:00:00:00:00:03:08 1 matchSrcMac 00:00:c0:a8:04:08 matchDstMac 00:00:c0:a8:03:08
+95 ps_48_1 00:00:00:00:00:00:03:09 1 00:00:00:00:00:00:04:09 1 matchSrcMac 00:00:c0:a8:03:09 matchDstMac 00:00:c0:a8:04:09
+96 ps_48_2 00:00:00:00:00:00:04:09 1 00:00:00:00:00:00:03:09 1 matchSrcMac 00:00:c0:a8:04:09 matchDstMac 00:00:c0:a8:03:09
+97 ps_49_1 00:00:00:00:00:00:03:0a 1 00:00:00:00:00:00:04:0a 1 matchSrcMac 00:00:c0:a8:03:0a matchDstMac 00:00:c0:a8:04:0a
+98 ps_49_2 00:00:00:00:00:00:04:0a 1 00:00:00:00:00:00:03:0a 1 matchSrcMac 00:00:c0:a8:04:0a matchDstMac 00:00:c0:a8:03:0a
+99 ps_50_1 00:00:00:00:00:00:03:0b 1 00:00:00:00:00:00:04:0b 1 matchSrcMac 00:00:c0:a8:03:0b matchDstMac 00:00:c0:a8:04:0b
+100 ps_50_2 00:00:00:00:00:00:04:0b 1 00:00:00:00:00:00:03:0b 1 matchSrcMac 00:00:c0:a8:04:0b matchDstMac 00:00:c0:a8:03:0b
+101 ps_51_1 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:06:02
+102 ps_51_2 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:03:02
+103 ps_52_1 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:06:03
+104 ps_52_2 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:03:03
+105 ps_53_1 00:00:00:00:00:00:03:04 1 00:00:00:00:00:00:06:04 1 matchSrcMac 00:00:c0:a8:03:04 matchDstMac 00:00:c0:a8:06:04
+106 ps_53_2 00:00:00:00:00:00:06:04 1 00:00:00:00:00:00:03:04 1 matchSrcMac 00:00:c0:a8:06:04 matchDstMac 00:00:c0:a8:03:04
+107 ps_54_1 00:00:00:00:00:00:03:05 1 00:00:00:00:00:00:06:05 1 matchSrcMac 00:00:c0:a8:03:05 matchDstMac 00:00:c0:a8:06:05
+108 ps_54_2 00:00:00:00:00:00:06:05 1 00:00:00:00:00:00:03:05 1 matchSrcMac 00:00:c0:a8:06:05 matchDstMac 00:00:c0:a8:03:05
+109 ps_55_1 00:00:00:00:00:00:03:06 1 00:00:00:00:00:00:06:06 1 matchSrcMac 00:00:c0:a8:03:06 matchDstMac 00:00:c0:a8:06:06
+110 ps_55_2 00:00:00:00:00:00:06:06 1 00:00:00:00:00:00:03:06 1 matchSrcMac 00:00:c0:a8:06:06 matchDstMac 00:00:c0:a8:03:06
+111 ps_56_1 00:00:00:00:00:00:03:07 1 00:00:00:00:00:00:06:07 1 matchSrcMac 00:00:c0:a8:03:07 matchDstMac 00:00:c0:a8:06:07
+112 ps_56_2 00:00:00:00:00:00:06:07 1 00:00:00:00:00:00:03:07 1 matchSrcMac 00:00:c0:a8:06:07 matchDstMac 00:00:c0:a8:03:07
+113 ps_57_1 00:00:00:00:00:00:03:08 1 00:00:00:00:00:00:06:08 1 matchSrcMac 00:00:c0:a8:03:08 matchDstMac 00:00:c0:a8:06:08
+114 ps_57_2 00:00:00:00:00:00:06:08 1 00:00:00:00:00:00:03:08 1 matchSrcMac 00:00:c0:a8:06:08 matchDstMac 00:00:c0:a8:03:08
+115 ps_58_1 00:00:00:00:00:00:03:09 1 00:00:00:00:00:00:06:09 1 matchSrcMac 00:00:c0:a8:03:09 matchDstMac 00:00:c0:a8:06:09
+116 ps_58_2 00:00:00:00:00:00:06:09 1 00:00:00:00:00:00:03:09 1 matchSrcMac 00:00:c0:a8:06:09 matchDstMac 00:00:c0:a8:03:09
+117 ps_59_1 00:00:00:00:00:00:03:0a 1 00:00:00:00:00:00:06:0a 1 matchSrcMac 00:00:c0:a8:03:0a matchDstMac 00:00:c0:a8:06:0a
+118 ps_59_2 00:00:00:00:00:00:06:0a 1 00:00:00:00:00:00:03:0a 1 matchSrcMac 00:00:c0:a8:06:0a matchDstMac 00:00:c0:a8:03:0a
+119 ps_60_1 00:00:00:00:00:00:03:0b 1 00:00:00:00:00:00:06:0b 1 matchSrcMac 00:00:c0:a8:03:0b matchDstMac 00:00:c0:a8:06:0b
+120 ps_60_2 00:00:00:00:00:00:06:0b 1 00:00:00:00:00:00:03:0b 1 matchSrcMac 00:00:c0:a8:06:0b matchDstMac 00:00:c0:a8:03:0b
+121 ps_61_1 00:00:00:00:00:00:03:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:03:02 matchDstMac 00:00:c0:a8:08:02
+122 ps_61_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:03:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:03:02
+123 ps_62_1 00:00:00:00:00:00:03:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:03:03 matchDstMac 00:00:c0:a8:08:03
+124 ps_62_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:03:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:03:03
+125 ps_63_1 00:00:00:00:00:00:03:04 1 00:00:00:00:00:00:08:04 1 matchSrcMac 00:00:c0:a8:03:04 matchDstMac 00:00:c0:a8:08:04
+126 ps_63_2 00:00:00:00:00:00:08:04 1 00:00:00:00:00:00:03:04 1 matchSrcMac 00:00:c0:a8:08:04 matchDstMac 00:00:c0:a8:03:04
+127 ps_64_1 00:00:00:00:00:00:03:05 1 00:00:00:00:00:00:08:05 1 matchSrcMac 00:00:c0:a8:03:05 matchDstMac 00:00:c0:a8:08:05
+128 ps_64_2 00:00:00:00:00:00:08:05 1 00:00:00:00:00:00:03:05 1 matchSrcMac 00:00:c0:a8:08:05 matchDstMac 00:00:c0:a8:03:05
+129 ps_65_1 00:00:00:00:00:00:03:06 1 00:00:00:00:00:00:08:06 1 matchSrcMac 00:00:c0:a8:03:06 matchDstMac 00:00:c0:a8:08:06
+130 ps_65_2 00:00:00:00:00:00:08:06 1 00:00:00:00:00:00:03:06 1 matchSrcMac 00:00:c0:a8:08:06 matchDstMac 00:00:c0:a8:03:06
+131 ps_66_1 00:00:00:00:00:00:03:07 1 00:00:00:00:00:00:08:07 1 matchSrcMac 00:00:c0:a8:03:07 matchDstMac 00:00:c0:a8:08:07
+132 ps_66_2 00:00:00:00:00:00:08:07 1 00:00:00:00:00:00:03:07 1 matchSrcMac 00:00:c0:a8:08:07 matchDstMac 00:00:c0:a8:03:07
+133 ps_67_1 00:00:00:00:00:00:03:08 1 00:00:00:00:00:00:08:08 1 matchSrcMac 00:00:c0:a8:03:08 matchDstMac 00:00:c0:a8:08:08
+134 ps_67_2 00:00:00:00:00:00:08:08 1 00:00:00:00:00:00:03:08 1 matchSrcMac 00:00:c0:a8:08:08 matchDstMac 00:00:c0:a8:03:08
+135 ps_68_1 00:00:00:00:00:00:03:09 1 00:00:00:00:00:00:08:09 1 matchSrcMac 00:00:c0:a8:03:09 matchDstMac 00:00:c0:a8:08:09
+136 ps_68_2 00:00:00:00:00:00:08:09 1 00:00:00:00:00:00:03:09 1 matchSrcMac 00:00:c0:a8:08:09 matchDstMac 00:00:c0:a8:03:09
+137 ps_69_1 00:00:00:00:00:00:03:0a 1 00:00:00:00:00:00:08:0a 1 matchSrcMac 00:00:c0:a8:03:0a matchDstMac 00:00:c0:a8:08:0a
+138 ps_69_2 00:00:00:00:00:00:08:0a 1 00:00:00:00:00:00:03:0a 1 matchSrcMac 00:00:c0:a8:08:0a matchDstMac 00:00:c0:a8:03:0a
+139 ps_70_1 00:00:00:00:00:00:03:0b 1 00:00:00:00:00:00:08:0b 1 matchSrcMac 00:00:c0:a8:03:0b matchDstMac 00:00:c0:a8:08:0b
+140 ps_70_2 00:00:00:00:00:00:08:0b 1 00:00:00:00:00:00:03:0b 1 matchSrcMac 00:00:c0:a8:08:0b matchDstMac 00:00:c0:a8:03:0b
+141 ps_71_1 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:06:02
+142 ps_71_2 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:04:02
+143 ps_72_1 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:06:03
+144 ps_72_2 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:04:03
+145 ps_73_1 00:00:00:00:00:00:04:04 1 00:00:00:00:00:00:06:04 1 matchSrcMac 00:00:c0:a8:04:04 matchDstMac 00:00:c0:a8:06:04
+146 ps_73_2 00:00:00:00:00:00:06:04 1 00:00:00:00:00:00:04:04 1 matchSrcMac 00:00:c0:a8:06:04 matchDstMac 00:00:c0:a8:04:04
+147 ps_74_1 00:00:00:00:00:00:04:05 1 00:00:00:00:00:00:06:05 1 matchSrcMac 00:00:c0:a8:04:05 matchDstMac 00:00:c0:a8:06:05
+148 ps_74_2 00:00:00:00:00:00:06:05 1 00:00:00:00:00:00:04:05 1 matchSrcMac 00:00:c0:a8:06:05 matchDstMac 00:00:c0:a8:04:05
+149 ps_75_1 00:00:00:00:00:00:04:06 1 00:00:00:00:00:00:06:06 1 matchSrcMac 00:00:c0:a8:04:06 matchDstMac 00:00:c0:a8:06:06
+150 ps_75_2 00:00:00:00:00:00:06:06 1 00:00:00:00:00:00:04:06 1 matchSrcMac 00:00:c0:a8:06:06 matchDstMac 00:00:c0:a8:04:06
+151 ps_76_1 00:00:00:00:00:00:04:07 1 00:00:00:00:00:00:06:07 1 matchSrcMac 00:00:c0:a8:04:07 matchDstMac 00:00:c0:a8:06:07
+152 ps_76_2 00:00:00:00:00:00:06:07 1 00:00:00:00:00:00:04:07 1 matchSrcMac 00:00:c0:a8:06:07 matchDstMac 00:00:c0:a8:04:07
+153 ps_77_1 00:00:00:00:00:00:04:08 1 00:00:00:00:00:00:06:08 1 matchSrcMac 00:00:c0:a8:04:08 matchDstMac 00:00:c0:a8:06:08
+154 ps_77_2 00:00:00:00:00:00:06:08 1 00:00:00:00:00:00:04:08 1 matchSrcMac 00:00:c0:a8:06:08 matchDstMac 00:00:c0:a8:04:08
+155 ps_78_1 00:00:00:00:00:00:04:09 1 00:00:00:00:00:00:06:09 1 matchSrcMac 00:00:c0:a8:04:09 matchDstMac 00:00:c0:a8:06:09
+156 ps_78_2 00:00:00:00:00:00:06:09 1 00:00:00:00:00:00:04:09 1 matchSrcMac 00:00:c0:a8:06:09 matchDstMac 00:00:c0:a8:04:09
+157 ps_79_1 00:00:00:00:00:00:04:0a 1 00:00:00:00:00:00:06:0a 1 matchSrcMac 00:00:c0:a8:04:0a matchDstMac 00:00:c0:a8:06:0a
+158 ps_79_2 00:00:00:00:00:00:06:0a 1 00:00:00:00:00:00:04:0a 1 matchSrcMac 00:00:c0:a8:06:0a matchDstMac 00:00:c0:a8:04:0a
+159 ps_80_1 00:00:00:00:00:00:04:0b 1 00:00:00:00:00:00:06:0b 1 matchSrcMac 00:00:c0:a8:04:0b matchDstMac 00:00:c0:a8:06:0b
+160 ps_80_2 00:00:00:00:00:00:06:0b 1 00:00:00:00:00:00:04:0b 1 matchSrcMac 00:00:c0:a8:06:0b matchDstMac 00:00:c0:a8:04:0b
+161 ps_81_1 00:00:00:00:00:00:04:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:04:02 matchDstMac 00:00:c0:a8:08:02
+162 ps_81_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:04:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:04:02
+163 ps_82_1 00:00:00:00:00:00:04:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:04:03 matchDstMac 00:00:c0:a8:08:03
+164 ps_82_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:04:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:04:03
+165 ps_83_1 00:00:00:00:00:00:04:04 1 00:00:00:00:00:00:08:04 1 matchSrcMac 00:00:c0:a8:04:04 matchDstMac 00:00:c0:a8:08:04
+166 ps_83_2 00:00:00:00:00:00:08:04 1 00:00:00:00:00:00:04:04 1 matchSrcMac 00:00:c0:a8:08:04 matchDstMac 00:00:c0:a8:04:04
+167 ps_84_1 00:00:00:00:00:00:04:05 1 00:00:00:00:00:00:08:05 1 matchSrcMac 00:00:c0:a8:04:05 matchDstMac 00:00:c0:a8:08:05
+168 ps_84_2 00:00:00:00:00:00:08:05 1 00:00:00:00:00:00:04:05 1 matchSrcMac 00:00:c0:a8:08:05 matchDstMac 00:00:c0:a8:04:05
+169 ps_85_1 00:00:00:00:00:00:04:06 1 00:00:00:00:00:00:08:06 1 matchSrcMac 00:00:c0:a8:04:06 matchDstMac 00:00:c0:a8:08:06
+170 ps_85_2 00:00:00:00:00:00:08:06 1 00:00:00:00:00:00:04:06 1 matchSrcMac 00:00:c0:a8:08:06 matchDstMac 00:00:c0:a8:04:06
+171 ps_86_1 00:00:00:00:00:00:04:07 1 00:00:00:00:00:00:08:07 1 matchSrcMac 00:00:c0:a8:04:07 matchDstMac 00:00:c0:a8:08:07
+172 ps_86_2 00:00:00:00:00:00:08:07 1 00:00:00:00:00:00:04:07 1 matchSrcMac 00:00:c0:a8:08:07 matchDstMac 00:00:c0:a8:04:07
+173 ps_87_1 00:00:00:00:00:00:04:08 1 00:00:00:00:00:00:08:08 1 matchSrcMac 00:00:c0:a8:04:08 matchDstMac 00:00:c0:a8:08:08
+174 ps_87_2 00:00:00:00:00:00:08:08 1 00:00:00:00:00:00:04:08 1 matchSrcMac 00:00:c0:a8:08:08 matchDstMac 00:00:c0:a8:04:08
+175 ps_88_1 00:00:00:00:00:00:04:09 1 00:00:00:00:00:00:08:09 1 matchSrcMac 00:00:c0:a8:04:09 matchDstMac 00:00:c0:a8:08:09
+176 ps_88_2 00:00:00:00:00:00:08:09 1 00:00:00:00:00:00:04:09 1 matchSrcMac 00:00:c0:a8:08:09 matchDstMac 00:00:c0:a8:04:09
+177 ps_89_1 00:00:00:00:00:00:04:0a 1 00:00:00:00:00:00:08:0a 1 matchSrcMac 00:00:c0:a8:04:0a matchDstMac 00:00:c0:a8:08:0a
+178 ps_89_2 00:00:00:00:00:00:08:0a 1 00:00:00:00:00:00:04:0a 1 matchSrcMac 00:00:c0:a8:08:0a matchDstMac 00:00:c0:a8:04:0a
+179 ps_90_1 00:00:00:00:00:00:04:0b 1 00:00:00:00:00:00:08:0b 1 matchSrcMac 00:00:c0:a8:04:0b matchDstMac 00:00:c0:a8:08:0b
+180 ps_90_2 00:00:00:00:00:00:08:0b 1 00:00:00:00:00:00:04:0b 1 matchSrcMac 00:00:c0:a8:08:0b matchDstMac 00:00:c0:a8:04:0b
+181 ps_91_1 00:00:00:00:00:00:06:02 1 00:00:00:00:00:00:08:02 1 matchSrcMac 00:00:c0:a8:06:02 matchDstMac 00:00:c0:a8:08:02
+182 ps_91_2 00:00:00:00:00:00:08:02 1 00:00:00:00:00:00:06:02 1 matchSrcMac 00:00:c0:a8:08:02 matchDstMac 00:00:c0:a8:06:02
+183 ps_92_1 00:00:00:00:00:00:06:03 1 00:00:00:00:00:00:08:03 1 matchSrcMac 00:00:c0:a8:06:03 matchDstMac 00:00:c0:a8:08:03
+184 ps_92_2 00:00:00:00:00:00:08:03 1 00:00:00:00:00:00:06:03 1 matchSrcMac 00:00:c0:a8:08:03 matchDstMac 00:00:c0:a8:06:03
+185 ps_93_1 00:00:00:00:00:00:06:04 1 00:00:00:00:00:00:08:04 1 matchSrcMac 00:00:c0:a8:06:04 matchDstMac 00:00:c0:a8:08:04
+186 ps_93_2 00:00:00:00:00:00:08:04 1 00:00:00:00:00:00:06:04 1 matchSrcMac 00:00:c0:a8:08:04 matchDstMac 00:00:c0:a8:06:04
+187 ps_94_1 00:00:00:00:00:00:06:05 1 00:00:00:00:00:00:08:05 1 matchSrcMac 00:00:c0:a8:06:05 matchDstMac 00:00:c0:a8:08:05
+188 ps_94_2 00:00:00:00:00:00:08:05 1 00:00:00:00:00:00:06:05 1 matchSrcMac 00:00:c0:a8:08:05 matchDstMac 00:00:c0:a8:06:05
+189 ps_95_1 00:00:00:00:00:00:06:06 1 00:00:00:00:00:00:08:06 1 matchSrcMac 00:00:c0:a8:06:06 matchDstMac 00:00:c0:a8:08:06
+190 ps_95_2 00:00:00:00:00:00:08:06 1 00:00:00:00:00:00:06:06 1 matchSrcMac 00:00:c0:a8:08:06 matchDstMac 00:00:c0:a8:06:06
+191 ps_96_1 00:00:00:00:00:00:06:07 1 00:00:00:00:00:00:08:07 1 matchSrcMac 00:00:c0:a8:06:07 matchDstMac 00:00:c0:a8:08:07
+192 ps_96_2 00:00:00:00:00:00:08:07 1 00:00:00:00:00:00:06:07 1 matchSrcMac 00:00:c0:a8:08:07 matchDstMac 00:00:c0:a8:06:07
+193 ps_97_1 00:00:00:00:00:00:06:08 1 00:00:00:00:00:00:08:08 1 matchSrcMac 00:00:c0:a8:06:08 matchDstMac 00:00:c0:a8:08:08
+194 ps_97_2 00:00:00:00:00:00:08:08 1 00:00:00:00:00:00:06:08 1 matchSrcMac 00:00:c0:a8:08:08 matchDstMac 00:00:c0:a8:06:08
+195 ps_98_1 00:00:00:00:00:00:06:09 1 00:00:00:00:00:00:08:09 1 matchSrcMac 00:00:c0:a8:06:09 matchDstMac 00:00:c0:a8:08:09
+196 ps_98_2 00:00:00:00:00:00:08:09 1 00:00:00:00:00:00:06:09 1 matchSrcMac 00:00:c0:a8:08:09 matchDstMac 00:00:c0:a8:06:09
+197 ps_99_1 00:00:00:00:00:00:06:0a 1 00:00:00:00:00:00:08:0a 1 matchSrcMac 00:00:c0:a8:06:0a matchDstMac 00:00:c0:a8:08:0a
+198 ps_99_2 00:00:00:00:00:00:08:0a 1 00:00:00:00:00:00:06:0a 1 matchSrcMac 00:00:c0:a8:08:0a matchDstMac 00:00:c0:a8:06:0a
+199 ps_100_1 00:00:00:00:00:00:06:0b 1 00:00:00:00:00:00:08:0b 1 matchSrcMac 00:00:c0:a8:06:0b matchDstMac 00:00:c0:a8:08:0b
+200 ps_100_2 00:00:00:00:00:00:08:0b 1 00:00:00:00:00:00:06:0b 1 matchSrcMac 00:00:c0:a8:08:0b matchDstMac 00:00:c0:a8:06:0b
diff --git a/web/ons-demo/RELEASE_NOTES.txt b/web/ons-demo/RELEASE_NOTES.txt
index bfe6059..369e9c4 100644
--- a/web/ons-demo/RELEASE_NOTES.txt
+++ b/web/ons-demo/RELEASE_NOTES.txt
@@ -1,3 +1,7 @@
+** April 9, 2013 **
+- display number of flows for each core<->core link
+- graphics tweaks
+
 ** April 8, 2013 **
 - map view
 - onos nodes at top
diff --git a/web/ons-demo/css/layout.default.css b/web/ons-demo/css/layout.default.css
index 297e31b..f3daf04 100644
--- a/web/ons-demo/css/layout.default.css
+++ b/web/ons-demo/css/layout.default.css
@@ -27,6 +27,38 @@
 	-webkit-box-flex: 1.0;
 }
 
+#confirm {
+	position: absolute;
+	top: 0px;
+	left: 0px;
+	width: 100%;
+	height: 100%;
+	display: -webkit-box;
+	-webkit-box-align: center;
+	-webkit-box-pack: center;
+}
+
+#confirm-background {
+	position: absolute;
+	top: 0px;
+	left: 0px;
+	width: 100%;
+	height: 100%;
+}
+
+#confirm-panel {
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-box-pack: justify;
+}
+
+#confirm-buttons {
+	display: -webkit-box;
+	-webkit-box-pack: center;
+	-webkit-box-flex: 1.0;
+	-webkit-box-align: center;
+}
+
 .header {
 	width: 100%;
 	display: -webkit-box;
diff --git a/web/ons-demo/css/skin.default.css b/web/ons-demo/css/skin.default.css
index f6086a3..9f1ecf1 100644
--- a/web/ons-demo/css/skin.default.css
+++ b/web/ons-demo/css/skin.default.css
@@ -106,6 +106,34 @@
 	border-bottom: 1px solid #AAA;;
 }
 
+#onos {
+	background-color: #333;
+}
+
+#cluster-label {
+	font-size: 22px;
+	display: -webkit-box;
+	-webkit-box-align: center;
+	padding-left: .5em;
+	padding-right: .5em;
+	color: #EEE;
+}
+
+#actions {
+	padding-right: .25em;
+	padding-left: .25em;
+	border-left: 1px solid white;
+	display: -webkit-box;
+	-webkit-box-align: center;
+}
+
+#controllers {
+	padding: .25em;
+	background-color: black;
+	margin: .25em;
+	border-radius: 8px;
+}
+
 #flowChooser .selectedFlow {
 	background-color: rgba(255, 255, 255, .75);
 	color: black;
@@ -208,6 +236,7 @@
 	border: 1px solid #444;
 	color: white;
 	position: relative;
+	border-radius: 8px;
 }
 
 .controller:hover {
@@ -395,19 +424,21 @@
 
 .action {
 	margin: .25em;
-	padding: .25em;
-	padding-left: 1em;
-	padding-right: 1em;
-	border: 1px solid #AAA;
+	border: 2px solid #AAA;
+	height: 2em;
+	width: 2em;
 	background-color: #444;
 	display: -webkit-box;
 	-webkit-box-pack: center;
 	-webkit-box-align: center;
-	color: white;
+	color: #AAA;
+	border-radius: 50%;
+	-webkit-box-sizing: border-box;
 }
 
 .action:hover {
-	border: 1px solid #FFF;
+	border: 2px solid #FFF;
+	color: white;
 }
 
 .action:active {
@@ -437,3 +468,63 @@
 	stroke: black;
 }
 
+.flowCount {
+	font-size: 20px;
+	fill: rgba(255, 255, 255, .75);
+}
+
+#confirm {
+	display: none;
+	-webkit-transition: opacity .25s;
+	font-size: 20px;
+}
+
+#confirm-background {
+	background-color: black;
+	opacity: .5;
+}
+
+#confirm-prompt {
+	display: -webkit-box;
+	-webkit-box-pack: center;
+	-webkit-box-align: center;
+	-webkit-box-flex: 1.0;
+	text-align: center;
+}
+
+#confirm-buttons {
+	padding: 1em;
+}
+
+#confirm-prompt {
+	margin-top:1em;
+	line-height: 1.5em;
+}
+
+#confirm-panel {
+	position: relative;
+	background-color: #222;
+	border: 2px solid #aaa;
+	border-radius: 12px;
+	width: 20em;
+	padding: 1em;
+}
+
+.confirm-button {
+	padding: .5em;
+	border: 2px solid #aaa;
+	color: #aaa;
+	border-radius: 6px;
+	margin-left: .5em;
+	margin-right: .5em;
+}
+
+.confirm-button:hover{
+	border: 2px solid white;
+	color: white;
+}
+
+.confirm-button:active{
+	background-color: black;
+}
+
diff --git a/web/ons-demo/index.html b/web/ons-demo/index.html
index ca930ec..1b88b4a 100644
--- a/web/ons-demo/index.html
+++ b/web/ons-demo/index.html
@@ -20,11 +20,13 @@
 	</div>
 
 	<div id='onos'>
+		<div id='cluster-label'>ONOS Node Cluster</div>
 		<div id='controllers'></div>
 		<div id='actions'>
-			<div id='action-all' class='action'>ALL</div>
-			<div id='action-local' class='action'>LOCAL</div>
-			<div id='action-scale' class='action'>SCALE</div>
+			<div id='action-all' class='action'>A</div>
+			<div id='action-local' class='action'>1</div>
+			<div id='action-scale' class='action'>S</div>
+			<div id='action-reset' class='action'>R</div>
 		</div>
 	</div>
 
@@ -43,28 +45,38 @@
 	<div id='selectedFlows'></div>
 
 	<div id='flowChooser'></div>
-
-	<script src="d3/d3.v3.js" charset="utf-8"></script>
-	<script src="d3/topojson.v0.min.js"></script>
-	<script src="js/async.js"></script>
-	<script src="js/debug.js"></script>
-	<script src="js/constants.js"></script>
-	<script src="js/globals.js"></script>
-	<script src="js/utils.js"></script>
-	<script src="js/model.js"></script>
-	<script src="js/controller.js"></script>
-	<script src="js/controllers.js"></script>
-
-	<!-- choose ring or map layout -->
-	<!--script src="js/rings.js"></script-->
-	<script src="js/map.js"></script>
-
-	<script src="js/topologyactions.js"></script>
-	<script src="js/topology.js"></script>
-	<script src="js/flows.js"></script>
-	<script src="js/init.js"></script>
-	<script src="js/app.js"></script>
 </div>
+<div id='confirm'>
+	<div id='confirm-background'></div>
+	<div id='confirm-panel'>
+		<div id='confirm-prompt'>A PROMPT</div>
+		<div id='confirm-buttons'>
+			<div id='confirm-ok' class='confirm-button'>OK</div>
+			<div id='confirm-cancel' class='confirm-button'>CANCEL</div>
+		</div>
+	</div>
+</div>
+
+<script src="d3/d3.v3.js" charset="utf-8"></script>
+<script src="d3/topojson.v0.min.js"></script>
+<script src="js/async.js"></script>
+<script src="js/debug.js"></script>
+<script src="js/constants.js"></script>
+<script src="js/globals.js"></script>
+<script src="js/utils.js"></script>
+<script src="js/model.js"></script>
+<script src="js/controller.js"></script>
+<script src="js/controllers.js"></script>
+
+<!-- choose ring or map layout -->
+<!--script src="js/rings.js"></script-->
+<script src="js/map.js"></script>
+
+<script src="js/topologyactions.js"></script>
+<script src="js/topology.js"></script>
+<script src="js/flows.js"></script>
+<script src="js/init.js"></script>
+<script src="js/app.js"></script>
 </body>
 
 </html>
\ No newline at end of file
diff --git a/web/ons-demo/js/controllers.js b/web/ons-demo/js/controllers.js
index abe966b..501ac1d 100644
--- a/web/ons-demo/js/controllers.js
+++ b/web/ons-demo/js/controllers.js
@@ -26,16 +26,22 @@
 	controllers.on('dblclick', function (c) {
 		if (model.activeControllers.indexOf(c) != -1) {
 			var prompt = 'Dectivate ' + c + '?';
-			if (confirm(prompt)) {
-				controllerDown(c);
-				setPending(d3.select(this));
-			};
+			var that = this;
+			doConfirm(prompt, function (result) {
+				if (result) {
+					controllerDown(c);
+					setPending(d3.select(that));
+				};
+			})
 		} else {
 			var prompt = 'Activate ' + c + '?';
-			if (confirm(prompt)) {
-				controllerUp(c);
-				setPending(d3.select(this));
-			};
+			var that = this;
+			doConfirm(prompt, function (result) {
+				if (result) {
+					controllerUp(c);
+					setPending(d3.select(that));
+				};
+			});
 		}
 	});
 
diff --git a/web/ons-demo/js/debug.js b/web/ons-demo/js/debug.js
index 7b66912..3d3b302 100644
--- a/web/ons-demo/js/debug.js
+++ b/web/ons-demo/js/debug.js
@@ -9,4 +9,23 @@
 		}
 	});
 	return links;
+}
+
+function debug_findswitch(model, dpid) {
+	var sw;
+
+	model.edgeSwitches.forEach(function (s) {
+		if (s.dpid == dpid)
+			sw = s;
+	});
+	model.aggregationSwitches.forEach(function (s) {
+		if (s.dpid == dpid)
+			sw = s;
+	});
+	model.coreSwitches.forEach(function (s) {
+		if (s.dpid == dpid)
+			sw = s;
+	});
+
+	return sw;
 }
\ No newline at end of file
diff --git a/web/ons-demo/js/flows.js b/web/ons-demo/js/flows.js
index fa0ccf2..bc30d11 100644
--- a/web/ons-demo/js/flows.js
+++ b/web/ons-demo/js/flows.js
@@ -142,16 +142,18 @@
 		row.on('dblclick', function () {
 			if (d) {
 				var prompt = 'Delete flow ' + d.flowId + '?';
-				if (confirm(prompt)) {
-					deleteFlow(d);
-					d.deletePending = true;
-					updateSelectedFlows();
-
-					setTimeout(function () {
-						d.deletePending = false;
+				doConfirm(prompt, function (result) {
+					if (result) {
+						deleteFlow(d);
+						d.deletePending = true;
 						updateSelectedFlows();
-					}, pendingTimeout)
-				};
+
+						setTimeout(function () {
+							d.deletePending = false;
+							updateSelectedFlows();
+						}, pendingTimeout)
+					};
+				});
 			}
 		});
 
diff --git a/web/ons-demo/js/init.js b/web/ons-demo/js/init.js
index dd11bf8..f7bd55b 100644
--- a/web/ons-demo/js/init.js
+++ b/web/ons-demo/js/init.js
@@ -9,21 +9,29 @@
 
 	d3.select('#action-all').on('click', function () {
 		var prompt = "Switch controllers to all?"
-		if (confirm(prompt)) {
-			switchAll();
-		}
+		doConfirm(prompt, function (result) {
+			if (result) {
+				switchAll();
+			}
+		});
 	});
 
 	d3.select('#action-local').on('click', function () {
 		var prompt = "Switch controllers to local?"
-		if (confirm(prompt)) {
-			switchLocal();
-		}
+		doConfirm(prompt, function (result) {
+			if (result) {
+				switchLocal();
+			}
+		});
 	});
 
 	d3.select('#action-scale').on('click', function () {
 		alert('scale')
 	});
 
+	d3.select('#action-reset').on('click', function () {
+		alert('reset')
+	});
+
 	createTopologyView(cb);
 }
diff --git a/web/ons-demo/js/map.js b/web/ons-demo/js/map.js
index 7662aaf..ad590cb 100644
--- a/web/ons-demo/js/map.js
+++ b/web/ons-demo/js/map.js
@@ -120,6 +120,64 @@
 	});
 }
 
+function drawCoreFlowCounts() {
+	var links = {};
+	model.links.forEach(function (l) {
+		links[makeLinkKey(l)] = l;
+	});
+
+	var flowCounts = [];
+	countCoreLinkFlows().forEach(function (count) {
+		var l = links[count.key];
+		if (l) {
+			var src = d3.select(document.getElementById(l['src-switch']));
+			var dst = d3.select(document.getElementById(l['dst-switch']));
+
+			if (!src.empty() && !dst.empty()) {
+				var x1 = parseFloat(src.attr('x'));
+				var x2 = parseFloat(dst.attr('x'));
+				var y1 = parseFloat(src.attr('y'));
+				var y2 = parseFloat(dst.attr('y'));
+
+				var slope = (y2 - y1)/(x2 - x1);
+
+				var offset = 15;
+				var xOffset = offset;
+				var yOffset = slope*offset;
+
+				var d = Math.sqrt(xOffset*xOffset + yOffset*yOffset);
+				var scaler = offset/d;
+
+				count.pt = {
+					x: x1 + (x2 - x1)/2 + xOffset*scaler,
+					y: y1 + (y2 - y1)/2 + yOffset*scaler
+				}
+			}
+			flowCounts.push(count);
+		}
+	});
+
+
+	var counts = linksLayer.selectAll('.flowCount').data(flowCounts, function (d) {
+		return d.key;
+	});
+
+	counts.enter().append('svg:text')
+		.attr('class', 'flowCount')
+		.attr('x', function (d) {
+			return d.pt.x;
+		})
+		.attr('y', function (d) {
+			return d.pt.y;
+		});
+
+	counts.text(function (d) {
+		return d.value;
+	});
+
+	counts.exit().remove();
+}
+
 function drawLinkLines() {
 
 	// key on link dpids since these will come/go during demo
@@ -163,6 +221,7 @@
 	linkLines.exit().remove();
 }
 
+
 var fanOutAngles = {
 	aggregation: 100,
 	edge: 5
@@ -252,9 +311,13 @@
 		g.append('svg:text')
 			.classed('label', true)
 			.text(d.label)
-			.attr("text-anchor", "end")
-			.attr('x', d.x - width)
-			.attr('y', d.y - width);
+			.attr("text-anchor", function (d) {
+				return d.x > 500 ? "end" : "start";
+			})
+			.attr('x', function (d) {
+				return d.x > 500 ? d.x - width*.8 : d.x + width*.8;
+			})
+			.attr('y', d.y - width*.8);
 	}
 }
 
@@ -281,7 +344,7 @@
 }
 
 function switchesEnter(switches) {
-	return switchLayer.selectAll('g').data(switches, function (d) {
+	switchLayer.selectAll('g').data(switches, function (d) {
 		return d.dpid;
 	})
 		.enter()
@@ -300,7 +363,9 @@
 
 
 function switchesUpdate(switches) {
-	switches.each(function (d) {
+	switchLayer.selectAll('g').data(switches, function (d) {
+		return d.dpid;
+	}).each(function (d) {
 			// if there's a pending state changed and then the state changes, clear the pending class
 			var circle = d3.select(this);
 			if (d.state === 'ACTIVE' && circle.classed('inactive') ||
@@ -329,10 +394,13 @@
 
 	var switches = coreSwitches.concat(aggregationSwitches).concat(edgeSwitches);
 
-	switchesUpdate(switchesEnter(switches));
+	switchesEnter(switches)
+	switchesUpdate(switches);
 
 	drawLinkLines();
 
+	drawCoreFlowCounts();
+
 	labelsEnter(switches);
 }
 
diff --git a/web/ons-demo/js/model.js b/web/ons-demo/js/model.js
index f251c87..df4a751 100644
--- a/web/ons-demo/js/model.js
+++ b/web/ons-demo/js/model.js
@@ -5,13 +5,20 @@
 		edgeSwitches: [],
 		aggregationSwitches: [],
 		coreSwitches: [],
-		flows: results.flows,
+		flows: [],
 		controllers: results.controllers,
 		activeControllers: results.activeControllers,
 		links: results.links,
 		configuration: results.configuration
 	};
 
+	// remove bad flows;
+	results.flows.forEach(function (f) {
+		if (f.dataPath && f.dataPath.flowEntries && f.dataPath.flowEntries.length > 1) {
+			model.flows.push(f);
+		}
+	})
+
 	// sort the switches
 	results.switches.sort(function (a, b) {
 		var aA = a.dpid.split(':');
diff --git a/web/ons-demo/js/topologyactions.js b/web/ons-demo/js/topologyactions.js
index 6501e5b..28d418b 100644
--- a/web/ons-demo/js/topologyactions.js
+++ b/web/ons-demo/js/topologyactions.js
@@ -101,16 +101,20 @@
 	var circle = d3.select(document.getElementById(data.dpid)).select('circle');
 	if (data.state == 'ACTIVE') {
 		var prompt = 'Deactivate ' + data.dpid + '?';
-		if (confirm(prompt)) {
-			switchDown(data);
-			setPending(circle);
-		}
+		doConfirm(prompt, function(result) {
+			if (result) {
+				switchDown(data);
+				setPending(circle);
+			}
+		});
 	} else {
 		var prompt = 'Activate ' + data.dpid + '?';
-		if (confirm(prompt)) {
-			switchUp(data);
-			setPending(circle);
-		}
+		doConfirm(prompt, function (result) {
+			if (result) {
+				switchUp(data);
+				setPending(circle);
+			}
+		});
 	}
 }
 
@@ -148,78 +152,87 @@
 
 		if (s1Data.className == 'edge' && s2Data.className == 'edge') {
 			var prompt = 'Create flow from ' + srcData.dpid + ' to ' + dstData.dpid + '?';
-			if (confirm(prompt)) {
-				addFlow(srcData, dstData);
+			doConfirm(prompt, function (result) {
+				if (result) {
+					addFlow(srcData, dstData);
 
-				var flow = {
-					dataPath: {
-						srcPort: {
-							dpid: {
-								value: srcData.dpid
+					var flow = {
+						dataPath: {
+							srcPort: {
+								dpid: {
+									value: srcData.dpid
+								}
+							},
+							dstPort: {
+								dpid: {
+									value: dstData.dpid
+								}
 							}
 						},
-						dstPort: {
-							dpid: {
-								value: dstData.dpid
-							}
-						}
-					},
-				        srcDpid: srcData.dpid,
-				        dstDpid: dstData.dpid,
-					createPending: true
-				};
+					        srcDpid: srcData.dpid,
+					        dstDpid: dstData.dpid,
+						createPending: true
+					};
 
-				selectFlow(flow);
+					selectFlow(flow);
 
-				setTimeout(function () {
-					deselectFlowIfCreatePending(flow);
-				}, pendingTimeout);
-			}
+					setTimeout(function () {
+						deselectFlowIfCreatePending(flow);
+					}, pendingTimeout);
+				}
+			});
+
 		} else {
 			var map = linkMap[srcData.dpid];
 			if (map && map[dstData.dpid]) {
 				var prompt = 'Remove link between ' + srcData.dpid + ' and ' + dstData.dpid + '?';
-				if (confirm(prompt)) {
-					removeLink(map[dstData.dpid]);
-				}
+				doConfirm(prompt, function (result) {
+					if (result) {
+						removeLink(map[dstData.dpid]);
+					}
+				});
 			} else {
 				map = linkMap[dstData.dpid];
 				if (map && map[srcData.dpid]) {
 					var prompt = 'Remove link between ' + dstData.dpid + ' and ' + srcData.dpid + '?';
-					if (confirm(prompt)) {
-						removeLink(map[srcData.dpid]);
-					}
+					doConfirm(prompt, function (result) {
+						if (result) {
+							removeLink(map[srcData.dpid]);
+						}
+					});
 				} else {
 					var prompt = 'Create link between ' + srcData.dpid + ' and ' + dstData.dpid + '?';
-					if (confirm(prompt)) {
-						var link1 = {
-							'src-switch': srcData.dpid,
-							'src-port': 1,
-							'dst-switch': dstData.dpid,
-							'dst-port': 1,
-							pending: true
-						};
-						pendingLinks[makeLinkKey(link1)] = link1;
-						var link2 = {
-							'src-switch': dstData.dpid,
-							'src-port': 1,
-							'dst-switch': srcData.dpid,
-							'dst-port': 1,
-							pending: true
-						};
-						pendingLinks[makeLinkKey(link2)] = link2;
-						updateTopology();
-
-						linkUp(link1);
-
-						// remove the pending links after 10s
-						setTimeout(function () {
-							delete pendingLinks[makeLinkKey(link1)];
-							delete pendingLinks[makeLinkKey(link2)];
-
+					doConfirm(prompt, function (result) {
+						if (result) {
+							var link1 = {
+								'src-switch': srcData.dpid,
+								'src-port': 1,
+								'dst-switch': dstData.dpid,
+								'dst-port': 1,
+								pending: true
+							};
+							pendingLinks[makeLinkKey(link1)] = link1;
+							var link2 = {
+								'src-switch': dstData.dpid,
+								'src-port': 1,
+								'dst-switch': srcData.dpid,
+								'dst-port': 1,
+								pending: true
+							};
+							pendingLinks[makeLinkKey(link2)] = link2;
 							updateTopology();
-						}, pendingTimeout);
-					}
+
+							linkUp(link1);
+
+							// remove the pending links after 10s
+							setTimeout(function () {
+								delete pendingLinks[makeLinkKey(link1)];
+								delete pendingLinks[makeLinkKey(link2)];
+
+								updateTopology();
+							}, pendingTimeout);
+						}
+					});
 				}
 			}
 		}
diff --git a/web/ons-demo/js/utils.js b/web/ons-demo/js/utils.js
index be7cf53..265c661 100644
--- a/web/ons-demo/js/utils.js
+++ b/web/ons-demo/js/utils.js
@@ -81,24 +81,27 @@
 function updateHeader() {
 	d3.select('#lastUpdate').text(new Date());
 
-	var count = 0;
+	var activeSwitchCount = 0;
 	model.edgeSwitches.forEach(function (s) {
 		if (s.state === 'ACTIVE') {
-			count += 1;
+			activeSwitchCount += 1;
 		}
 	});
 	model.aggregationSwitches.forEach(function (s) {
 		if (s.state === 'ACTIVE') {
-			count += 1;
+			activeSwitchCount += 1;
 		}
 	});
 	model.coreSwitches.forEach(function (s) {
 		if (s.state === 'ACTIVE') {
-			count += 1;
+			activeSwitchCount += 1;
 		}
 	});
 
-	d3.select('#activeSwitches').text(count);
+	d3.select('#activeSwitches').text(activeSwitchCount);
+
+
+
 	d3.select('#activeFlows').text(model.flows.length);
 }
 
@@ -153,4 +156,90 @@
 	return svg;
 }
 
+/***************************************************************************************************
+counts the number of flows which pass through each core<->core link
+***************************************************************************************************/
+function countCoreLinkFlows() {
+	var allCounts = {};
+	model.flows.forEach(function (f) {
+		if (f.dataPath && f.dataPath.flowEntries && f.dataPath.flowEntries.length > 1) {
+			var flowEntries = f.dataPath.flowEntries;
+			var i;
+
+			for (i = 0; i < flowEntries.length - 1; i += 1) {
+				var linkKey = flowEntries[i].dpid.value + '=>' + flowEntries[i+1].dpid.value;
+				if (!allCounts[linkKey]) {
+					allCounts[linkKey] = 1;
+				} else {
+					allCounts[linkKey] += 1;
+				}
+			}
+		}
+	});
+
+	var coreCounts = {};
+	var i, j;
+	for (i = 0; i < model.coreSwitches.length - 1; i += 1) {
+		for (j = i + 1; j < model.coreSwitches.length; j += 1) {
+			var si = model.coreSwitches[i];
+			var sj = model.coreSwitches[j];
+			var key1 =  si.dpid + '=>' + sj.dpid;
+			var key2 =  sj.dpid + '=>' + si.dpid;
+			var linkCount = 0;
+			if (allCounts[key1]) {
+				linkCount += allCounts[key1];
+			}
+			if (allCounts[key2]) {
+				linkCount += allCounts[key2];
+			}
+
+			coreCounts[key1] = linkCount;
+		}
+	}
+
+	return d3.entries(coreCounts);
+}
+
+
+/***************************************************************************************************
+
+***************************************************************************************************/
+function doConfirm(prompt, cb) {
+	var confirm = d3.select('#confirm');
+	confirm.select('#confirm-prompt').text(prompt);
+
+	function show() {
+		confirm.style('display', '-webkit-box');
+		confirm.style('opacity', 0);
+		setTimeout(function () {
+			confirm.style('opacity', 1);
+		}, 0);
+	}
+
+	function dismiss() {
+		confirm.style('opacity', 0);
+		confirm.on('webkitTransitionEnd', function () {
+			confirm.style('display', 'none');
+			confirm.on('webkitTransitionEnd', null);
+		});
+	}
+
+	confirm.select('#confirm-ok').on('click', function () {
+		d3.select(this).on('click', null);
+		dismiss();
+		cb(true);
+	});
+
+	confirm.select('#confirm-cancel').on('click', function () {
+		d3.select(this).on('click', null);
+		dismiss();
+		cb(false);
+	});
+
+	show();
+}
+
+
+
+
 
diff --git a/web/topology_rest.py b/web/topology_rest.py
index 7bbf7ce..43865f1 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -691,8 +691,8 @@
 @app.route("/gui/controller/<cmd>/<controller_name>")
 def controller_status_change(cmd, controller_name):
   if (TESTBED == "hw"):
-    start_onos="cd; onos start %s" % (controller_name[-1:])
-    stop_onos="cd; onos stop %s" % (controller_name[-1:])
+    start_onos="/home/admin/bin/onos start %s" % (controller_name[-1:])
+    stop_onos="/home/admin/bin/onos stop %s" % (controller_name[-1:])
   else:
     start_onos="ssh -i ~/.ssh/onlabkey.pem %s ONOS/start-onos.sh start" % (controller_name)
     stop_onos="ssh -i ~/.ssh/onlabkey.pem %s ONOS/start-onos.sh stop" % (controller_name)
@@ -864,11 +864,11 @@
 	cmd = 'up'
 	result=""
 	host = controllers[0]
-	cmd_string="~/ONOS/scripts/link.sh %s %s %s " % (src_dpid, port1, cmd)
+	cmd_string="~/ONOS/scripts/link-hw.sh %s %s %s " % (src_dpid, port1, cmd)
 	print cmd_string
 	res=os.popen(cmd_string).read()
 	result = result + ' ' + res
-	cmd_string="~/ONOS/scripts/link.sh %s %s %s " % (dst_dpid, port2, cmd)
+	cmd_string="~/ONOS/scripts/link-hw.sh %s %s %s " % (dst_dpid, port2, cmd)
 	print cmd_string
 	res=os.popen(cmd_string).read()
 	result = result + ' ' + res
@@ -892,9 +892,9 @@
     cmd_string="ssh -i ~/.ssh/onlabkey.pem %s 'cd ONOS/scripts; ./link.sh %s %s %s'" % (host, src_dpid, src_port, cmd)
   else:
     if ( src_dpid == "00:00:00:08:a2:08:f9:01" ):
-      cmd_string="~/ONOS/scripts/link.sh %s %s %s " % ( dst_dpid, dst_port, cmd)
+      cmd_string="~/ONOS/scripts/link-hw.sh %s %s %s " % ( dst_dpid, dst_port, cmd)
     else:
-      cmd_string="~/ONOS/scripts/link.sh %s %s %s " % ( src_dpid, src_port, cmd)
+      cmd_string="~/ONOS/scripts/link-hw.sh %s %s %s " % ( src_dpid, src_port, cmd)
   print cmd_string
 
   result=os.popen(cmd_string).read()
@@ -957,34 +957,46 @@
       src_host = controllers[0]
   else:
       hostid=int(src_dpid.split(':')[-2])
-      src_host = controllers[hostid-1]
+      if TESTBED == "hw":
+        src_host = "mininet%i" % hostid
+      else:
+        src_host = controllers[hostid-1]
 
   if dst_dpid in core_switches:
       dst_host = controllers[0]
   else:
       hostid=int(dst_dpid.split(':')[-2])
-      dst_host = controllers[hostid-1]
+      if TESTBED == "hw":
+        dst_host = "mininet%i" % hostid
+      else:
+        dst_host = controllers[hostid-1]
 
-# /runiperf.sh <flowid> <src_dpid> <dst_dpid> svr|client <proto>/<duration>/<interval>/<samples>
+# /runiperf.sh <flowid> <src_dpid> <dst_dpid> hw:svr|sw:svr|hw:client|sw:client <proto>/<duration>/<interval>/<samples>
   protocol="udp"
   interval=0.1
-  cmd_string="ssh -i ~/.ssh/onlabkey.pem %s 'cd ONOS/scripts; ./runiperf.sh %d %s %s %s %s/%s/%s/%s'" % (dst_host, flowId, src_dpid, dst_dpid, "svr", protocol, duration, interval, samples)
+  if TESTBED == "hw":
+    cmd_string="dsh -w %s 'cd ONOS/scripts; " % dst_host
+  else:
+    cmd_string="ssh -i ~/.ssh/onlabkey.pem %s 'cd ONOS/scripts; " % dst_host
+  cmd_string += "./runiperf.sh %d %s %s %s:%s %s/%s/%s/%s'" % (flowId, src_dpid, dst_dpid, TESTBED, "svr", protocol, duration, interval, samples)
   print cmd_string
   os.popen(cmd_string)
 
-  cmd_string="ssh -i ~/.ssh/onlabkey.pem %s 'cd ONOS/scripts; ./runiperf.sh %d %s %s %s %s/%s/%s/%s'" % (src_host, flowId, src_dpid, dst_dpid, "client", protocol, duration, interval, samples)
+  if TESTBED == "hw":
+    cmd_string="dsh -w %s 'cd ONOS/scripts; " % src_host
+  else:
+    cmd_string="ssh -i ~/.ssh/onlabkey.pem %s 'cd ONOS/scripts;" % src_host
+  cmd_string+="./runiperf.sh %d %s %s %s:%s %s/%s/%s/%s'" % (flowId, src_dpid, dst_dpid, TESTBED, "client", protocol, duration, interval, samples)
   print cmd_string
   os.popen(cmd_string)
 
   return cmd_string
 
+
 #* Get Iperf Throughput
 #http://localhost:9000/gui/iperf/rate/<flow_id>
 @app.route("/gui/iperf/rate/<flow_id>")
 def iperf_rate(flow_id):
-  if (TESTBED == "hw"):
-    return "{}"
-
   try:
     command = "curl -s \'http://%s:%s/wm/flow/get/%s/json\'" % (RestIP, RestPort, flow_id)
     print command
@@ -1005,9 +1017,12 @@
   dst_port = parsedResult['dataPath']['dstPort']['port']['value']
 
   if dst_dpid in core_switches:
-      host = controllers[0]
+    host = controllers[0]
   else:
-      hostid=int(dst_dpid.split(':')[-2])
+    hostid=int(dst_dpid.split(':')[-2])
+    if TESTBED == "hw":
+      host = "mininet%i" % hostid
+    else:
       host = controllers[hostid-1]
 
   try:
@@ -1024,7 +1039,6 @@
     resp = Response(result, status=200, mimetype='application/json')
     return resp
 
-
 if __name__ == "__main__":
   random.seed()
   read_config()