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

Revision history [back]

click to hide/show revision 1
initial version

Restconf API is not working to add BGP Rib

Hi All,

I am using Opendaylight Integration version of Helium. when i use below API and feature:-

1) feature:install odl-bgpcep-bgp-all 2) feature:install odl-bgpcep-pcep-all 3) feature:install odl-restconf-noauth 4) feature:install odl-netconf-all. Rest API:- http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/ authntication: admin:admin , Content-Type: text/xml and Body fomat:- <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
<name>example-bgpls-rib</name>
<bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-rib-id>
<local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as> </module>

I am getting below error:

protocol invalid-value URI has bad format.

and exception on karaf console:-

opendaylight-user@root>Exception in thread "config-pusher" java.lang.IllegalStateException: Failed to send commit for configuration 39-pcep-provider.xml(odl-bgpcep-pcep-all,odl-bgpcep-pcep-topology-provider) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.sendRequestGetResponseCheckIsOK(ConfigPusherImpl.java:285) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfig(ConfigPusherImpl.java:239) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:128) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:101) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:76) at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:181) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Error - getInstance() failed for ModuleIdentifier{factoryName='pcep-topology-provider', instanceName='pcep-topology'} in transaction TransactionIdentifier{name='ConfigTransaction-95-97'} at org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerImpl.secondPhaseCommit(ConfigTransactionControllerImpl.java:405) at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.secondPhaseCommit(ConfigRegistryImpl.java:280) at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.commitConfig(ConfigRegistryImpl.java:227) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150) at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167) at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:252) at com.sun.proxy.$Proxy17.commitConfig(Unknown Source) at org.opendaylight.controller.config.util.ConfigRegistryJMXClient.commitConfig(ConfigRegistryJMXClient.java:102) at org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider.commitTransaction(TransactionProvider.java:138) at org.opendaylight.controller.netconf.confignetconfconnector.operations.Commit.handleWithNoSubsequentOperations(Commit.java:54) at org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation.handle(AbstractLastNetconfOperation.java:33) at org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation.handle(AbstractNetconfOperation.java:100) at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.sendRequestGetResponseCheckIsOK(ConfigPusherImpl.java:280) ... 6 more Caused by: java.util.MissingFormatArgumentException: Format specifier 's' at java.util.Formatter.format(Formatter.java:2487) at java.util.Formatter.format(Formatter.java:2423) at java.lang.String.format(String.java:2790) at org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.create(IncorrectNestingException.java:28) at org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.childNonNull(DataContainerCodecContext.java:178) at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.streamChild(DataObjectCodecContext.java:157) at org.opendaylight.yangtools.binding.data.codec.impl.BindingToNormalizedStreamWriter.enter(BindingToNormalizedStreamWriter.java:67) at org.opendaylight.yangtools.binding.data.codec.impl.BindingToNormalizedStreamWriter.startAugmentationNode(BindingToNormalizedStreamWriter.java:129) at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.TopologyTypes1$StreamWriter.serialize(DataObjectSerializerPrototype.java) at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry$DataObjectSerializerProxy.serialize(BindingNormalizedNodeCodecRegistry.java:295) at org.opendaylight.yangtools.binding.data.codec.util.AugmentableDispatchSerializer.emitAugmentation(AugmentableDispatchSerializer.java:79) at org.opendaylight.yangtools.binding.data.codec.util.AugmentableDispatchSerializer.serialize(AugmentableDispatchSerializer.java:51) at org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.TopologyTypes$StreamWriter.serialize(DataObjectSerializerPrototype.java) at org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology$StreamWriter.serialize(DataObjectSerializerPrototype.java) at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry$DataObjectSerializerProxy.serialize(BindingNormalizedNodeCodecRegistry.java:295) at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toNormalizedNode(BindingNormalizedNodeCodecRegistry.java:106) at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalizedNode(BindingToNormalizedNodeCodec.java:105) at org.opendaylight.controller.md.sal.binding.impl.AbstractWriteTransaction.put(AbstractWriteTransaction.java:42) at org.opendaylight.bgpcep.pcep.topology.provider.ServerSessionManager.<init>(ServerSessionManager.java:70) at org.opendaylight.bgpcep.pcep.topology.provider.PCEPTopologyProvider.create(PCEPTopologyProvider.java:59) at org.opendaylight.controller.config.yang.pcep.topology.provider.PCEPTopologyProviderModule.createInstance(PCEPTopologyProviderModule.java:135) at org.opendaylight.controller.config.spi.AbstractModule.getInstance(AbstractModule.java:73) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.opendaylight.controller.config.manager.impl.dependencyresolver.DependencyResolverManager$ModuleInvocationHandler.handleInvocation(DependencyResolverManager.java:150) at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) at com.sun.proxy.$Proxy32.getInstance(Unknown Source) at org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerImpl.secondPhaseCommit(ConfigTransactionControllerImpl.java:399) ... 36 more