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.
There is probably a better way of doing this, but currently
parseCustomFile can modify globals (e.g. TOPOS) as well as
instance variables (self.validate) and classes (e.g. MyTopo),
which are also in the global name space.
Inconveniently enough, lambdas don't seem to be full closures
in Python; if they were, this trickiness would be unnecessary.
Even so, using execfile() seems like it might be a bit dubious...
This increases flexibility by allowing a topology to be manually created
in Python, or specified using another format, without having to create
a Topo object first.
However, Topos are useful, and are still the default topology object!
Shell now works (although we should use quietRun instead to avoid
file descriptor problem!)
exit/quit/EOF now all exit.
Renamed pingall and pingpair to make them easier to type - I think
commands should not require use of the shift key in general, although
ping-all and ping-pair might be OK.
It's possible that mn_clean is a bit easier to read; mnclean may be easier
to type, however.
Added variables to Makefile so that source files are listed in a single
location.
- 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!)
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.
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.
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.
low-level primitives.
The "nox.py" example attempts to use nox as a controller rather than
controller(8).
More edits for INSTALL and README, and refinements for sshd and xterm
examples.
Fixed xterm.py (and cleanup) to clean up screen sessions.
Cleaned up sshd.py (though interface is still in flux.)
Added 1024-node network example (treenet1024.py).
Added example showing multiple tests on a single network (multitest.py).
Renamed examples to make them easier to type!
(It also adds a route from the root namespace to the data network via
the first OpenFlow switch, so when you ssh in you go through OpenFlow!)
Modified Network() to optionally decouple starting the network, running
tests, and stopping the network. This allows multiple tests to be run
(or additional modifications to be made to the network before actually
starting the switches and controller.)
Still tweaking xterms - it sort of works but the screen sessions are not
cleaned up, which leads to nasty garbage.