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
78606a35
Commit
78606a35
authored
13 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused param in add_link.
parent
1dd3de0d
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
+6
-6
6 additions, 6 deletions
mininet/topo.py
with
6 additions
and
6 deletions
mininet/topo.py
+
6
−
6
View file @
78606a35
...
...
@@ -62,8 +62,8 @@ def add_switch(self, name, **opts):
result
=
self
.
add_node
(
name
,
is_switch
=
True
,
**
opts
)
return
result
def
add_link
(
self
,
node1
,
node2
,
port1
=
None
,
port2
=
None
,
*
default
,
**
opts
):
def
add_link
(
self
,
node1
,
node2
,
port1
=
None
,
port2
=
None
,
**
opts
):
"""
node1, node2: nodes to link together
port1, port2: ports (optional)
opts: link options (optional)
...
...
@@ -147,7 +147,7 @@ def linkInfo( self, src, dst ):
"
Return link metadata
"
src
,
dst
=
self
.
sorted
([
src
,
dst
])
return
self
.
link_info
[(
src
,
dst
)]
def
nodeInfo
(
self
,
name
):
"
Return metadata (dict) for node
"
info
=
self
.
node_info
[
name
]
...
...
@@ -181,7 +181,7 @@ def __init__(self, k=2, **opts):
self
.
add_link
(
host
,
switch
)
class
SingleSwitchReversedTopo
(
SingleSwitch
Topo
):
class
SingleSwitchReversedTopo
(
Topo
):
'''
Single switch connected to k hosts, with reversed ports.
The lowest-numbered host is connected to the highest-numbered port.
...
...
@@ -194,12 +194,12 @@ def __init__(self, k=2, **opts):
@param k number of hosts
@param enable_all enables all nodes and switches?
'''
super
(
SingleSwitchTopo
,
self
).
__init__
(
**
opts
)
super
(
SingleSwitch
Reversed
Topo
,
self
).
__init__
(
**
opts
)
self
.
k
=
k
switch
=
self
.
add_switch
(
'
s1
'
)
for
h
in
irange
(
1
,
k
):
host
=
self
.
add_host
(
'
h%s
'
%
h
)
self
.
add_link
(
host
,
switch
,
self
.
add_link
(
host
,
switch
,
port1
=
0
,
port2
=
(
k
-
h
+
1
))
class
LinearTopo
(
Topo
):
...
...
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