diff --git a/mininet/net.py b/mininet/net.py index f9e8ea52316627aa6d7f67ff1afac2cfbd5bba9f..41afd4c0a53581e45c661573f6076b45216cf8ae 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -522,7 +522,7 @@ def interact(self): class MininetCLI(object): '''Simple command-line interface to talk to nodes.''' 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): self.mn = mininet @@ -596,6 +596,11 @@ def intfs(self, args): for dpid, node in self.mn.nodes.iteritems(): 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): '''Read and execute commands.''' lg.warn('*** Starting CLI:\n')