Replacing Configuration Elements Using NETCONF
In a NETCONF session with a device running Junos OS, to replace configuration elements, including hierarchy levels or configuration objects, in the candidate configuration, a client application emits the basic tag elements described in Changing Individual Configuration Elements Using NETCONF.
To represent the new definition for each configuration element
being replaced (either within the
<config-text> tag elements or in
the file specified by the
element), the application emits the tag elements representing its
parent hierarchy levels and its container tag element, as described
in Changing Individual Configuration Elements Using NETCONF. 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 new version of the element. In the
following example, the identifier tag element is called
<name>. The application includes the
operation="replace" attribute in the opening container
<!-- opening tags for each parent of the element -->
<!-- other child tag elements -->
<!-- closing tags for each parent of the element -->
The NETCONF server removes the existing element that has the specified identifiers and inserts the new element.
is not supported when loading configuration data into the ephemeral
The application can also replace all objects in the configuration in one operation. For instructions, see Replacing the Candidate Configuration Using NETCONF.
The following example shows how to grant new permissions for
the object named
operator at the [edit system login class] hierarchy