To create configuration elements (hierarchy levels or configuration objects) in the candidate configuration only if the elements do not already exist, a client application emits the basic tag elements described in Changing Individual Configuration Elements.
To represent each configuration element being created (either within the <config>tag element or in the file named by the <url>tag element), the application emits the tag elements representing its parent hierarchy levels and its container tag element, as described in Changing Individual Configuration Elements. Within the container tag, the application includes each of the element’s identifier tag elements (if it has them) and all child tag elements (with values if appropriate) that are being defined for the element. In the following, the identifier tag element is called <name>. The application includes the operation="create" attribute in the opening container tag:
<configuration>
<!- - opening tags for each parent of the element - ->
<elementoperation="create">
<name>identifier</name> <!- - if the element has an identifier - ->
<!- - other child tag elements - ->
</element>
<!- - closing tags for each parent of the element - ->
</configuration>
The NETCONF server adds the new element to the candidate configuration only if there is no existing element of that name (for a hierarchy level) or with the same identifiers (for a configuration object).
The following example shows how to add a user to a C-series Controller if it is not already configured: