Ask Your Question
0

Restconf API is not working to add BGP Rib

asked 2015-05-11 05:17:05 -0700

viru gravatar image

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 ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-05-11 05:26:12 -0700

viru gravatar image

if we install feature like below series:-

opendaylight-user@root>feature:install odl-bgpcep-bgp-all opendaylight-user@root>feature:install odl-bgpcep-pcep-all opendaylight-user@root>feature:install odl-restconf-noauth Refreshing bundles org.eclipse.persistence.moxy (144), org.eclipse.persistence.core (143), org.jboss.netty (184), com.google.guava (61) opendaylight-user@root>feature:install odl-netconf-connector-all opendaylight-user@root> opendaylight-user@root>

There is no "cofig-pusher" exception but i am getting below error.

applicationoperation-failedError creating data

edit flag offensive delete publish link more
0

answered 2015-05-12 03:48:03 -0700

Dana gravatar image

Try this URL for posting: http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/ . Can you paste exact error response from restconf? Should be an XML.

edit flag offensive delete publish link more

Comments

Hi Dana, i am using same API. i am getting below error:- <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"><error><error-type>application</error-type><error-tag>operation-failed</error-tag><error-message>Error creating data</error-message></error></errors> i have install the below feature in ODL integration:- 1)feature:install odl-bgpcep-bgp-all 2)feature:install odl-bgpcep-pcep-all 3)feature:install odl-netconf-all 4)feature:install odl-netconf-connector-all Even i am able to get the respose using same Rest API

viru ( 2015-05-12 05:31:53 -0700 )edit

Hi Dana, Even if we try to delete the existing RIB(default). we are not able to do it.but still can get it using same restAPI. On deletion, we are getting warning on karaf console" opendaylight-user@root>Warning: org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized. Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized." " please suggest me! Thanks !

viru ( 2015-05-12 05:46:14 -0700 )edit

I am still facing the error while adding bgp Rib via rest conf. The rest client console gives error:- <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"><error><error-type>application</error-type><error-tag>operation-failed</error-tag><error-message>Error creating data</error-message></error></errors> The details logs can be seen at - http://pastebin.com/uxfATGdf Any help will be highly appreciated.

viru ( 2015-05-13 03:46:01 -0700 )edit
0

answered 2015-06-19 03:52:23 -0700

Tony Tkacik gravatar image

updated 2015-06-19 03:53:27 -0700

Error log indicates you were using Lithium development branch, not Helium.

at org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.create(IncorrectNestingException.java:28),

IncorrectNestingException is only present in Lithium and Berrylium and was not backported to Lithium.

I believe as of now this is fixed for bgp and pcep.

edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2015-05-11 05:17:05 -0700

Seen: 531 times

Last updated: Jun 19 '15