mininet/mininet — pull request #416 by lantz (2014-10-30 22:49:32+00:00)
Title: Multi-link topology support

Here is a slightly different approach to supporting multiple links. I've tried to:

* Make `Node.MultiGraph` more compatible/isomorphic with `networkx.MultiGraph`
* Ensure that nodes (`node1`) and their parameters (`cls1`) are matched correctly when the link constructor is called
* Add a `convertTo` method to ease converting `Node.MultiGraph` to `networkx.MultiGraph` (you can also just override `Topo.build()` with `g = networkx.MultiGraph()`

However, there are still a bunch of things I'm not entirely happy with:

* The port management scheme is clunky
* To preserve the old clunky API, `Topo.port` returns a single tuple if there is only one port and multiple tuples if there are multiple ports
* I'm not sure if Cody's space/time tradeoff is better than my time/space tradeoff in the clunky port management code
* However, since `Topo.links()` can return the link information, we don't actually call `Topo.ports()` any more.