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
2235f216
Commit
2235f216
authored
15 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Minor cleanup of mn/net and fixes for CLI.
All commands should work now.
parent
c3a44400
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
bin/mn
+0
-1
0 additions, 1 deletion
bin/mn
mininet/cli.py
+4
-4
4 additions, 4 deletions
mininet/cli.py
mininet/net.py
+1
-1
1 addition, 1 deletion
mininet/net.py
with
5 additions
and
6 deletions
bin/mn
+
0
−
1
View file @
2235f216
...
...
@@ -113,7 +113,6 @@ class MininetRunner( object ):
index
=
sys
.
argv
.
index
(
'
--custom
'
)
if
len
(
sys
.
argv
)
>
index
+
1
:
custom
=
sys
.
argv
[
index
+
1
]
print
"
custom = %s
"
%
custom
self
.
parseCustomFile
(
custom
)
else
:
raise
Exception
(
'
Custom file name not found
'
)
...
...
This diff is collapsed.
Click to expand it.
mininet/cli.py
+
4
−
4
View file @
2235f216
...
...
@@ -47,8 +47,8 @@ class CLI( Cmd ):
def
__init__
(
self
,
mininet
):
self
.
mn
=
mininet
self
.
nodelist
=
self
.
mn
.
hosts
+
self
.
mn
.
switches
+
self
.
mn
.
controllers
self
.
nodemap
=
{}
# map names to Node objects
self
.
nodelist
=
self
.
mn
.
switches
+
self
.
mn
.
hosts
+
self
.
mn
.
controllers
for
node
in
self
.
nodelist
:
self
.
nodemap
[
node
.
name
]
=
node
Cmd
.
__init__
(
self
)
...
...
@@ -91,7 +91,7 @@ def do_net( self, args ):
for
switch
in
self
.
mn
.
switches
:
info
(
'
%s <->
'
,
switch
.
name
)
for
intf
in
switch
.
intfs
:
node
=
switch
.
connection
[
intf
]
node
,
name
=
switch
.
connection
[
intf
]
info
(
'
%s
'
%
node
.
name
)
info
(
'
\n
'
)
...
...
@@ -118,12 +118,12 @@ def do_iperfudp( self, args ):
def
do_intfs
(
self
,
args
):
"
List interfaces.
"
for
node
in
self
.
mn
.
node
s
.
values
()
:
for
node
in
self
.
node
list
:
info
(
'
%s: %s
\n
'
%
(
node
.
name
,
'
'
.
join
(
node
.
intfs
)
)
)
def
do_dump
(
self
,
args
):
"
Dump node info.
"
for
node
in
self
.
mn
.
node
s
.
values
()
:
for
node
in
self
.
node
list
:
info
(
'
%s
\n
'
%
node
)
def
do_exit
(
self
,
args
):
...
...
This diff is collapsed.
Click to expand it.
mininet/net.py
+
1
−
1
View file @
2235f216
...
...
@@ -384,7 +384,7 @@ def stop( self ):
info
(
'
\n
'
)
info
(
'
*** Stopping %i switches
\n
'
%
len
(
self
.
switches
)
)
for
switch
in
self
.
switches
:
info
(
'
%s
'
%
switch
.
name
)
info
(
switch
.
name
)
switch
.
stop
()
info
(
'
\n
'
)
info
(
'
*** Stopping %i controllers
\n
'
%
len
(
self
.
controllers
)
)
...
...
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