Ask Your Question
0

API explorer returns only 404s

asked 2014-12-05 07:47:17 -0700

B.Cogan gravatar image

updated 2014-12-08 05:32:20 -0700

Hello all, I am developing a client application to ODL using the REST apis. Up until last week I have been working using the AD-SAL REST api, mainly the Host tracker, topology and flow programmer apis. At this point I found out that they are no longer used and I needed to transition to the MD-SAL RESTCONF api, which are obviously very different. I’ve been trying to get my head around it using the API explorer at http://localhost:8181/apidoc/explorer/index.html however all of the calls I’m trying are returning 404s.

Mininet is running and visible in the dlux gui. I did have several features installed but I’ve rolled back to just odl-restconf, odl-l2switch-switch, odl-mdsal-apidocs and odl-dlux-core to try and narrow down the issue. I have seen https://ask.opendaylight.org/question/1161/rest-api-in-helium-karaf-is-giving-404-error/ however I do not know how to implement the solution i.e. run an openflow test. If anyone can let me know how this would be done I will test that first.

I’m only a novice and was new to REST when I started, so any other advice you may have (especially about moving AD to MD) would be appreciated too

Brendan

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2014-12-05 08:26:18 -0700

Moderators

Run a simple OpenFlow test means, connecting a openflow device to the controller. (IE mininet)

Mininet walk through

edit flag offensive delete publish link more

Comments

Ah, well in that case I have already done this; as I said in the question I have Mininet running and visible in the dlux GUI, and have started and restarted it many times in trying to solve the issue.

B.Cogan ( 2014-12-07 07:51:36 -0700 )edit

So which API are giving u a 404?

Chris O'Shea ( 2014-12-07 16:45:10 -0700 )edit

I am getting replies from GET /restconf/operational/opendaylight-inventory:nodes/ (which is useful but i don't need the flow tables so a bit excessive), however I haven't found any others that give me a response, for example GET /config/network-topology:network-topology/.

B.Cogan ( 2014-12-08 06:18:42 -0700 )edit

Why you checking the config datastore for network-topology(Unless you going load up stuff into the datastore)? You want the operational datastore GET /restconf/operational/network-topology:network-topology/

Chris O'Shea ( 2014-12-08 10:34:23 -0700 )edit

Well not needing access to the config datastore seemed to be my issue all along. I was unaware of a the difference and didn't realise all the information i need was in the Operational datastore. Apologies for the lateness, I lost my password! I've marked you as best answer for the help.

B.Cogan ( 2015-01-25 10:26:47 -0700 )edit
0

answered 2015-01-23 09:11:17 -0700

runamuck gravatar image

Try this IP from your ODL server:

http://localhost:8181/restconf/operational/network-topology:network-topology/

edit flag offensive delete publish link more
0

answered 2015-03-19 04:32:00 -0700

heena gravatar image

i am using mozzila Rest Client pluggin to add flow in switches created using mininet. Below is Request xml used on URL http://10.19.10.194:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1 -

<flow xmlns="urn:opendaylight:flow:inventory"> <priority>32</priority> <flow-name>neha</flow-name> <match> <ethernet-match> <ethernet-type> <type>2048</type> </ethernet-type> </ethernet-match> <ipv4-destination>10.0.10.2/24</ipv4-destination> </match> <id>1</id> <table_id>0</table_id> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <dec-nw-ttl> </dec-nw-ttl></action> </apply-actions> </instruction> </instructions> </flow>

While post the request i ma getting below error -

<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-type>protocol</error-type> <error-tag>invalid-value</error-tag> <error-message>Data schema node was not found for flow</error-message> </error> </errors>

Can you please help me with Request xml/json parameters, i am struggling even in creating a simple flow.

Regards, Neha Wadhawan

edit flag offensive delete publish link more

Comments

I highly recommend you open up a new question, as this is an Ask board not a forum. But i believe u haven't not the Openflow northbound feature installed.

Chris O'Shea ( 2015-03-19 15:35:17 -0700 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2014-12-05 07:47:17 -0700

Seen: 890 times

Last updated: Mar 19 '15