Hi BK, Actually, ModelDrivenSwitchImpl.java registers itself as provider of various RPC services (flow, stats etc. see ModelDrivenSwitch.java). So, effectively, ModelDrivenSwitchImpl.java advertises to MD-SAL that it provides SalFlowService. This allows applications to discover the Flow service and invoke its RPC.
If you enable debug logs as following from karaf console, tail the karaf.log and invoke RPC from RESTCONF you can see the log messages from ModelDrienSwitchImpl as well as SalFlowServiceImpl > log:set DEBUG org.opendaylight.openflowplugin Hope this helps Regards Muthu From: [email protected] [mailto:[email protected]] On Behalf Of Borasy Kong Sent: Tuesday, May 17, 2016 3:39 PM To: Anil Vishnoi Cc: [email protected] Subject: Re: [openflowplugin-dev] [controller-users] SAL addflow() Thanks so much for the in-depth. So inside the addFlow() in ModelDrivenSwitchImpl, there's a log : LOG.debug ("Calling the FlowMod RPC method on MessageDispatchService") . But when I add a flow using sal-flow:add-flow RPC, I cannot locate that log message (I use "log:display | grep Calling" in karaf user space). Do you have any idea of how to see if this addFlow() is really called when adding flow through RPC? On Tue, May 17, 2016 at 6:15 PM, Anil Vishnoi <[email protected]<mailto:[email protected]>> wrote: Openflowplugin has two implementations. Link that i pasted is from the old implementation (default implementation till Beryllium release). The link that you pasted above is from the new implementation of openflowplugin ( it's going to be the default plugin from Boron onwards). Code present in "openflowplugin" directory is the code related to the odl openflowplugin implementation and code present in "openflowplugin-impl" is related to the new openflowplugin implementation. On Tue, May 17, 2016 at 12:45 AM, Borasy Kong <[email protected]<mailto:[email protected]>> wrote: Hi there, Thanks for the links. It helps a lot. But I also found SalFlowServiceImpl.java https://github.com/opendaylight/openflowplugin/blob/e95857517f6d24a871f3811fc8c8c7f055e30267/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java Do you know how is SalFlowServiceImpl different from ModelDrivenSwitchImpl.java?? And is there a way to test if Sal-flow:add-flow really uses ModelDrivenSwitchImpl.java ?? Thanks again. Best, BK On Tue, May 17, 2016 at 1:48 PM, Anil Vishnoi <[email protected]<mailto:[email protected]>> wrote: here is the implementation https://github.com/opendaylight/openflowplugin/blob/master/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/ModelDrivenSwitchImpl.java#L140 and this is the place where openflowplugin register the rpc provider https://github.com/opendaylight/openflowplugin/blob/master/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java#L59 On Mon, May 16, 2016 at 9:25 PM, Jamo Luhrsen <[email protected]<mailto:[email protected]>> wrote: (adding openflowplugin-dev as they are the right project for this question) On 05/16/2016 07:24 PM, Borasy Kong wrote: > Hi > > I want to know the source codes in ODL distribtion corresponding to adding a > flow from RPC > using http://localhost:8181/restconf/operations/sal-flow:add-flow > <http://localhost:8080/restconf/operations/sal-flow:add-flow>. > Can someone help out? > > Thanks, > BK > > > _______________________________________________ > controller-users mailing list > [email protected]<mailto:[email protected]> > https://lists.opendaylight.org/mailman/listinfo/controller-users > _______________________________________________ controller-users mailing list [email protected]<mailto:[email protected]> https://lists.opendaylight.org/mailman/listinfo/controller-users -- Thanks Anil -- Thanks Anil
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
