Candidate Configuration Support The Candidate Configuration feature enables support for candidate capability by implementing RFC 6241 with a simple commit option. The candidate datastore provides a temporary work space in which a copy of the device's running configuration is stored. You can create and modify the running configuration before committing the running configuration to the device. Candidate capability is indicated by the following NETCONF capability: urn:ietf:params:netconf:capability:candidate:1.0. This NETCONF capability indicates that the device supports the candidate datastore.
This is a shared data store which enables the user to create, add, delete, and make changes to the device configuration without affecting the running configuration on the device. A commit operation pushes the configuration from the candidate to the running configuration on the device. When the candidate data store is enabled, the running data store is not writable through NETCONF sessions, and all configurations get committed only through the candidate. In other words, the writable-running NETCONF capability is not enabled with the candidate configuration.
When a candidate datastore configuration changes, CONFd is re-initialized to adapt to the new configuration, and all management interfaces, gNMI, NETCONF, and RESTCONF experience a flap during the re-initialization. We recommend that you configure the Candidate Configuration feature before enabling NETCONF. If the candidate configuration is enabled or disabled through NETCONF, the connection is lost immediately after making this change. Note The candidate datastore is a shared data store and multiple NETCONF sessions can modify its contents simultaneously.
Therefore, it is important to lock the datastore before modifying the contents, to prevent conflicting commits that can eventually lead to the loss of any configuration changes. NETCONF Operations on Candidate The following operations can be performed on the candidate data store. The information in this section has been referenced from section 8.3.4 of RFC 6241. Please refer to the RFC for more details and the exact RPCs. Note Lock A RPC is used to lock the target data store. This prevents others users from modifying the configuration in the locked data store. Both candidate and running data can be locked through the lock operation.
Model-Driven Programmability Candidate Configuration Support Programmability Configuration Guide, Cisco IOS XE 17.16.x 176