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

0

How to add the flow into a special Node using the Java API

asked 2015-07-31 02:57:29 -0800

wwb_8392 gravatar image

Hi,

Does anybody know how to add the flow into a special Node using the Java API?

For Example, i have three flows : flow1, flow2, flow3 and two nodes: node1, node2 my goal is to add flow1 and flow2 into node1, flow3 into node2

I have added the flow into a specical Node using the Rest API by Postman. But i want to know to achieve this using the Java API?

Best Regards

Wenbin

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-03 08:12:44 -0800

Hi,

If I understand correctly, you want to add flows programmatically. To do so, you must create Matchers and Instructions to the flows. I would suggest looking into the openflowplugin for examples on how to build Matchers and Instructions and push those to a specific OpenFlow node.

edit flag offensive delete publish link more

Comments

first, thank you for your reply. The problem is that how to find a specific OpenFlow node? for example. i create a following topology h1------s1---s3------s2------h3 i want to add flow1 to s1, s2. And add flow 2 to s3. But i do not know how to decide which node is s1? which node is s2? which node is s3 ?

wwb_8392 ( 2015-08-03 08:28:32 -0800 )edit

Hum, you might be able to retrieve the node using its IP address. I'm not so sure how this is going to scale up if you hardcode the IPs. One way of doing that would be to react on data changes (ie when a node is created) and check its IP address.

grmontpetit ( 2015-08-03 12:36:46 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-07-31 02:57:29 -0800

Seen: 154 times

Last updated: Aug 03 '15