Listening for FlowRule Events.

30 views
Skip to first unread message

Abhishek Dwaraki

unread,
Jul 15, 2015, 5:13:35 PM7/15/15
to onos-d...@onosproject.org
Hey folks,
I am trying to figure out how to listen for FlowRule related events, particularly events that occur due to success or failure to program flow rules into the data path. So far, I have been able to trace the control flow down to the Pipeliner code, where I can see an ObjectiveError.FLOWINSTALLATIONFAILED message being added, but how do I listen for this message?

Could someone briefly explain how to listen for and process events in the ONOS framework?

Regards,
Abhishek.
signature.asc

Jonathan Hart

unread,
Jul 16, 2015, 1:02:12 PM7/16/15
to Abhishek Dwaraki, onos-discuss
That depends if you are installing FlowRules or FlowObjectives.

If you're installing FlowRules and want to listen to notifications, the FlowRuleService has an addListener method that allows you to register a listener.

If you're installing FlowObjectives, when you build the FlowObjective you can use the overloaded Builder.add(ObjectiveContext) method to pass in an ObjectiveContext with the flow objective. The ObjectiveContext is a callback that will be called either on the success or failure of the objective installation.

Thanks,

Jono


--
You received this message because you are subscribed to the Google Groups "ONOS Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-discuss...@onosproject.org.
To post to this group, send email to onos-d...@onosproject.org.
Visit this group at http://groups.google.com/a/onosproject.org/group/onos-discuss/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-discuss/526C3E97-CBF6-4ECE-81CF-8B77BA893D7F%40gmail.com.

Reply all
Reply to author
Forward
0 new messages