diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-02-22 13:29:50 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-27 20:40:07 +0900 |
commit | f2bb13dbb5fe04420db86465b7effbd78f549319 (patch) | |
tree | 6e4e195b654e599316fde330313bbf5cb6082418 | |
parent | 6b10a3b45a8507a54b69317cea25e267f11138bd (diff) |
run_mininet: Adopt utility methods of Mininet class
Currently, run_mininet uses low level APIs of mininet.
This patch fixes to use utility methods of Mininet class.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rwxr-xr-x | ryu/tests/switch/run_mininet.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ryu/tests/switch/run_mininet.py b/ryu/tests/switch/run_mininet.py index 3a8c6aee..1f94d6e7 100755 --- a/ryu/tests/switch/run_mininet.py +++ b/ryu/tests/switch/run_mininet.py @@ -4,11 +4,9 @@ import sys from mininet.cli import CLI from mininet.net import Mininet -from mininet.link import Link from mininet.node import RemoteController from mininet.node import OVSSwitch from mininet.node import UserSwitch -from mininet.term import makeTerm from oslo_config import cfg from ryu import version @@ -37,14 +35,11 @@ if '__main__' == __name__: s1 = net.addSwitch('s1') s2 = net.addSwitch('s2') - Link(s1, s2) - Link(s1, s2) - Link(s1, s2) + net.addLink(s1, s2) + net.addLink(s1, s2) + net.addLink(s1, s2) - net.build() - c0.start() - s1.start([c0]) - s2.start([c0]) + net.start() if conf.switch == 'ovs': s1.cmd('ovs-vsctl set Bridge s1 protocols=%s' % conf.protocols) |