By default, the NETCONF server merges new configuration data into the candidate configuration, according to the following rules:
Merge mode applies to all elements in the new configuration that do not have the operation attribute in their opening container tag to specify a different mode. (For information about the operation attribute, see Changing Individual Configuration Elements.)
Merge mode is the default mode for incorporating new configuration data (it is used when a client application does not specify a different mode). To explicitly specify merge mode, the application can include the <default-operation> tag element with the value merge in the <edit-config> tag element:
<rpc>
<edit-config>
<default-operation>merge</default-operation>
<!- - other child tag elements of the <edit-config> tag element - ->
</edit-config>
</rpc>
]]>]]>
The client application can specify one of two alternative default modes for incorporating new configuration data:
<rpc>
<edit-config>
<default-operation>replace</default-operation>
<!- - other child tag elements of the <edit-config> tag element - ->
</edit-config>
</rpc>
]]>]]>
We recommend using replace mode only when you completely overwrite the candidate configuration with new configuration data. When the default mode is replace, we do not recommend including the operation attribute on individual configuration elements in the new configuration to specify a different incorporation mode for them.
It is also possible to replace individual configuration elements while merging or creating others. See Replacing Configuration Elements.
<rpc>
<edit-config>
<default-operation>none</default-operation>
<!- - other child tag elements of the <edit-config> tag element - ->
</edit-config>
</rpc>
]]>]]>
If the new configuration data includes a configuration element that does not exist in the candidate, the NETCONF server returns an error. We recommend using no-change mode only when you remove configuration elements from the candidate configuration. When creating or modifying elements, applications need to use merge mode.