Made help string a class var.
This commit is contained in:
+6
-5
@@ -76,9 +76,6 @@ class CLI( Cmd ):
|
|||||||
# must have the same interface
|
# must have the same interface
|
||||||
# pylint: disable-msg=W0613,R0201
|
# pylint: disable-msg=W0613,R0201
|
||||||
|
|
||||||
def do_help( self, args ):
|
|
||||||
"Describe available CLI commands."
|
|
||||||
Cmd.do_help( self, args )
|
|
||||||
helpStr = (
|
helpStr = (
|
||||||
'You may also send a command to a node using:\n'
|
'You may also send a command to a node using:\n'
|
||||||
' <node> command {args}\n'
|
' <node> command {args}\n'
|
||||||
@@ -92,13 +89,17 @@ class CLI( Cmd ):
|
|||||||
'should work.\n'
|
'should work.\n'
|
||||||
'\n'
|
'\n'
|
||||||
'Some character-oriented interactive commands require\n'
|
'Some character-oriented interactive commands require\n'
|
||||||
'noecho, e.g.\n'
|
'noecho:\n'
|
||||||
' mininet> noecho h2 vi foo.py\n'
|
' mininet> noecho h2 vi foo.py\n'
|
||||||
'However, starting up an xterm/gterm is generally better:\n'
|
'However, starting up an xterm/gterm is generally better:\n'
|
||||||
' mininet> xterm h2\n\n'
|
' mininet> xterm h2\n\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def do_help( self, args ):
|
||||||
|
"Describe available CLI commands."
|
||||||
|
Cmd.do_help( self, args )
|
||||||
if args is '':
|
if args is '':
|
||||||
output( helpStr )
|
output( self.helpStr )
|
||||||
|
|
||||||
def do_nodes( self, args ):
|
def do_nodes( self, args ):
|
||||||
"List all nodes."
|
"List all nodes."
|
||||||
|
|||||||
Reference in New Issue
Block a user