diff options
author | Yuichi Ito <ito.yuichi0@gmail.com> | 2014-06-23 14:43:30 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-23 17:10:25 +0900 |
commit | 76da336bd5d09dbc6efd593712f1b6dbd1c8f85a (patch) | |
tree | f11545a8f06a325c74f6964a8c5ed8758492e178 | |
parent | 2d173ad25c074470284c1cf31e4e64d56ec41e94 (diff) |
sw test tool: run_mininet: support Open vSwitch with OpenFlow 1.4
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 <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rwxr-xr-x | ryu/tests/switch/run_mininet.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ryu/tests/switch/run_mininet.py b/ryu/tests/switch/run_mininet.py index 9dce788d..333efcbe 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) |