|
During test under bgp observed that
doing
Put
http://localhost:8181/restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config
<iana-linkstate-attribute-type xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config">false</iana-linkstate-attribute-type>
Will behave as expected.
Then if we proceed to check the stored information
Get
http://localhost:8181/restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config
<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<error>
<error-type>application</error-type>
<error-tag>data-missing</error-tag>
<error-message>Request could not be completed because the relevant data model content does not exist </error-message>
</error>
</errors>
Also if we try to do an update through
Post
http://localhost:8181/restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config
<iana-linkstate-attribute-type xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config">true</iana-linkstate-attribute-type>
will end on
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body>
<h2>HTTP ERROR 500</h2>
<p>Problem accessing /restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config. Reason:
<pre> Server Error</pre>
</p>
<h3>Caused by:</h3>
<pre>java.lang.NullPointerException
at org.opendaylight.controller.cluster.databroker.AbstractDOMBrokerWriteTransaction.checkInstanceIdentifierReferencesData(AbstractDOMBrokerWriteTransaction.java:87)
at org.opendaylight.controller.cluster.databroker.AbstractDOMBrokerWriteTransaction.put(AbstractDOMBrokerWriteTransaction.java:79)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.simplePostPut(BrokerFacade.java:884)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.makeNormalPost(BrokerFacade.java:876)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.postData(BrokerFacade.java:682)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.postDataViaTransaction(BrokerFacade.java:664)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.commitConfigurationDataPost(BrokerFacade.java:454)
at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:998)
at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:914)
at org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper.createConfigurationData(StatisticsRestconfServiceWrapper.java:156)
at org.opendaylight.netconf.sal.rest.impl.RestconfCompositeWrapper.createConfigurationData(RestconfCompositeWrapper.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
Updated Model
module bgp-linkstate-app-config {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config";
prefix "bgp-linkstate-app-config";
description
"Configuration for the BGP linkstate application.";
revision "2016-06-14"
{
description
"Initial revision.";
}
container bgp-linkstate-app-config {
leaf iana-linkstate-attribute-type
{
description "If true (default) linkstate attribute type (=29) allocated by IANA is used,
else type (=99) is used for parsing/serialization";
type boolean;
default true;
}
}
}
|