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
cac98f5f
Commit
cac98f5f
authored
10 years ago
by
cody burkard
Browse files
Options
Downloads
Patches
Plain Diff
add cli usage information
parent
098bede0
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/cli.py
+20
-10
20 additions, 10 deletions
mininet/cli.py
with
20 additions
and
10 deletions
mininet/cli.py
+
20
−
10
View file @
cac98f5f
...
...
@@ -137,7 +137,8 @@ def do_net( self, _line ):
dumpNodeConnections
(
self
.
mn
.
values
()
)
def
do_sh
(
self
,
line
):
"
Run an external shell command
"
"""
Run an external shell command
Usage: sh [cmd args]
"""
call
(
line
,
shell
=
True
)
# do_py() and do_px() need to catch any exception during eval()/exec()
...
...
@@ -187,7 +188,8 @@ def do_pingpairfull( self, _line ):
self
.
mn
.
pingPairFull
()
def
do_iperf
(
self
,
line
):
"
Simple iperf TCP test between two (optionally specified) hosts.
"
"""
Simple iperf TCP test between two (optionally specified) hosts.
Usage: iperf node1 node2
"""
args
=
line
.
split
()
if
not
args
:
self
.
mn
.
iperf
()
...
...
@@ -206,7 +208,8 @@ def do_iperf( self, line ):
error
(
'
invalid number of args: iperf src dst
\n
'
)
def
do_iperfudp
(
self
,
line
):
"
Simple iperf UDP test between two (optionally specified) hosts.
"
"""
Simple iperf UDP test between two (optionally specified) hosts.
Usage: iperfudp bw node1 node2
"""
args
=
line
.
split
()
if
not
args
:
self
.
mn
.
iperf
(
l4Type
=
'
UDP
'
)
...
...
@@ -238,7 +241,8 @@ def do_dump( self, _line ):
output
(
'
%s
\n
'
%
repr
(
node
)
)
def
do_link
(
self
,
line
):
"
Bring link(s) between two nodes up or down.
"
"""
Bring link(s) between two nodes up or down.
Usage: link node1 node2 [up/down]
"""
args
=
line
.
split
()
if
len
(
args
)
!=
3
:
error
(
'
invalid number of args: link end1 end2 [up down]
\n
'
)
...
...
@@ -248,7 +252,8 @@ def do_link( self, line ):
self
.
mn
.
configLinkStatus
(
*
args
)
def
do_xterm
(
self
,
line
,
term
=
'
xterm
'
):
"
Spawn xterm(s) for the given node(s).
"
"""
Spawn xterm(s) for the given node(s).
Usage: xterm node1 node2 ...
"""
args
=
line
.
split
()
if
not
args
:
error
(
'
usage: %s node1 node2 ...
\n
'
%
term
)
...
...
@@ -262,7 +267,8 @@ def do_xterm( self, line, term='xterm' ):
def
do_x
(
self
,
line
):
"""
Create an X11 tunnel to the given node,
optionally starting a client.
"""
optionally starting a client.
Usage: x node [cmd args]
"""
args
=
line
.
split
()
if
not
args
:
error
(
'
usage: x node [cmd args]...
\n
'
)
...
...
@@ -272,7 +278,8 @@ def do_x( self, line ):
self
.
mn
.
terms
+=
runX11
(
node
,
cmd
)
def
do_gterm
(
self
,
line
):
"
Spawn gnome-terminal(s) for the given node(s).
"
"""
Spawn gnome-terminal(s) for the given node(s).
Usage: gterm node1 node2 ...
"""
self
.
do_xterm
(
line
,
term
=
'
gterm
'
)
def
do_exit
(
self
,
_line
):
...
...
@@ -293,7 +300,8 @@ def isatty( self ):
return
isatty
(
self
.
stdin
.
fileno
()
)
def
do_noecho
(
self
,
line
):
"
Run an interactive command with echoing turned off.
"
"""
Run an interactive command with echoing turned off.
Usage: noecho [cmd args]
"""
if
self
.
isatty
():
quietRun
(
'
stty -echo
'
)
self
.
default
(
line
)
...
...
@@ -301,7 +309,8 @@ def do_noecho( self, line ):
quietRun
(
'
stty echo
'
)
def
do_source
(
self
,
line
):
"
Read commands from an input file.
"
"""
Read commands from an input file.
Usage: source <file>
"""
args
=
line
.
split
()
if
len
(
args
)
!=
1
:
error
(
'
usage: source <file>
\n
'
)
...
...
@@ -320,7 +329,8 @@ def do_source( self, line ):
self
.
inputFile
=
None
def
do_dpctl
(
self
,
line
):
"
Run dpctl (or ovs-ofctl) command on all switches.
"
"""
Run dpctl (or ovs-ofctl) command on all switches.
Usage: dpctl command [arg1] [arg2] ...
"""
args
=
line
.
split
()
if
len
(
args
)
<
1
:
error
(
'
usage: dpctl command [arg1] [arg2] ...
\n
'
)
...
...
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