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

Issue with yang-ext:mount

asked 2014-05-19 11:41:54 -0800

csadi gravatar image

updated 2014-05-19 11:45:59 -0800

When I try the below two commands, in both the cases, I'm getting errors as below

curl -v http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/libnetconfd/yang-ext:mount/ curl -v http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/libnetconfd/yang-ext:mount/

ERRORS:

[root@bti-ma-sdn opendaylight]# curl -v http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/Atlas7800Adi 1/yang-ext:mount/ * About to connect() to localhost port 8080 (#0) * Trying ::1... connected * Connected to localhost (::1) port 8080 (#0)

GET /restconf/config/opendaylight-inventory:nodes/node/Atlas7800Adi1/yang-ext:mount/ HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: localhost:8080 Accept: /

< HTTP/1.1 400 Bad Request < Server: Apache-Coyote/1.1 < Cache-Control: private < Expires: Wed, 31 Dec 1969 19:00:00 EST < Content-Type: text/plain < Transfer-Encoding: chunked < Date: Mon, 19 May 2014 18:39:57 GMT < Connection: close < * Closing connection #0

Can someone point me to where Im going wrong?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-21 04:42:59 -0800

Devin Avery gravatar image

Not 100% sure this is your problem, but you may need to specify the Accept value in your request. Looking at RestconfService.java you will see that the readConfigurationData has accept headers of application/json, application/xml, text/xml, application/yang.data+json, application/yang.data+xml, which means you need to add one of those to the accept headers.

@GET<br>
@Path("/config/{identifier:.+}")<br>
@Produces({Draft02.MediaTypes.DATA+JSON,Draft02.MediaTypes.DATA+XML, <br>
           MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})<br>
public StructuredData readConfigurationData(@Encoded @PathParam("identifier") String identifier);
edit flag offensive delete publish link more

Comments

This may also help out: https://ask.opendaylight.org/question/82/yang-extmount-not-working/

Devin Avery ( 2014-05-21 04:45:04 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-05-19 11:41:54 -0800

Seen: 103 times

Last updated: May 21 '14