Hi Ranga, You can find below the example for reading config dump for a switch and it has more details about each flow processing, you can go through this and let us know if you have any queries.
https://git.opendaylight.org/gerrit/gitweb?p=openflowplugin.git;a=blob;f=applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java;h=85658f05c12f22b121e969ec85d93d48b1ef84de;hb=refs/heads/master#l317 Regards, Arun From: [email protected] <[email protected]> On Behalf Of M. Ranganathan Sent: Tuesday, May 7, 2019 4:29 AM To: Anil Vishnoi <[email protected]>; openflowplugin-dev <[email protected]> Subject: Re: [openflowplugin-dev] Fwd: Listing all flows at a node from an openflow Java Application. Hello Anil, Thank you for your reply. I am not trying to write to the DataStore. I am trying to read all the flows that are already in the DataStore. I suppose I would need to start a Read transaction in that case(?) Any examples you can point me to? Once I have the Flow, how can I format it in Json? I want to return a string containing the flows of interest. Regards, Ranga On Mon, May 6, 2019 at 6:48 PM Anil Vishnoi <[email protected]<mailto:[email protected]>> wrote: Hi Ranga, You can user the MD-SAL databroker service directly to write to the data store. You need to inject this service in your code and than use the interfaces exposed by DataBroker.java, to write to the data store. Following example don't give the exact detail but may be helpful to give you some pointers. https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterSequential.java#L139<https://protect2.fireeye.com/url?k=4d5efd92-11d72782-4d5ebd09-0cc47ad93e2a-ed8a8c86c475aea0&u=https://github.com/opendaylight/openflowplugin/blob/master/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterSequential.java#L139> On Sat, May 4, 2019 at 7:08 AM M. Ranganathan <[email protected]<mailto:[email protected]>> wrote: Hello, Starting from the nodeId of an openflow switch (e.g. openflow:1) I can list all the flows at that switch using the following: curl -v -u admin:admin http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1<https://protect2.fireeye.com/url?k=6e5ce0a7-32d53ab7-6e5ca03c-0cc47ad93e2a-ecc1c30c3db9ffde&u=http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1> I want to do the same thing from my openflow application. I would like to avoid using HttpClient to do this. Is there a way to do this using an rpc service so I can get a reference to this service when starting my provider? i.e. I want to declare this in my blueprint.xml and call it. I can't figure out which service gives me this functionality. Any help would be appreciated. Thank you in advance. Regards, Ranga -- M. Ranganathan -- M. Ranganathan _______________________________________________ openflowplugin-dev mailing list [email protected]<mailto:[email protected]> https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev<https://protect2.fireeye.com/url?k=d8cc56bf-84458caf-d8cc1624-0cc47ad93e2a-958bdc23bfea5fa8&u=https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev> -- Thanks Anil -- M. Ranganathan
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
