usage)

  to use Open vSwitch with OpenFlow 1.4:
    sudo ryu/tests/switch/run_mininet.py --swtich ovs14

  to use Open vSwitch with OpenFlow 1.3:
    sudo ryu/tests/switch/run_mininet.py --switch ovs13
      or
    sudo ryu/tests/switch/run_mininet.py --switch ovs
      or
    sudo ryu/tests/switch/run_mininet.py

Signed-off-by: Yuichi Ito <[email protected]>
---
 ryu/tests/switch/run_mininet.py |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ryu/tests/switch/run_mininet.py b/ryu/tests/switch/run_mininet.py
index 9dce788..333efcb 100755
--- a/ryu/tests/switch/run_mininet.py
+++ b/ryu/tests/switch/run_mininet.py
@@ -16,13 +16,15 @@ from ryu import version
 if '__main__' == __name__:

     opts = [
-        cfg.StrOpt('switch', default='ovs', help='test switch (ovs|cpqd)')
+        cfg.StrOpt('switch', default='ovs',
+                   help='test switch (ovs|ovs13|ovs14|cpqd)')
     ]
     conf = cfg.ConfigOpts()
     conf.register_cli_opts(opts)
     conf(project='ryu', version='run_mininet.py %s' % version)
     conf(sys.argv[1:])
-    switch_type = {'ovs': OVSSwitch, 'cpqd': UserSwitch}
+    switch_type = {'ovs': OVSSwitch, 'ovs13': OVSSwitch,
+                   'ovs14': OVSSwitch, 'cpqd': UserSwitch}
     switch = switch_type.get(conf.switch)
     if switch is None:
         raise ValueError('Invalid switch type. [%s]', conf.switch)
@@ -43,9 +45,12 @@ if '__main__' == __name__:
     s1.start([c0])
     s2.start([c0])

-    if conf.switch == 'ovs':
+    if conf.switch in ['ovs', 'ovs13']:
         s1.cmd('ovs-vsctl set Bridge s1 protocols=OpenFlow13')
         s2.cmd('ovs-vsctl set Bridge s2 protocols=OpenFlow13')
+    elif conf.switch == 'ovs14':
+        s1.cmd('ovs-vsctl set Bridge s1 protocols=OpenFlow14')
+        s2.cmd('ovs-vsctl set Bridge s2 protocols=OpenFlow14')

     CLI(net)

--
1.7.10.4


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to