Commit Graph
69 Commits
Author SHA1 Message Date
Brandon Heller 8f20b95d56 Auto-install run and clean scripts
Also remove usused imports and outdated doc text.
2010-01-02 02:43:51 -08:00
Brandon Heller a6b473227f Add mn_run.py, a script to run Mininets.
Simplifies launching a Mininet or running tests on one.
2010-01-02 02:42:08 -08:00
Brandon Heller 8b5062a3a1 Move TreeNet to new Mininet API
Also remove all non-object-oriented legacy Mininet code and update
tests.

User-space compatibility is untested, but most of the code for it is
still in.
2009-12-26 14:25:48 -08:00
Brandon Heller e3621eb057 Move fixLimits function to util 2009-12-26 07:40:57 -08:00
Brandon Heller 89bf31030b Move Node functions into their own file
Nodes include Switch, Host, and Controller; move these to a separate
file.

This file still could use some attention to hide private functions.
Node seems like a primary class to extend, for adding stuff like Open
vSwitch, so it could benefit from a simpler interface.
2009-12-20 14:19:32 -08:00
Brandon Heller 4d2d52c3db Remove unused function 2009-12-20 09:46:16 -08:00
Brandon Heller 220890a0c9 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
management, into their own file.

Also fix a few minor formatting bugs and clean up logging code (which
had issues when multiple files would import mininet.logging_mod).
2009-12-20 09:32:43 -08:00
Brandon Heller bc547080b8 Rewrite Ripcord test and most of mininet
Make much of the Mininet code object-oriented around the new Mininet
object, and create a generic way to build a Mininet.

Previously, each network topology was created by Mininet API calls,
which seems much less approachable for new users than passing in a
topology object along with controller, switch, and host classes.

The modified code is all in ripcordtest.py, but will need to replace the
main mininet.py code eventually.

Kernel-space support only, for now.
2009-12-20 04:03:23 -08:00
Brandon Heller 75810224ed Remove verbose command printouts 2009-12-20 03:54:37 -08:00
Brandon Heller 8e63d3cb72 Add missing newline printouts 2009-12-19 19:21:47 -08:00
Brandon Heller fabbac885f Document retry function 2009-12-19 19:21:18 -08:00
Brandon Heller 2e52801de5 Fix IP printing exception 2009-12-19 19:20:53 -08:00
Brandon Heller b426d24e45 Minor documentation 2009-12-19 19:05:09 -08:00
Brandon Heller b6423f8c4d Fix module resolution
Forgot to add __init__.py
2009-12-18 20:36:48 -08:00
Brandon Heller 15f37cc292 Add LinearNet test case 2009-12-18 20:36:48 -08:00
Brandon Heller 7b804ffbae More flexible logging support
Use customized StreamHandler from Python logging module to print
only messages for the specified loglevel to the console.
2009-12-18 20:36:36 -08:00
Brandon Heller 1095628b8a Clean up display
Don't print retry errors by default.
2009-12-18 15:51:30 -08:00
Brandon Heller 7c1d7c9f90 Don't attempt to kill processes twice
Was causing OSErrors because the process to kill no longer existed.
2009-12-18 15:42:13 -08:00
Brandon Heller 345bf7cc29 Reduce interface move delay and make configurable
Much faster now; from 1 s delay to 100 us.
2009-12-18 15:39:14 -08:00
Brandon Heller ff43615ab1 Add example unit tests and Makefile target 2009-12-18 12:15:04 -08:00
Brandon Heller fd99d67c33 Add make clean to remove dist files created by setuptools 2009-12-18 12:12:51 -08:00
Brandon Heller 51270ce4a2 Use setuptools to install python files
Now, to reference mininet files, use 'import mininet.mininet'.

PYTHONPATH mods are no longer required for installation.
2009-12-18 12:12:37 -08:00
Brandon Heller cd27f9db57 Start controller with verbose by default 2009-12-18 12:11:25 -08:00
Brandon Heller ede34b6a4d Add missing function import 2009-12-18 12:10:35 -08:00
Bob Lantz 40580731cd Added simple all-to-all UDP bandwidth test. 2009-12-17 16:31:42 -08:00
Bob Lantz 9bb15c76e9 Added missing value (60) in list. ;-) 2009-12-17 16:31:14 -08:00
Bob Lantz b7640209a8 Changed to use class vars and method to track nodes.
Useful for monitoring the output of a set of nodes.
2009-12-17 16:30:40 -08:00
Bob Lantz 1417fe7283 Changed cleanup to do fast things first. 2009-12-17 16:29:55 -08:00
Bob Lantz 7df36e476e Changed linearbandwidth.py to be much (!) smarter - it now *reuses* the network! Amazing. 2009-12-15 22:40:12 -08:00
Bob Lantz f939eb5625 Changes to mininet.py:
- invoke ofdatapath with --fail=closed (no controller = no connectivity!)
- stop hosts before switches before the controller
	- this seems slightly more sensible
	- it's the reverse of the startup order
