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


Convert this specific OpenFlow flow to REST flow

asked 2015-07-01 02:46:23 -0700

Edu gravatar image

updated 2015-07-01 02:47:19 -0700

I have been installating these flows with a Java application to the last release of the REST api (localhost:8080/controller/nb/v2/flowprogrammer/default/node/OF/00:00:00:00:00:00:00:01/)


However, now I need to use the new REST api for Helium ( http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1 ). Can anybody help me to translate it to this new release please? I think that it is something like this, but it do not work:

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

2 answers

Sort by ยป oldest newest most voted

answered 2015-07-01 07:05:05 -0700

runamuck gravatar image

Looks like you have the wrong URL for your PUT.

First off, verify you have the correct node ID.

Second, you will need to use "flow-node-inventory:table" instead of "table"

Step one: go to:


Enter username: admin, password: admin

At the top of the XML you'll see:

<nodes xmlns="urn:opendaylight:inventory">
        <description xmlns="urn:opendaylight:flow:inventory">None</description>
        <serial-number xmlns="urn:opendaylight:flow:inventory">None</serial-number>
        <table xmlns="urn:opendaylight:flow:inventory">

Use your openflow ID (Mine is "openflow:49213347348856") in your PUT command: It will be different than the one I use here.

Be sure to use the correct headers in your PUT.

Accept: application/xml
Content-Type: application/xml 
Authorization: Basic YWRtaW46YWRtaW4=

PUT http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:49213347348856/flow-node-inventory:table/0/flow/1

A GET to the same URL should show your flow.

edit flag offensive delete publish link more

answered 2015-07-01 07:21:05 -0700

Edu gravatar image

Thanks runamuck.

I had chek my node, it is the 1:

         <x:capabilities>x:flow-feature-capability-port-stats</x:capabilities>        (...)         <x:capabilities>x:flow-feature-capability-queue-stats</x:capabilities><x:capabilities>x:flow-feature-capability-table-stats</x:capabilities></switch-features><description>None</description><hardware>Open vSwitch</hardware><manufacturer>Nicira, Inc.</manufacturer><software>2.0.2</software>

About your second point, why the "flow-node-inventory:table" instead of "table" if in the end to end flow in the wiki says:

With PostMan:
    Set headers:
        Content-Type: application/xml
        Accept: application/xml
    Use URL: http://<controller IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1
    Use Body: (...)

Thank you very much!

edit flag offensive delete publish link more


I just tried it (changed the NODE ID) and it worked for me, so the syntax looks good. Does it work? If not, did you add the authorization to your PUT? Authorization: Basic YWRtaW46YWRtaW4=

runamuck ( 2015-07-01 07:32:59 -0700 )edit

Thanks runamuck, it works well to install the flow in the config API, but then the flow do not cross to the operational api, so the ovs do not see the flow. I have explained well here:

Edu ( 2015-07-02 00:54:27 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-07-01 02:46:23 -0700

Seen: 358 times

Last updated: Jul 01 '15