Looking at samplerouting.py as example,

    def install(self):
        self.routing = self.resolve(pyrouting.PyRouting)
        self.register_handler(Flow_in_event.static_get_name(),
                              self.handle_flow_in)

which make this looks peculiar.

        def install(self):

                self.routing = self.resolve(pyrouting.PyRouting)
                self.register_handler(Flow_in_event.static_get_name(),
Pywaqas.handle_flow_in)

Regards
KK

PS>> Please don't cross post within an hour of non-response.  Many
people are subscribed to both lists.
On 30 July 2010 09:07, Waqas Daar <waqasd...@gmail.com> wrote:
> Hello all,
> I am trying to create a NOX component called 'pyflushroutes.py' in python,
> which get the routes from the openflow switche on the network and flush it
> to all the openflow switches in the network. The first thing I am trying to
> do is to just use the function 'get_routes()' and print that routes in the
> handler function flow_in. According to that routing module listens for
> flow_in_events and perform the routing. I have registered the function
> Flow_in_event and write a simpel handler function for that event,
> Below is the excerpts of the component.
> class pyflushroutes(Component):
>         def __init__(self, ctxt):
>                 Component.__init__(self, ctxt)
>                 self.routing = None
>                 log.startLogging(sys.stdout)
>         def install(self):
>                 self.routing = self.resolve(pyrouting.PyRouting)
>                 self.register_handler(Flow_in_event.static_get_name(),
> Pywaqas.handle_flow_in)
>  def handle_flow_in ( self, event):
>                log.msg("Flow_in recieved\n")
>                route = pyrouting.Route()
>                if self.routing.get_route(route):
>                         checked=True
>                         log.msg(str(route))
>                else:
>                      log.err("No Route between %s and %s." %
> (hex(route.id.src.as_host()),hex(route.id.dst.as_host())))
>
> But it did not print any thing even the Flow in recieved message. :(
> Any idea where I am doing wrong ?
>
>
> Best Regards,
>
> Waqas Daar
>
> _______________________________________________
> openflow-discuss mailing list
> openflow-disc...@lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
>
>

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to