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


How to add Flows to Queue created on OVS switch using REST API?

asked 2015-05-28 22:08:57 -0700

princepereira gravatar image


I am trying to add flows to the queues created on the OVS switch using REST API( by passing Xml in the body..

Xml as follows: <flow> <flow-name>flow1</flow-name> <match> <in-port>1</in-port> </match> <instructions> <instruction> <order>0</order> <write-actions> <action> <order>0</order> <set-queue-action> <queue-id>1</queue-id> </set-queue-action> </action> </write-actions> </instruction> <instruction> <order>1</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>NORMAL</output-node-connector> </output-action> </action> <action> <order>1</order> <set-queue-action> <queue-id>1</queue-id> </set-queue-action> </action> </apply-actions> </instruction> </instructions> <id>1</id> <table_id>0</table_id> </flow>

But flows are not added.. Can any one tell me the exact Xml format that as to be sent with url to add flows.

Thanks & Regards.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-06-01 05:06:01 -0700

Rounak gravatar image

updated 2015-06-01 05:24:58 -0700

Opendaylight Version - distribution-karaf-0.2.3-Helium-SR3 (HELIUM)

Opendaylight Module - RestConf

Client - Postman

Method - PUT

Headers - [Content-Type: application/xml, Accept: application/xml]

Creds - admin/admin

Flood matching ARP mac-1


    <?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<flow xmlns="urn:opendaylight:flow:inventory"> 
edit flag offensive delete publish link more


this is simple flow which is for an arp request. floods packets is encounters an arp request from the specified mac.. obviously m running this on karaf. hope it helps :-)

Rounak ( 2015-06-01 05:11:19 -0700 )edit

Thanks Rounak. Now I am able to add flows. :-) U specified cred as admin/admin is there any possible way for calling REST API for authentication? And Is there REST API to get ofstatistics? Hope u could help me.. Thankx in advance.

princepereira ( 2015-06-02 10:10:37 -0700 )edit

answered 2015-06-03 09:48:46 -0700

Nuno gravatar image

I added my flows to map the queue created via ovsdb this way. Is that you were looking for ? Regards, Nuno B.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools



Asked: 2015-05-28 22:08:57 -0700

Seen: 989 times

Last updated: Jun 03 '15