Skip to content
Snippets Groups Projects
Commit cfb6bf95 authored by Brian O'Connor's avatar Brian O'Connor
Browse files

adding commandline args to UserSwitch in controlnet, examples of partial

parent 39058432
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@
control and data networks from a single CLI.
"""
from functools import partial
from mininet.net import Mininet
from mininet.node import Controller, UserSwitch
from mininet.cli import CLI
......@@ -124,7 +126,8 @@ def run():
info( '* Creating Data Network\n' )
topo = TreeTopo( depth=2, fanout=2 )
# UserSwitch so we can easily test failover
net = Mininet( topo=topo, switch=UserSwitch, controller=None )
sw = partial( UserSwitch, opts='--inactivity-probe=1 --max-backoff=1' )
net = Mininet( topo=topo, switch=sw, controller=None )
info( '* Adding Controllers to Data Network\n' )
for host in cnet.hosts:
if isinstance(host, Controller):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment