Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


add flow in custom api

asked 2016-06-30 17:58:15 -0700

luis999 gravatar image

Hi all,

i am trying to create a custom API that able to calculate a shortest path and establish flow. i have manage to implement shortest path algorithm and now left establish flow.

Tools: opendaylight lithium , eclipse , maven 3.3.9

my question is 1) is there now establish flow file/code i am to use as reference?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-30 20:19:43 -0700

karthik330 gravatar image

Hi , In l2switch Project , sub modules have flow folder. Inside that you could find the flow related codes like some modules implement the functionality for drop Flow,and some has functionality to sends all LLDP packets to the controller, .

Have a look at Sample Flow Code . And later you can modify the match action as per your need.

edit flag offensive delete publish link more


Thank you, is it possible to called the InitialFlowWriter function from custom API instead of implementing the code to custom api?

luis999 ( 2016-06-30 22:52:00 -0700 )edit

I beleive we can't call . If it is a RPC function ,then we could call that function by consuming its RPC service. So I think its not possible(I may wrong, lets wait for other's answer as well). And It is not that much difficult to understand InitialFlowWriter, and do the same in your App.

karthik330 ( 2016-06-30 23:25:39 -0700 )edit

Add required dependencies,delete unwanted code and use whatever you need. If you still face problem, let me know. I will only paste the relevant code and dependencies.

karthik330 ( 2016-06-30 23:25:54 -0700 )edit

HI, it seem the custom API i create is standalone, there is feature i can install(only odl-dlux-all). i can't add l2switch import to my code. do i need to import my custom API to main opendaylight-karaf or i need to do something else to add l2switch to my custom API?

luis999 ( 2016-07-04 18:19:42 -0700 )edit

To import l2switch, you dont need l2feature !. If you want to install l2switch feature in your custom app , then you have to add the dependency of l2switch in feature.xml.In this case probably what i do , i install my custom app in ODL integration where whole bundles presents.

karthik330 ( 2016-07-04 23:15:45 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-06-30 17:58:15 -0700

Seen: 55 times

Last updated: Jun 30 '16