Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
cfb6bf95
Commit
cfb6bf95
authored
11 years ago
by
Brian O'Connor
Browse files
Options
Downloads
Patches
Plain Diff
adding commandline args to UserSwitch in controlnet, examples of partial
parent
39058432
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/controlnet.py
+4
-1
4 additions, 1 deletion
examples/controlnet.py
with
4 additions
and
1 deletion
examples/controlnet.py
+
4
−
1
View file @
cfb6bf95
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment