CLI: add node dump-all-data command
This commit is contained in:
+6
-1
@@ -522,7 +522,7 @@ class Mininet(object):
|
|||||||
class MininetCLI(object):
|
class MininetCLI(object):
|
||||||
'''Simple command-line interface to talk to nodes.'''
|
'''Simple command-line interface to talk to nodes.'''
|
||||||
cmds = ['?', 'help', 'nodes', 'net', 'sh', 'ping_all', 'exit', \
|
cmds = ['?', 'help', 'nodes', 'net', 'sh', 'ping_all', 'exit', \
|
||||||
'ping_pair', 'iperf', 'iperf_udp', 'intfs']
|
'ping_pair', 'iperf', 'iperf_udp', 'intfs', 'dump']
|
||||||
|
|
||||||
def __init__(self, mininet):
|
def __init__(self, mininet):
|
||||||
self.mn = mininet
|
self.mn = mininet
|
||||||
@@ -596,6 +596,11 @@ class MininetCLI(object):
|
|||||||
for dpid, node in self.mn.nodes.iteritems():
|
for dpid, node in self.mn.nodes.iteritems():
|
||||||
lg.info('%s: %s\n' % (node.name, ' '.join(node.intfs)))
|
lg.info('%s: %s\n' % (node.name, ' '.join(node.intfs)))
|
||||||
|
|
||||||
|
def dump(self, args):
|
||||||
|
'''Dump node info.'''
|
||||||
|
for dpid, node in self.mn.nodes.iteritems():
|
||||||
|
lg.info('%s\n' % node)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
'''Read and execute commands.'''
|
'''Read and execute commands.'''
|
||||||
lg.warn('*** Starting CLI:\n')
|
lg.warn('*** Starting CLI:\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user