Thanks i will consider that aswell and see how this approach performs.
On Mon, Aug 4, 2014 at 8:18 PM, Peter Peresini <peter.peres...@epfl.ch> wrote: > Or, if you are in no particular hurry to get notifications about new > flows, you can just periodically poll switch stats for all flows. This is > not so nice and elegant, but it can save you headaches knowing the exact > state of the switch -- especially if you use flowmod's which can > modify/delete multiple rules at the same time and flows can expire as well. > > Peter > > > On Mon, Aug 4, 2014 at 5:53 PM, Adam Pavlidis <adampavli...@gmail.com> > wrote: > >> Thank you very much, i will follow your suggestions. >> >> >> On Mon, Aug 4, 2014 at 5:24 PM, Murphy McCauley < >> murphy.mccau...@gmail.com> wrote: >> >>> You have to do it manually. It was expected that a higher-level API >>> would be implemented that might be a reasonable place to implement such a >>> feature, but such has never materialized. >>> >>> You could hack it in yourself, by patching the Connection.send() method >>> to check the outgoing data for flow-mods, which isn't particularly elegant. >>> A cleaner approach is to implement your own send_flow_mod() function or >>> something and have this do whatever you need before forwarding on to >>> Connection.send(). Of course, if you were using other components, they'd >>> need to know to call this when appropriate. >>> >>> -- Murphy >>> >>> >>> On Aug 4, 2014, at 5:17 AM, Adam Pavlidis <adampavli...@gmail.com> >>> wrote: >>> >>> Hello, >>> I am trying to code a module that need to performs some action when >>> other modules (or the same module that is beside the point) install a flow >>> rule on a switch. Is there an event that is raised automatically when a >>> flow is installed? >>> >>> i.e. like _handle_PacketIn is raised to handle new packets or >>> _handle_FlowRemoved is raised when a flow entry is removed? >>> >>> Or i have to manually perform what action i need, by finding the exact >>> lines of code that install flow rules and add the actions i need to be >>> performed just below? >>> >>> >>> >> >