Merge branch 'master' of github.com:OPENNETWORKINGLAB/ONOS
diff --git a/cluster-mgmt/template/onsdemo_core.py b/cluster-mgmt/template/onsdemo_core.py
index e62ae77..b9da603 100755
--- a/cluster-mgmt/template/onsdemo_core.py
+++ b/cluster-mgmt/template/onsdemo_core.py
@@ -51,12 +51,12 @@
def __init__( self, *args, **kwargs ):
Topo.__init__( self, *args, **kwargs )
- sw1 = self.addSwitch('sw1', dpid='00:00:00:16:97:08:9a:46')
- sw2 = self.addSwitch('sw2', dpid='00:00:00:00:ba:5e:ba:11')
- sw3 = self.addSwitch('sw3', dpid='00:00:00:08:a2:08:f9:01')
- sw4 = self.addSwitch('sw4', dpid='00:00:00:00:00:00:ba:12')
- sw5 = self.addSwitch('sw5', dpid='00:00:00:00:ba:5e:ba:13')
- sw6 = self.addSwitch('sw6', dpid='00:00:20:4e:7f:51:8a:35')
+ sw1 = self.addSwitch('sw1', dpid='0000001697089a46')
+ sw2 = self.addSwitch('sw2', dpid='00000000ba5eba11')
+ sw3 = self.addSwitch('sw3', dpid='00000008a208f901')
+ sw4 = self.addSwitch('sw4', dpid='000000000000ba12')
+ sw5 = self.addSwitch('sw5', dpid='00000000ba5eba13')
+ sw6 = self.addSwitch('sw6', dpid='0000204e7f518a35')
host1 = self.addHost( 'host1' )
host2 = self.addHost( 'host2' )
@@ -88,6 +88,7 @@
self.addLink( sw3, sw6 )
self.addLink( sw4, sw5 )
self.addLink( sw5, sw6 )
+ self.addLink( sw4, sw6 )
self.addLink( root1, host1 )
self.addLink( root2, host2 )
diff --git a/scripts/runiperf.sh b/scripts/runiperf.sh
new file mode 100755
index 0000000..9d40c98
--- /dev/null
+++ b/scripts/runiperf.sh
@@ -0,0 +1,32 @@
+#! /usr/bin/env python
+import sys
+import os
+
+def usage():
+ print "%s flowid src_dpid src_port dst_dpid dst_port duration samples" % sys.argv[0]
+ sys.exit()
+
+def main():
+ flowid = sys.argv[1]
+ src_dpid = sys.argv[2]
+ dst_dpid = sys.argv[4]
+ duration=int(sys.argv[6])
+ samples=int(sys.argv[7])
+ src_nwid=int(src_dpid.split(':')[-2], 16)
+ dst_nwid=int(dst_dpid.split(':')[-2], 16)
+ src_hostid=int(src_dpid.split(':')[-1], 16)
+ dst_hostid=int(dst_dpid.split(':')[-1], 16)
+ # /home/ubuntu/ONOS/web/scripts/iperf -t%s -i0.1 -yJ -o /tmp/iperf_%s.out -c 127.0.0.1 &
+ cmd="ssh -o StrictHostKeyChecking=no 1.1.%d.1 '/home/ubuntu/ONOS/scripts/iperf -t %s -i0.1 -k %d -yJ -o /home/ubuntu/ONOS/web/log/iperf_%s.out -c 192.168.%d.%d 2>&1 &' &" % (src_hostid, duration, samples, flowid, dst_nwid, dst_hostid)
+ killcmd='pkill -KILL -f \"iperf .* -o .*/iperf_%s.out\"' % (flowid)
+ print killcmd
+ print cmd
+ os.popen(killcmd)
+ os.popen(cmd)
+
+if __name__ == "__main__":
+ if len(sys.argv) != 8:
+ print len(sys.argv)
+ usage()
+
+ main()