ODL helium 0.2.2 returns 404 Not found with Operational Datastore in GET using cURL

asked 2015-05-08 00:20:25 -0800

anonymous user

Anonymous

updated 2015-05-08 01:58:30 -0800

Hi All,

I am working on ODL controller (distribution-karaf-0.2.2-Helium-SR2), and I was trying to install required flows from controller to my agent using config datastore and I am trying to fetch the installed flows using operational data store and returns 404 not found error.

Please find below for the process that I am following...

Controller:

sudo ./karaf

To fetch the connected nodes:

curl -i -v -u admin:admin -H "Accept: application/json" -X GET http://localhost:8181/restconf/operational/opendaylight-inventory:nodes | sed 's/,/\n/g' | grep '\"nodes\"'

returns {"nodes":{"node":[{"id":"openflow:55930"

Configured a VLAN flow entry:

curl -i -v -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" -X PUT --data "@teadd vlan_1.json" http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:55930/table/10/flow/1

Tried to fetch the installed flows using Config:

I am getting the configured flow successfully. qaadmin@lbhyd-ubuntuqa3:~$ curl -i -v -u admin:admin -H "Accept: application/json" -X GET http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:55930/table/10/flow/1 * Adding handle: conn: 0x21b8d30 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl addHandleToPipeline: length: 1 * - Conn 0 (0x21b8d30) sendpipe: 1, recv_pipe: 0 * About to connect() to localhost port 8181 (#0) * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8181 (#0) * Server auth using Basic with user 'admin'

GET /restconf/config/opendaylight-inventory:nodes/node/openflow:55930/table/10/flow/1 HTTP/1.1 Authorization: Basic YWRtaW46YWRtaW4= User-Agent: curl/7.32.0 Host: localhost:8181 Accept: application/json

< HTTP/1.1 200 OK HTTP/1.1 200 OK < Content-Type: application/json Content-Type: application/json < Transfer-Encoding: chunked Transfer-Encoding: chunked * Server Jetty(8.1.14.v20131031) is not blacklisted < Server: Jetty(8.1.14.v20131031) Server: Jetty(8.1.14.v20131031)

< * Connection #0 to host localhost left intact {"flow-node-inventory:flow":[{"id":"1","hard-timeout":0,"match":{"in-port":"1","vlan-match":{"vlan-id":{"vlan-id-present":true,"vlan-id":10}}},"tableid":10,"instructions":{"instruction":[{"order":1,"go-to-table":{"tableid":20}}]},"cookie":1,"strict":false,"idle-timeout":0,"flow-name":"Vlanflow1","priority":2,"cookiemask":255}]}

Tried to fetch the installed flow using operational:

curl -i -v -u admin:admin -H "Accept: application/json" -X GET http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:55930/table/10/flow/1

< HTTP/1.1 404 Not Found HTTP/1.1 404 Not Found < Content-Type: text/plain Content-Type: text/plain < Transfer-Encoding: chunked Transfer-Encoding: chunked * Server Jetty(8.1.14.v20131031) is not blacklisted < Server: Jetty(8.1.14.v20131031) Server: Jetty(8.1.14.v20131031)

Please help me in resolving this.

edit retag flag offensive close merge delete

Comments

I also had the same issue. Sometimes, the flow entry shows up after few minutes and other times, they don't at all. I tried to flow-dump on switch as well. it seems that switch does not get all the flow entries. Not sure if switch rejected it for some reason. There should be an API which should be able to reveal this. Please let me know if you find something at this front

kjain ( 2015-05-11 05:33:18 -0800 )edit

Any response ?

adibrastegarnia ( 2015-05-20 08:35:35 -0800 )edit