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
41badb96
Commit
41badb96
authored
14 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Pass code check.
parent
45e82d09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/tree1024.py
+1
-1
1 addition, 1 deletion
examples/tree1024.py
examples/treeping64.py
+9
-8
9 additions, 8 deletions
examples/treeping64.py
mininet/log.py
+3
-3
3 additions, 3 deletions
mininet/log.py
with
13 additions
and
12 deletions
examples/tree1024.py
+
1
−
1
View file @
41badb96
...
...
@@ -17,7 +17,7 @@ def TreeNet( depth=1, fanout=2, **kwargs ):
"
Convenience function for creating tree networks.
"
topo
=
TreeTopo
(
depth
,
fanout
)
return
Mininet
(
topo
,
**
kwargs
)
if
__name__
==
'
__main__
'
:
setLogLevel
(
'
info
'
)
init
()
...
...
This diff is collapsed.
Click to expand it.
examples/treeping64.py
+
9
−
8
View file @
41badb96
#!/usr/bin/python
"
Create a 64-node tree network, and test connectivity using ping.
"
from
mininet.cli
import
CLI
from
mininet.log
import
setLogLevel
from
mininet.net
import
init
,
Mininet
from
mininet.node
import
KernelSwitch
,
UserSwitch
,
OVSKernelSwitch
...
...
@@ -12,8 +11,10 @@ def TreeNet( depth=1, fanout=2, **kwargs ):
"
Convenience function for creating tree networks.
"
topo
=
TreeTopo
(
depth
,
fanout
)
return
Mininet
(
topo
,
**
kwargs
)
def
treePing64
():
"
Run ping test on 64-node tree networks.
"
results
=
{}
switches
=
{
'
reference kernel
'
:
KernelSwitch
,
'
reference user
'
:
UserSwitch
,
...
...
@@ -26,13 +27,13 @@ def treePing64():
result
=
network
.
run
(
network
.
pingAll
)
results
[
name
]
=
result
print
print
print
"
*** Tree network ping results:
"
for
name
in
switches
.
keys
():
print
"
%s: %d%% packet loss
"
%
(
name
,
results
[
name
]
)
print
if
__name__
==
'
__main__
'
:
setLogLevel
(
'
info
'
)
init
()
treePing64
()
\ No newline at end of file
setLogLevel
(
'
info
'
)
init
()
treePing64
()
This diff is collapsed.
Click to expand it.
mininet/log.py
+
3
−
3
View file @
41badb96
...
...
@@ -170,9 +170,9 @@ def newfn( *args ):
setattr
(
newfn
,
'
__doc__
'
,
fn
.
__doc__
)
return
newfn
info
,
output
,
warn
,
error
,
debug
=
(
lg
.
info
,
lg
.
output
,
lg
.
warn
,
lg
.
error
,
lg
.
debug
)
=
[
makeListCompatible
(
f
)
for
f
in
info
,
output
,
warn
,
error
,
debug
=
(
lg
.
info
,
lg
.
output
,
lg
.
warn
,
lg
.
error
,
lg
.
debug
)
=
[
makeListCompatible
(
f
)
for
f
in
lg
.
info
,
lg
.
output
,
lg
.
warn
,
lg
.
error
,
lg
.
debug
]
setLogLevel
=
lg
.
setLogLevel
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