What this patch implements:
This patch implements a script that provides the simple test environment
that includes 2 switches and 2 links for the test tool as follows:
+-----------+
+----------| target sw | The OpenFlow switch to be tested (Open
vSwitch)
| +-----------+
+------------+ (1) (2)
| controller | | |
+------------+ (1) (2)
| +-----------+
+----------| tester sw | OpenFlow Switch (Open vSwitch)
+-----------+
(X) : port number
How to run:
Do the following command:
sudo ryu/tests/switch/run_mininet.py
And then, run the test tool at another terminal:
ryu-manager ryu/tests/switch/tester.py
Signed-off-by: Yuichi Ito <[email protected]>
---
ryu/tests/switch/run_mininet.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100755 ryu/tests/switch/run_mininet.py
diff --git a/ryu/tests/switch/run_mininet.py b/ryu/tests/switch/run_mininet.py
new file mode 100755
index 0000000..40ef399
--- /dev/null
+++ b/ryu/tests/switch/run_mininet.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+
+from mininet.cli import CLI
+from mininet.link import Link
+from mininet.net import Mininet
+from mininet.node import RemoteController
+from mininet.term import makeTerm
+
+if '__main__' == __name__:
+ net = Mininet(controller=RemoteController)
+
+ c0 = net.addController('c0')
+
+ s1 = net.addSwitch('s1')
+ s2 = net.addSwitch('s2')
+
+ Link(s1, s2)
+ Link(s1, s2)
+
+ net.build()
+ c0.start()
+ s1.start([c0])
+ s2.start([c0])
+
+ s1.cmd('ovs-vsctl set Bridge s1 protocols=OpenFlow13')
+ s2.cmd('ovs-vsctl set Bridge s2 protocols=OpenFlow13')
+
+ CLI(net)
+
+ net.stop()
--
1.7.10.4
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel