MCPcopy Create free account
hub / github.com/mininet/mininet / cmd

Method cmd

mininet/node.py:379–390  ·  view source on GitHub ↗

Send a command, wait for output, and return it. cmd: string

( self, *args, **kwargs )

Source from the content-addressed store, hash-verified

377 return output
378
379 def cmd( self, *args, **kwargs ):
380 """Send a command, wait for output, and return it.
381 cmd: string"""
382 verbose = kwargs.get( 'verbose', False )
383 log = info if verbose else debug
384 log( '*** %s : %s\n' % ( self.name, args ) )
385 if self.shell:
386 self.sendCmd( *args, **kwargs )
387 return self.waitOutput( verbose )
388 else:
389 warn( '(%s exited - ignoring cmd%s)\n' % ( self, args ) )
390 return None
391
392 def cmdPrint( self, *args):
393 """Call cmd and printing its output

Callers 15

startShellMethod · 0.95
mountPrivateDirsMethod · 0.95
unmountPrivateDirsMethod · 0.95
cmdPrintMethod · 0.95
setARPMethod · 0.95
setHostRouteMethod · 0.95
setDefaultRouteMethod · 0.95
configMethod · 0.95
connectToRootNSFunction · 0.95
scratchNetFunction · 0.95
scratchNetUserFunction · 0.95
dpctlMethod · 0.45

Calls 4

sendCmdMethod · 0.95
waitOutputMethod · 0.95
logFunction · 0.85
getMethod · 0.45

Tested by 2

ifconfigTestFunction · 0.36
testExternalPingMethod · 0.36