Statistics
| Branch: | Tag: | Revision:

mininet / mininet / util.py @ master

History | View | Annotate | Download (21 KB)

# Date Author Comment
4da7b3b7 03/18/2015 10:31 PM Bob Lantz

Fix exception for unknown class

a23c6a28 03/18/2015 10:10 PM Bob Lantz

Fix undefined constructors in customClass()

f6f6d928 03/14/2015 04:17 AM Bob Lantz

CustomConstructor -> CustomClass, which calls specialClass

specialClass is an analog of functools.partial but for classes.
We can now use it instead of partial() in mn, so that Mininet
can introspect on the actual base class.

Fixes #488

f77a8b9e 02/04/2015 06:56 PM Bob Lantz

Fix customConstructor to work correctly with newargs

74c3511d 02/04/2015 01:27 PM Bob Lantz

pass code check

6a38811f 02/04/2015 12:44 PM Bob Lantz

Clarify makeIntfPair behavior and pass code check

b2fe0778 02/04/2015 05:44 AM Bob Lantz

Change iperf() to use waitListening()

a4e93368 01/29/2015 08:26 AM Bob Lantz

Set batch=False in OVSSwitch for low-level API

If you try to use the low-level API, you are probably
not going to call batchStartup()! So, we set batch=False
by default. This means that buildFromTopo() needs to set
it to True, so we add a bit of irritatingly complex machinery...

254fae2d 01/27/2015 11:23 PM Bob Lantz

Clarify which intf pair failed and raise exception

30ebb852 01/26/2015 10:06 PM Bob Lantz

errRun: add debug( results )

959586bc 01/26/2015 10:06 PM Bob Lantz

Add debug(cmd) to errRun()

98a8231c 01/24/2015 12:43 AM Bob Lantz

Exit poll loop on POLLHUP or anything unexpected

In my opinion, we really shouldn't even get POLLHUP, but
we do. In case we get anything else odd, quite polling on
that fd.

28ce13d1 01/24/2015 12:41 AM Bob Lantz

Fix polling in errRun

It's tricky to get this right, but basically we want to read
if there is something to read; if not, we want to check for
EOF.

7a4a865b 01/15/2015 10:07 AM Bob Lantz

customize makeIntfPair to eliminate fastIntfPair

7a3159c9 12/08/2014 11:10 PM Bob Lantz

Spacing tweaks for pep8 checker

342d47cf 12/04/2014 04:56 PM Bob Lantz

call to run() should be to runCmd()

061598f0 12/04/2014 04:21 PM Bob Lantz

Change from numeric to symbolic pylint error codes

18aab5b7 12/04/2014 08:51 AM Bob Lantz

More pylint changes

b1ec912d 12/03/2014 07:00 AM Bob Lantz

Fixing pylint errors

c273f490 11/23/2014 07:06 PM Bob Lantz

type( foo ) is bar -> isinstance( foo, bar )

9a8bdfd7 11/23/2014 06:59 PM Bob Lantz

use isinstance( obj, basestring) to allow unicode strings

fixes #448

94f088d7 10/28/2014 11:06 PM Bob Lantz

Allow natural sort to accept non-strings.

7c5d2771 10/03/2014 11:52 AM cody burkard

wait for sshd to start in example

f8e98d6a 09/30/2014 01:50 AM Bob Lantz

Merge branch 'patches/fix_sshd' of https://github.com/cdburkard/mininet into cdburkard-patches/fix_sshd

a565bdd5 09/27/2014 11:30 AM cody burkard

fix popen to work with shell

cf5bbd59 09/27/2014 11:30 AM cody burkard

promote waitListening to util.py

55ef99b6 09/21/2014 07:13 AM Brian O'Connor

Merge pull request #379 from cdburkard/devel/show_ports

adding 'ports' command to cli

08643fe6 09/15/2014 10:33 PM cody burkard

adding 'ports' command to cli

c265deed 09/05/2014 06:07 AM Bob Lantz

Cluster edition prototype: remote nodes and links.

We add a new experimental feature to allow Mininet to run across
a cluster of machines. This is currently implemented via a set
mix-in classes that provide remote nodes that are implemented
via a connection to a remote shell, and remote links which are...

41a54f05 08/14/2014 12:33 AM cody burkard

adding comments and removing random access spaces

891a9e8b 08/07/2014 12:52 AM cody burkard

fixed syntax error

7ae39fff 08/07/2014 12:51 AM cody burkard

stop using ONLAB OUI for generated mac addressses

42cdda38 08/01/2014 06:27 PM cody burkard

added some documentation

a3d51b77 08/01/2014 06:00 PM cody burkard

few small fixes to syntax errors

4b65110e 08/01/2014 06:00 PM cody burkard

removed comments and cleaned up code.

eba13f0c 08/01/2014 06:00 PM cody burkard

removed many of the commands being run to maximize startup performance

c1934706 08/01/2014 06:00 PM cody burkard

testing link stuff

68e2e45f 06/19/2014 11:28 PM Brian O'Connor

Merge pull request #316 from cdburkard:patches/fix_remote_ip

fixed netParse bug that caused mininet crash when no ip prefix was specified

