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
b1f90976
Commit
b1f90976
authored
13 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Remove default classes since Mininet() really handles them.
parent
4ac1148e
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
mininet/topo.py
+7
-10
7 additions, 10 deletions
mininet/topo.py
with
7 additions
and
10 deletions
mininet/topo.py
+
7
−
10
View file @
b1f90976
...
...
@@ -18,11 +18,6 @@
from
networkx
import
Graph
from
mininet.node
import
SWITCH_PORT_BASE
,
Host
,
OVSSwitch
# BL: it's hard to figure out how to do this right yet remain flexible
# These classes will be used as the defaults if no class is passed
# into either Topo() or Node()
TopoDefaultNode
=
Host
TopoDefaultSwitch
=
OVSSwitch
class
NodeID
(
object
):
'''
Topo node identifier.
'''
...
...
@@ -81,11 +76,13 @@ def __init__(self, connected=False, admin_on=True,
self
.
power_on
=
power_on
self
.
fault
=
fault
self
.
is_switch
=
is_switch
# Above should be deleted and replaced by the following
# BL: is_switch is a bit annoying if we can just specify
# the node class instead!!
self
.
cls
=
cls
if
cls
else
(
TopoDefaultSwitch
if
is_switch
else
TopoDefaultNode
)
self
.
params
=
params
if
params
else
{}
# BL: Above should mostly be deleted and replaced by the following
# is_switch is a bit annoying if we are already specifying
# a switch class!! Except that if cls is not specified,
# then Mininet() knows whether to create a switch or a host
# node and can call its own constructors...
self
.
cls
=
cls
self
.
params
=
params
class
Edge
(
object
):
...
...
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