Multihost command support for mininet CLI #614

Open
wants to merge 2 commits into
from

Projects

None yet

2 participants

@fetzerms
fetzerms commented Apr 13, 2016 edited

This patch adds the possiblity to execute commands on multiple hosts using one command. This is similar to the existing scheme, for single hosts like: . For example: "h1 uptime".

This patch allows to specific ranges and lists of hosts. See the examples below:

Using a range:

mininet> h[1-2] uptime
*** Executing command on node: h1
 16:49:47 up  2:05,  7 users,  load average: 0.56, 0.48, 0.58
*** Executing command on node: h2
 16:49:47 up  2:05,  7 users,  load average: 0.56, 0.48, 0.58

Using a comma seperated list:

mininet> h[1,2] uptime
*** Executing command on node: h1
 16:50:42 up  2:06,  7 users,  load average: 0.50, 0.48, 0.58
*** Executing command on node: h2
 16:50:42 up  2:06,  7 users,  load average: 0.50, 0.48, 0.58

Using a combination of both:

mininet> h[1,3-4] uptime
*** Executing command on node: h1
 16:51:28 up  2:07,  7 users,  load average: 0.27, 0.42, 0.55
*** Executing command on node: h3
 16:51:28 up  2:07,  7 users,  load average: 0.27, 0.42, 0.55
*** Executing command on node: h4
 16:51:28 up  2:07,  7 users,  load average: 0.27, 0.42, 0.55

I tested this during the experiments of my thesis with up to 100 hosts, and it worked flawless there. If the pull request has a chance to be accepted, I can update the documentation as well.

Any comments or suggestions are welcome.

fetzerms added some commits Mar 25, 2016
@fetzerms fetzerms Added multi host support. 7aabade
@fetzerms fetzerms Squashed commit of the following:
commit b97cec1
Author: Matthias Fetzer <matthias@fetzerms.de>
Date:   Wed Apr 13 16:41:02 2016 +0200

    Fixes.
9ca53c0
@fetzerms
fetzerms commented Jun 3, 2016

Any comments on this one? Any special fixes / updates needed to be accepted?

@fetzerms

Is this PR worth updating, or won't it be merged/considered anyways?

@lantz
Member
lantz commented Jan 20, 2017

I actually like this feature - it seems useful and consistent with the mininet idea of "one console to rule them all."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment