-
Improvement
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: Linux
Platform: PC
This should work according to the swagger API docs, but does not:
$ curl http://localhost:8080/restconf/config/toaster:toaster/darknessFactor
URI has bad format. Node "darknessFactor" must be Container or List yang type.
So should this (PUT and POST give the same error):
$ curl -X POST -H 'Content-Type: application/yang.data+json' -d '2000' http://localhost:8080/restconf/config/toaster:toaster/darknessFactor
<html><head><title>Apache Tomcat/7.0.32 - Error report</title><style><!--H1
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name
{color : black;}HR
{color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - java.lang.String cannot be cast to org.opendaylight.controller.sal.restconf.impl.StructuredData</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>java.lang.String cannot be cast to org.opendaylight.controller.sal.restconf.impl.StructuredData</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.ClassCastException: java.lang.String cannot be cast to org.opendaylight.controller.sal.restconf.impl.StructuredData
org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider.getSize(StructuredDataToXmlProvider.java:39)
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:289)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
- is blocked by
-
NETCONF-18 Enhance RESTconf to implement latest draft-ietf-restconf-netconf
- Resolved