ConfD User Community

Regarding URL capability


#1

hi,

i want to delete my candidate datastore using delete-config by providing URL.

So what must be the content of the XML file that is placed in the remote location??


#2

Hi,
You mean like in this topic?

The XML file contain the config that you want to delete.


#3

hi cohult,

First of all, delete-config operation deletes the entire datastore or we can delete specific config as well???
Because as per RFC, it mentions entire datastore:

RFC 6241
7.4.

Description: Delete a configuration datastore. The
configuration datastore cannot be deleted.


#4

You will with the below commands delete the config file itself , here the “my-config.xml” file, not the ConfD CDB datastore config:

delete-config file:

<delete-config>
  <target>
    <url>file:///my-config.xml</url>
  </target>
</delete-config>

delete-config ftp server file:

<delete-config>
  <target>
    <url>ftp://myusr:mypass@localhost/my-config.xml</url>
  </target>
</delete-config>

#5

i want to delete my candidate datastore using delete-config by providing URL.

From the ConfD UG:

For the <delete-config> operation specified in RFC 4741 / RFC 6241, only <url> with scheme “file” is supported for the <target> parameter - i.e. no data stores can be deleted. The concept of deleting a data store is not well defined, and at odds with the transaction-based configuration management of ConfD. To delete the entire contents of a data store, with full transactional support, a <copy-config> with an empty <config/> element for the <source> parameter can be used.

So you want to do something like this:

<copy-config>
  <target>
    <candidate/>
  </target>
  <source>
    <config/>  
  </source>
</copy-config>