Copy-config <target as url> : Error " <bad-element>url</bad-element>"

Hi Ramith,

First enable the url capability in your confd.conf ConfD configuration file by adding the following in the <capabilities> section of the <netconf> section:

 <url>
   <enabled>true</enabled>
   <file>
      <rootDir>/tmp</rootDir>
   </file>
 </url>

See https://tools.ietf.org/html/rfc6241#section-8.8 for more on the url capability.

Then you send a NETCONF <copy-config> operation like this:

<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <capabilities>
    <capability>urn:ietf:params:netconf:base:1.0</capability>
  </capabilities>
</hello>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <copy-config>
    <target>
      <url>file:///checkpoint.config</url>
    </target>
    <source>
      <running/>
    </source>
  </copy-config>
</rpc>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <close-session/>
</rpc>
]]>]]>

The above operation will copy the config in the running datastore to /tmp/checkpoint.config