Ask Your Question
0

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

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

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 -0700

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 -0700 )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 -0700 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

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

Seen: 152 times

Last updated: Aug 03 '15