from subprocess import call
from subprocess import check_output
+def addController(sw, ip):
+ call(['ovs-vsctl', 'set-controller', sw, 'tcp:%s:6653' % ip ])
+
def addSwitch(net, name, dpid=None):
switch = net.addSwitch(name, dpid=dpid)
return switch
net = Mininet(controller=None,
autoSetMacs=True,
listenPort=6634)
- net.addController('c0', controller=RemoteController,
- ip=contIP, port=6653)
swobjs = {}
swports = {}
for sw in switches:
setOFVersion(sw['name'])
+ addController(sw['name'], contIP)
return net
except Exception, e: