X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=util%2FtestOfOverlay%2Fmininet_gbp.py;fp=util%2FtestOfOverlay%2Fmininet_gbp.py;h=adfcb51a1d1466f91f2979f50b1c2f0417193c93;hb=ee8c7d64152ab2ce838b069eb817bea6ad9c0c7d;hp=69b1123c946e942f9501d98c7d6b74d4eff70e7f;hpb=187df05e66b4af1856374c3ea7cbc9e32ed913d1;p=groupbasedpolicy.git diff --git a/util/testOfOverlay/mininet_gbp.py b/util/testOfOverlay/mininet_gbp.py index 69b1123c9..adfcb51a1 100644 --- a/util/testOfOverlay/mininet_gbp.py +++ b/util/testOfOverlay/mininet_gbp.py @@ -22,7 +22,7 @@ def addHost(net, switch, name, ip, mac): host = net.addHost(name, ip=ip, mac=mac) net.addLink(host, switch) -def setOFVersion(sw, version='OpenFlow13'): +def setOFVersion(sw, version='OpenFlow13,OpenFlow12,OpenFlow10'): call(['ovs-vsctl', 'set', 'bridge', sw, 'protocols={}'.format(version)]) def addTunnel(sw, sourceIp=None): @@ -73,6 +73,14 @@ def startMininet(switches, hosts, contIP='127.0.0.1'): # ODL is very fragile so let's give it some time time.sleep(1) + # This is a workaround for a bug encountered during + # the Helium release. Setting the vSwitch from 1.0 + # to 1.3 while it was connected to the controller + # exposed a bug in the openflowplugin, which resulted + # in the controller missing some of the ports on the + # vswitch. This change avoids the bug by switching + # the version before connecting the switch to the + # controller. for sw in switches: setOFVersion(sw['name']) addController(sw['name'], contIP)