|
I'm converting my Postman collection for configuring ODL BGP from using POST to using PUT (since Lithium doesn't support POSTing on top of an existing config entry).
So am dong a PUT to /restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/example-bgp-peer
the body is:
{ "module" : [
{
"type": "odl-bgp-rib-impl-cfg:bgp-peer",
"name": "example-bgp-peer",
"odl-bgp-rib-impl-cfg:peer-role": "ebgp",
"odl-bgp-rib-impl-cfg:host": "172.23.29.125",
"odl-bgp-rib-impl-cfg:initiate-connection": true,
"odl-bgp-rib-impl-cfg:rib":
{
"type": "odl-bgp-rib-impl-cfg:rib",
"name": "example-bgp-rib"
}
,
"odl-bgp-rib-impl-cfg:peer-registry":
{
"type": "odl-bgp-rib-impl-cfg:bgp-peer-registry",
"name": "global-bgp-peer-registry"
}
,
"odl-bgp-rib-impl-cfg:port": 179,
"odl-bgp-rib-impl-cfg:advertized-table": [
{
"type": "odl-bgp-rib-impl-cfg:bgp-table-type",
"name": "ipv6-unicast"
}
,
{
"type": "odl-bgp-rib-impl-cfg:bgp-table-type",
"name": "linkstate"
}
,
{
"type": "odl-bgp-rib-impl-cfg:bgp-table-type",
"name": "flowspec"
}
,
{
"type": "odl-bgp-rib-impl-cfg:bgp-table-type",
"name": "ipv4-unicast"
}
],
"odl-bgp-rib-impl-cfg:holdtimer": 180,
"odl-bgp-rib-impl-cfg:remote-as": 65505
}
]
}
this fails with "500 Server Error".
From the controller logs I see:
2015-06-17 10:57:56,699 | TRACE | entLoopGroup-2-2 | InstanceConfig | 161 - org.opendaylight.controller.config-netconf-connector - 0.3.0.SNAPSHOT | Trying to set value AttributeConfigElement [defaultValue=null, value=MappedDependency
{namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='rib', refName='example-bgp-rib'}
] of attribute rib with org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving.ObjectNameAttributeResolvingStrategy@3abe1c4a
2015-06-17 10:57:56,699 | TRACE | entLoopGroup-2-2 | ctNameAttributeResolvingStrategy | 161 - org.opendaylight.controller.config-netconf-connector - 0.3.0.SNAPSHOT | Getting service instance by service name urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl : rib and ref name example-bgp-rib
2015-06-17 10:57:56,701 | DEBUG | entLoopGroup-2-2 | TransactionProvider | 161 - org.opendaylight.controller.config-netconf-connector - 0.3.0.SNAPSHOT | Aborting transaction org.opendaylight.controller:TransactionName=ConfigTransaction-83-105,type=ConfigTransaction
2015-06-17 10:57:56,701 | TRACE | entLoopGroup-2-2 | ConfigTransactionControllerImpl | 146 - org.opendaylight.controller.config-manager - 0.3.0.SNAPSHOT | Aborting transactionName=ConfigTransaction-83-105
2015-06-17 10:57:56,702 | TRACE | action-83-105'}} | DeadlockMonitor | 146 - org.opendaylight.controller.config-manager - 0.3.0.SNAPSHOT | Exiting DeadLockMonitorRunnable{TransactionIdentifier{name='ConfigTransaction-83-105'}}
2015-06-17 10:57:56,705 | ERROR | entLoopGroup-2-2 | NetconfOperationRouterImpl | 178 - org.opendaylight.controller.netconf-impl - 0.3.0.SNAPSHOT | Unexpected exception during netconf operation execution
java.lang.IllegalStateException: Unable to resolve value AttributeConfigElement [defaultValue=null, value=MappedDependency
{namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='rib', refName='example-bgp-rib'}
] to attribute rib
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.resolveConfiguration(InstanceConfig.java:131)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.fromXml(InstanceConfig.java:192)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ModuleConfig.fromXml(ModuleConfig.java:59)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config$1.resolveElement(Config.java:147)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config$1.resolveElement(Config.java:144)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config.resolveModule(Config.java:224)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Config.fromXmlModulesResolved(Config.java:152)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfigXmlParser$EditConfigExecution.getResolvedXmlElements(EditConfigXmlParser.java:174)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.setOnTransaction(EditConfig.java:184)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.test(EditConfig.java:120)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.executeTests(EditConfig.java:96)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.getResponseInternal(EditConfig.java:75)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.handleWithNoSubsequentOperations(EditConfig.java:308)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation.handle(AbstractLastNetconfOperation.java:33)[159:org.opendaylight.controller.netconf-util:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation.handle(AbstractNetconfOperation.java:100)[159:org.opendaylight.controller.netconf-util:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl$NetconfOperationExecution.execute(NetconfOperationRouterImpl.java:185)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl.executeOperationWithHighestPriority(NetconfOperationRouterImpl.java:114)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl.onNetconfMessage(NetconfOperationRouterImpl.java:87)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.processDocument(NetconfServerSessionListener.java:113)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.onMessage(NetconfServerSessionListener.java:86)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.onMessage(NetconfServerSessionListener.java:29)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:61)[169:org.opendaylight.controller.netconf-netty-util:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:32)[169:org.opendaylight.controller.netconf-netty-util:0.3.0.SNAPSHOT]
at org.opendaylight.protocol.framework.AbstractProtocolSession.channelRead0(AbstractProtocolSession.java:53)[151:org.opendaylight.controller.protocol-framework:0.6.0.SNAPSHOT]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)[174:io.netty.codec:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)[174:io.netty.codec:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:326)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:45)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:312)[148:io.netty.transport:4.0.26.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)[149:io.netty.common:4.0.26.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)[148:io.netty.transport:4.0.26.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)[149:io.netty.common:4.0.26.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[149:io.netty.common:4.0.26.Final]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
Caused by: java.lang.IllegalArgumentException: No service mapped to urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl:rib:example-bgp-rib. Wrong service type, available service types: [rib-instance, bgp-dispatcher, bgp-peer-registry, bgp-table-type]
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[94:com.google.guava:18.0.0]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.ServiceRegistryWrapper.getByServiceAndRefName(ServiceRegistryWrapper.java:36)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.resolving.ObjectNameAttributeResolvingStrategy.parseAttribute(ObjectNameAttributeResolvingStrategy.java:44)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml.AttributeConfigElement.resolveValue(AttributeConfigElement.java:43)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.InstanceConfig.resolveConfiguration(InstanceConfig.java:127)[161:org.opendaylight.controller.config-netconf-connector:0.3.0.SNAPSHOT]
... 41 more
2015-06-17 10:57:56,706 | TRACE | entLoopGroup-2-2 | NetconfServerSessionListener | 178 - org.opendaylight.controller.netconf-impl - 0.3.0.SNAPSHOT | Error occurred while processing message
NetconfDocumentedException{message=Unexpected error, errorType=application, errorTag=operation_failed, errorSeverity=error, errorInfo={error=java.lang.IllegalStateException: Unable to resolve value AttributeConfigElement [defaultValue=null, value=MappedDependency
{namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='rib', refName='example-bgp-rib'}
] to attribute rib}}
at org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl.handleUnexpectedEx(NetconfOperationRouterImpl.java:100)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.osgi.NetconfOperationRouterImpl.onNetconfMessage(NetconfOperationRouterImpl.java:89)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.processDocument(NetconfServerSessionListener.java:113)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.onMessage(NetconfServerSessionListener.java:86)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.impl.NetconfServerSessionListener.onMessage(NetconfServerSessionListener.java:29)[178:org.opendaylight.controller.netconf-impl:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:61)[169:org.opendaylight.controller.netconf-netty-util:0.3.0.SNAPSHOT]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:32)[169:org.opendaylight.controller.netconf-netty-util:0.3.0.SNAPSHOT]
at org.opendaylight.protocol.framework.AbstractProtocolSession.channelRead0(AbstractProtocolSession.java:53)[151:org.opendaylight.controller.protocol-framework:0.6.0.SNAPSHOT]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)[174:io.netty.codec:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)[174:io.netty.codec:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:326)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:45)[148:io.netty.transport:4.0.26.Final]
at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:312)[148:io.netty.transport:4.0.26.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)[149:io.netty.common:4.0.26.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)[148:io.netty.transport:4.0.26.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)[149:io.netty.common:4.0.26.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[149:io.netty.common:4.0.26.Final]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
2015-06-17 10:57:56,707 | TRACE | entLoopGroup-2-2 | SendErrorExceptionUtil | 159 - org.opendaylight.controller.netconf-util - 0.3.0.SNAPSHOT | Sending error <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>Unexpected error</error-message>
<error-info>
<error>java.lang.IllegalStateException: Unable to resolve value AttributeConfigElement [defaultValue=null, value=MappedDependency
{namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='rib', refName='example-bgp-rib'}
] to attribute rib</error>
</error-info>
</rpc-error>
</rpc-reply>
there's some pretty crunchy identity processing that happens in config.yang so am wondering if that's the issue?
|