Ask Your Question
0

Issue with yang-ext:mount

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

csadi gravatar image

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

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 -0700

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 -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]

Question Tools

Follow
1 follower

Stats

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

Seen: 102 times

Last updated: May 21 '14