b3055067 06/11/2014 01:38 AM Cody Burkard

fixed netParse bug that caused mininet crash when no ip prefix was specified

d82900d3 03/07/2014 01:52 AM Bob Lantz

Don't look through all interfaces if you don't need to.

2e704f99 01/23/2014 09:39 PM Andrew Ferguson

print error messages when making interfaces

without this, thereis no indication in Mininet that creating an
interface has failed. for example, this may happen when the interface
name is too long (longer than IFNAMSIZ, which is 16 chars).

8e1dade1 09/13/2013 08:06 PM Brian O'Connor

removing assert from util.py

4ea0c093 09/12/2013 08:49 PM Brian O'Connor

Updated mininet/util.py to support better resource setting semantics and protected with try block

b635fd9e 08/15/2013 12:29 AM Brian O'Connor

Some cleanup and style fixes for fixlimits

867a6d67 08/14/2013 10:04 PM Brian O'Connor

Cleaned up sysctl and rlimit test and set
Use files instead of sysctl to set limits

b20c9470 08/12/2013 11:22 PM Brian O'Connor

add sysctl test and set
fixes #184

433ca2ec 07/13/2013 08:31 PM Piyush Srivastava

Fix issue with mountCgroups not recognizing mounted cgroup

Changed mountCgroups to use the file /proc/mounts (instead of the
current case where it uses the less reliable
(http://www.mail-archive.com/lxc-devel@lists.sourceforge.net/msg00455.html)
/etc/mtab thorugh the mount program

5fae96eb 06/03/2013 10:37 PM Bob Lantz

Change to only split once so that cargs='--foo=1 --bar=2' works.
fixes #144

c771b2d7 03/24/2013 11:14 PM Bob Lantz

Add source node option to moveIntf() (note: low-level API!!)
In the future we may wish to enable moving interfaces across
nodes which are not in the root NS, and this would provide
the low-level mechanism to do so.
closes #122

8204a1b6 03/13/2013 11:16 PM Bob Lantz

fix --ipbase: fix ipAdd() and remove unused default from ipStr()

31fe4f1b 03/07/2013 01:26 AM Bob Lantz

Fix pmonitor() to not return blank lines on EOF
fixes #109 (hopefully)

ab594b6a 11/16/2012 06:54 AM Bob Lantz

Merge branch '2.0dev' into 2.0merge

Conflicts:
.gitignore
.pylint
examples/miniedit.py
mininet/node.py
mininet/util.py
util/install.sh
util/vm/install-mininet-vm.sh

bcfb3009 11/14/2012 05:32 AM Brandon Heller

small refactor: put function to ensure root in util

Two benefits:
- One place to change if in the future, a more granular method of
root access is used (like the BigSwitch patch).
- Makes this reusable by stuff like examples/baresshd.py that use
the low-level Mininet API.

8a1264e2 11/14/2012 04:53 AM Brandon Heller

Fix 'cgroups not mounted' error in U12.10

'mount' shows something slightly different in Ubuntu 12.10:

cgroup on /sys/fs/cgroup type tmpfs (rw,uid=0,gid=0,mode=0755)

Note the lack of a plural on first word cgroup, which has changed.

Still mounted at /sys/fs/cgroup, so check for both possibilities...

edf60032 11/14/2012 12:59 AM Brandon Heller

pep8: fix E128 continuation line under-indented errors

I wasn't sure this was worth fixing at first, but it does look more readable
now.

7a506047 11/13/2012 10:46 PM Brandon Heller

pep8: Fix E711, comparisons to None should use 'is' or 'is not'

Lengthy discussion of why this is a good thing (I didn't know) at SO:

http://stackoverflow.com/questions/2209755/python-operation-vs-is-not

1052f8a0 11/13/2012 10:36 PM Brandon Heller

pep8: Fix E271/E272, spaces before/after keyword

4b1dc93b 10/30/2012 11:58 PM Bob Lantz

Avoid modifying keyword parameter dictionary in customized()

22b8e5e4 10/30/2012 11:45 PM Bob Lantz

Add custom name to customized functions.

Note: we could probably use functools.partial.

28c2cdc2 07/07/2012 06:30 AM Bob Lantz

Workaround for openvswitch_mod rename and pass code check.

928c0761 05/30/2012 07:08 AM Brandon Heller

Move code from mn into mininet/util to enable reuse

Any code in mn is not usable by other Python code.

Hence, move this code into util, so other scripts can use it.

6e64deec 05/13/2012 10:29 PM Bob Lantz

Fix typo.

e8d60e0f 05/11/2012 05:37 AM Bob Lantz

Pass code check.

cfd38113 05/10/2012 05:59 AM Bob Lantz

Fix errRun to not exit until all of stdout and stderr have been read.

50cebe67 04/14/2012 12:42 AM Bob Lantz

Add pmonitor() to make it easy to monitor popen objects.

149a1f56 04/09/2012 03:49 AM Bob Lantz

Apparently errRun isn't as flexible as I thought...

a7648e78 04/09/2012 03:49 AM Bob Lantz

Add mountCgroups() and tweak/correct fixLimits()

beb05a71 03/24/2012 01:17 AM Bob Lantz

Move dumpNetConnections to util() because it's useful!

a5af91d0 03/23/2012 02:08 AM Bob Lantz

Have errFail report cmd and stderr as well as exit code.

5a8bb489 03/20/2012 07:17 AM Bob Lantz

Attempt at revised/simplified topo class:

- keys are strings
- metadata is simply a dict
- buildFromTopo greatly simplified

28f46c8d 03/12/2012 11:12 PM Bob Lantz

Pass code check.

14ff3ad3 03/11/2012 04:44 AM Bob Lantz

Fix codecheck and MininetWithControlNet.

82f483f5 03/10/2012 01:44 AM Bob Lantz

Add support for specifying host IP range with --ipbase.

a49c85a6 03/10/2012 12:06 AM Bob Lantz

Fix examples to work with new API (and vice-versa.)

d8c88bed 03/07/2012 07:49 AM Bob Lantz

Add custom() function for customizing constructors.

551a3666 03/05/2012 11:01 PM Bob Lantz

Tweak errRun; add errFail and numCores.

134a75ef 03/02/2012 11:43 PM Bob Lantz

Fix pylint complaint and add natural sort key function.

daa576c4 02/10/2012 10:59 PM Bob Lantz

Add errRun to run a command with stderr, stdout, return code and monitoring.

82b72072 05/06/2010 11:24 PM Bob Lantz

Pass pylint.

8bc00379 04/23/2010 12:05 AM Bob Lantz

Fixed link check and updated quietRun interface.

Link check wasn't quite right - e.g. 'eth1' could be found in
'eth10' previously.

Updated quietRun to allow passing in args directly rather than
as a list.

bcacfc05 03/14/2010 02:23 AM Bob Lantz

Support for control-C. Finally.

I've changed the way things work a bit:

1. netns is replaced by mnexec, a general-purpose mininet helper.

2. For interactive commands, we now use mnexec -p, which prints out
the pid, so we can kill it when someone hits control-C!...

740d7ce3 03/13/2010 12:17 AM Bob Lantz

Added newline at EOF.

d44a5843 03/10/2010 05:48 AM Bob Lantz

Reinstantiated inNamespace and routed control network.

We need to figure out how to specify the IP addresses for the
routed control network. For now I'm going back to 192.168.12x.y

Also changed controller params to use IP strings rather than
numbers. However, we still need to clarify what ControllerParams...

80be5642 03/08/2010 11:32 PM Bob Lantz

Removed underscores for public Node methods. Minor cleanup & comments.

bb941950 03/05/2010 05:29 AM Brandon Heller

Add flexible topology input parsing

Now you can pass a topology name followed by params. For example, to
create a switch with 3 hosts:

sudo mn --topo single,3
efc9a01c 03/03/2010 09:52 PM Bob Lantz

Moved link creation into Node.addIntf() and fixed util:CreateLink().

Also tweaked cmd/cmdPrint to make them more beautiful and functional,
and a few other minor changes, such as using a new idiom for verbose.

These changes support reinstating the examples.

e85f8bdf 02/06/2010 01:22 AM Bob Lantz

Removed hash-bang in module files which aren't executed directly,
with the exception of topo.py, which I haven't touched.

7d4b7b7f 02/06/2010 01:18 AM Bob Lantz

Comment tweaks and additions.

281f6e59 02/06/2010 12:42 AM Bob Lantz

Minor changes to get 'make test' to pass.

- some namespace conflicts due to unpep8
- fixed infinite recursion caused by removing redundant makeIntfPair

80a8fa62 02/05/2010 10:33 AM Bob Lantz

First crack at restoring mininet python style, assisted by handy
'unpep8' script, which does most of the work.

- topo.py is still in pep8
- not all examples work, but this is due to other issues

0df8b195 02/03/2010 11:38 PM Bob Lantz

Renamed logging_mod.py -> log.py

Updated other files accordingly.

723d068c 01/10/2010 01:59 AM Brandon Heller

Add static code checking for style and errors

This required a change to logging, which now uses a singleton pattern.

For all future checkins, 'make codecheck' should pass.

376bcba4 01/03/2010 05:16 PM Brandon Heller

Add options for auto MAC and ARP setup.

Auto MAC setup sets each host MAC equal to its DPID, which simplifies
debugging.

Auto ARP setup removes the need for broadcast support for ARP, which
enables a smaller NOX controller.

ac65ea3f 01/03/2010 10:43 AM Brandon Heller

Increase createLink retry count

Was seeing occasional errors with tests run back-to-back.

54037995 01/01/2010 11:16 AM Brandon Heller

Add MAC auto set for switches

Also use indexing for DPIDs to avoid zeroed MAC

e3621eb0 12/26/2009 03:40 PM Brandon Heller

Move fixLimits function to util

220890a0 12/20/2009 05:32 PM Brandon Heller

Move utility functions out of mininet.py

Having a file with the same name as its package creates hard-to-diagnose
import error, so rename mininet.py to net.py. This commit moves utility
functions, generally those dealing with network namespaces and interface...