frenetic-lang / netcore-1.0

Compiler from NetCore to OpenFlow and associated tools.
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Pick up topology from mininet when firing up a new instance #47

Open cinohpa opened 11 years ago

cinohpa commented 11 years ago

Currently, we're working on standardizing how we represent network topologies internally for implementing more sophisticated policies.

TopoParser is intended to provide means of picking up topologies from various different sources. Currently, parseTopo is the primary function for taking a topology represented as a string in mininet's format (i.e. what you get when you run the net command in mininet) and returns it into something which we can build into a topology as defined in Topo.hs. See TopoSample for an example of this.

We want to extend this to pick up the topology from mininet directly so when a controller fires up, it can pick up a representation of the topology being simulated in mininet for building policies. This amounts to adding some function to TopoParser with pattern: ?? -> String where ?? is whatever is needed to pick up the output of the net command from mininet.

Currently, if you run testMakeTop in TopoSample.hs (in examples) you will build a Topo instance from a string of the format mininet spits out. The proposed extension would allow us to write an alternative to testParse which would pick up a topology from a running instance of mininet directly, rather than the hard-coded string which was copied and pasted from mininet.

One place that could take advantage of this change is in BaseMon which currently picks up a topology from a string and the parser.

arjunguha commented 11 years ago

Got it, thanks.