- fix retry() so it kind of works (it's actually helpful I think!)
2009-12-15 22:38:17 -08:00
Bob Lantz 0b4ae53a7e We don't need to print the links. 2009-12-15 22:37:56 -08:00
Bob Lantz e04f092232 Bah, wasn't using correct command to remove datapaths! Fixed. 2009-12-15 21:01:19 -08:00
Bob Lantz 05cce994c3 Haha, retry is definitely not right. Time to take a break I think. 2009-12-15 19:59:48 -08:00
Bob Lantz 0a9ea29fd2 Fixed problem for empty lists in cleanup.
Added retry() function for createLink to see if it helps (probably won't.)
Random edits to docs.
2009-12-15 19:53:22 -08:00
Bob Lantz 696a619d0e Minor tweaks and corrections.
Added commentary on control network to mininet.py.
Hopefully fixed linearbandwidth.py for real.
2009-12-15 18:50:44 -08:00
Bob Lantz ea420ee29f First crack at converting cleanup to Python. 2009-12-15 18:49:46 -08:00
Bob Lantz 2708cadd40 Fixed LinearNet to pass correct parametersto GridNet.__init__() 2009-12-15 17:31:36 -08:00
Bob Lantz 657333199b Fixed treeping1024.py to import Cli, so it should work now. 2009-12-15 17:22:56 -08:00
Bob Lantz 6a30c394b1 Changed to include linux/sched.c for compiling on debian-stable. 2009-12-15 17:14:30 -08:00
Bob Lantz 93519c04f9 Fixed control network/user datapath networks. 2009-12-15 06:13:52 -08:00
Bob Lantz 9dbb68df9e Fixed iperf test.
Not sure if I want nox_core -v in nox.py - it's useful for debugging.
ripcordtest.py (and grid.py) still depend on routing, which I haven't been
able to test yet.
2009-12-14 22:37:19 -08:00
Bob Lantz 77131e8f24 OK, now we run 'routing' for the nox configurations with loops.
Unfortunately, I can't test this at the moment since nox seems not to
be able to find the routing module.

Added/renamed examples: grid.py, tree1024.py

Added -v flag to nox arguments, so we have some chance of figuring
out why nox is dying, as it generally is.
2009-12-14 22:13:53 -08:00
Bob Lantz c53fa3ba32 Second crack at a ripcordtest.py that actually works.
ripcord.py was a name conflict - ugh!
This one creates a network successfully, but ping doesn't work with
nox out of the box at least.
2009-12-14 21:35:08 -08:00
Bob Lantz 0b084dd51a Added ripcord.py, which attempts to make a FatTree using ripcord and
instantiate a mininet Network based on its topology.

Also minor cleanup of nox.py and GridNet class in mininet.py.
2009-12-14 21:01:45 -08:00
Bob Lantz 2f53491343 First crack at allowing Controller to be customized.
Network may now be used with custom controllers.
An example of doing this is in nox.py, which instantiates at TreeNet
using a custom Controller, NoxController, that runs nox_core rather
than the reference controller.
2009-12-14 20:14:44 -08:00
Bob Lantz 845dedca32 One more change to revert the broken exec behavior. 2009-12-14 19:21:17 -08:00
Brandon Heller 0608b5939b Add notes on installing NOX on Deb testing. 2009-12-12 04:47:13 -08:00
Brandon Heller ea7c8795f5 Ensure netns is in the path. 2009-12-12 02:54:52 -08:00
Bob Lantz ac75d7cff4 Inadvertently added verbosity into Node.setIP(); removed. 2009-12-14 13:46:36 -08:00
Bob Lantz fb7658c8ca Since execing controller/ofprotocol was broken, reverting to just running in background.
This should eliminate ofprotocol bogons living on past the end of a test.
2009-12-14 13:38:10 -08:00