Ask Your Question

Edit-config rpc on remote netconf server using restconf

asked 2014-09-03 02:49:47 -0700

ankit21a gravatar image
Hi All,
I want to make changes in configuration of my remote netconf device for which we can use edit-config rpc but i am not clear with formation of restconf url and input for the same.

i tried following ways but no luck please guide me how can i edit the configuration of remote netconf server using restconf.

1.   I checked the api explorer but i could not find any module which has edit-config rpc in it and neither it is defined on any schema of remote netconf device.I am bit skeptical about it that whether edit-config is actuall name of rpc method in any module. 

2.  http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/config:module/threadfactory22 with headers:

Accept application/xml
Content-Type application/xml
and content:

<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
  <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl">prefix:threadfactory-naming</type>
  <th-java:name-prefix xmlns:th-java="urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl">remote-connector-processing-executor</th-java:name-prefix>

What this does is, create entry for list:module under container:modules with key threadfactory22 (thats the name). It is possible to use json, but I am testing with xml most of the time.

 In same way i tried with 
   <configuration   xmlns="">

But could not get success
I am stuck with this, please let me know how i can perform this .
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-07 05:43:55 -0700

Martin Volf gravatar image

I think the URL can be shorter in your case, like http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount - the element configuration is already part of the contents. I'm using curl for pretty much the same task:

curl -d @new_dh_policy.xml -H 'Content-Type: application/xml' 'http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/mconfd/yang-ext:mount/'

This sends a POST request with the contents of the file.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2014-09-03 02:49:47 -0700

Seen: 456 times

Last updated: Sep 07 '14