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

Revision history [back]

RESTCONF Troubleshooting

I connected my switch to a controller. The switch appears when I call.

http://127.0.0.1:8181/restconf/operational/opendaylight-inventory:nodes/

I pushed a flow to the config database and it returns Status 200.

When I do a GET to the same address, the API returns the flow.

But, if I go to my switch:

$ sudo ovs-ofctl -O OpenFlow13 dump-flows br0

The flow does not appear.

I repeated and set "strict" and "installHW" to true and that did not do anything.

===================================================================

Here is the XML I used for the PUT:

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

Request Headers:

Accept: application/xml
Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36
CSP: active
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/xml 
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: _sm_au_c=iVVMPFsMt00NJv6P0d

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
    <strict>false</strict>
    <instructions>
        <instruction>
            <order>0</order>
            <go-to-table>
                <table_id>1</table_id>
            </go-to-table>
        </instruction>
    </instructions>
    <table_id>0</table_id>
    <id>256</id>
    <cookie_mask>10</cookie_mask>
    <installHw>false</installHw>
        <match>
            <ipv4-source>192.168.11.0/24</ipv4-source>
            <ipv4-destination>192.168.11.0/24</ipv4-destination>
            <ip-match>
                <ip-protocol>4</ip-protocol>         
            </ip-match>
            <in-port>0</in-port>
        </match>   
    <hard-timeout>1800</hard-timeout>
    <cookie>10</cookie>
    <idle-timeout>1800</idle-timeout>
    <flow-name>flow-instruction-go-to-table</flow-name>
    <priority>2</priority>
    <barrier>false</barrier>
</flow>

Result of GET:

GET http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:49213347348856/flow-node-inventory:table/0/flow/256

<flow xmlns="urn:opendaylight:flow:inventory">
    <id>256</id>
    <priority>2</priority>
    <hard-timeout>1800</hard-timeout>
<instructions>
    <instruction>
        <order>0</order>
            <go-to-table>
            <table_id>1</table_id>
            </go-to-table>
    </instruction>
</instructions>
<match>
    <in-port>0</in-port>
    <ipv4-source>192.168.11.0/24</ipv4-source>
    <ipv4-destination>192.168.11.0/24</ipv4-destination>
    <ip-match>
        <ip-protocol>4</ip-protocol>
    </ip-match>
</match>
<flow-name>flow-instruction-go-to-table</flow-name>
<installHw>false</installHw>
<cookie_mask>10</cookie_mask>
<table_id>0</table_id>
<idle-timeout>1800</idle-timeout>
<barrier>false</barrier>
<strict>false</strict>
<cookie>10</cookie>
</flow>