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 get flow statistics and how to add new flows ?

asked 2016-01-11 02:13:47 -0800

vinayaktj gravatar image

Hello, I'm new to use opendaylight lithium. I have setup a topology in mininet vm. My topology shown in the topology is as shown in the image ODL topology

I'm trying to use the rest apis but I cannot figure out how to give the parameters for e.g. Aggregate flow statistics in rest apis

Please someone specify what will be the entries ? and also how to add flows so that they could be shown in the node flows from the node interface as here Nodes interface flows

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-01-11 23:13:45 -0800

jayaprakash gravatar image

updated 2016-01-11 23:18:12 -0800

Hi vinayaktj,

New flows can be created by REST API and please find the below example.

curl --noproxy 192.168.1.196 -u admin:admin -H 'Content-Type: application/yang.data+xml' -X PUT -d @flow_data.xml http://192.168.1.196:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/10

flow_data.xml

<flow xmlns="urn:opendaylight:flow:inventory"> <priority>500</priority> <flow-name>sampleFlow</flow-name> <idle-timeout>12000</idle-timeout> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ip-match><ip-dscp>28</ip-dscp> </ip-match></match> <id>10</id> <table_id>0</table_id> <instructions> <instruction> <order>6555</order> </instruction> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>1</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> </flow>

To retrieve the created flow:

GET http://192.168.1.196:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/10

Reference URL: https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:End_to_End_Flows

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

Question Tools

Follow
1 follower

Stats

Asked: 2016-01-11 02:13:47 -0800

Seen: 1,036 times

Last updated: Jan 11 '16