To commit a private copy of the configuration so that it becomes the active configuration on the routing platform, a client application encloses the empty <commit-configuration/> tag in an <rpc> tag element (just as for the candidate configuration):
<rpc>
<commit-configuration/>
</rpc>
The JUNOScript server creates a copy of the current regular candidate configuration, merges in the changes made to the private copy, and commits the combined candidate to make it the active configuration on the routing platform. The server reports the results of the commit operation in <rpc-reply> and <commit-results> tag elements.
If the private copy does not include any changes, the server emits the <commit-results> and </commit-results> tags with nothing between them:
<rpc-reply xmlns:junos="URL">
<commit-results>
</commit-results>
</rpc-reply>
If the private copy includes changes and the commit operation succeeds, the server emits the <load-success/> tag when it merges the changes in the private copy into the candidate configuration. The subsequent <routing-engine> tag element encloses the <commit-success/> tag and the <name> tag element, which reports the name of the Routing Engine on which the commit operation succeeded (re0 on routing platforms that use a single Routing Engine, and either re0 or re1 on routing platforms that can have two Routing Engines):
<rpc-reply xmlns:junos="URL">
<commit-results>
<load-success/>
<routing-engine>
<name>(re0 | re1)</name>
<commit-success/>
</routing-engine>
</commit-results>
</rpc-reply>
If the private copy includes changes that conflict with the regular candidate configuration, the commit fails. The <load-error-count> tag element reports the number of errors and an <xnm:error> tag element encloses tag elements that describe the error.
There are restrictions on committing a private copy. For example, the commit fails if the regular candidate configuration is locked by another user or application, or if it includes uncommitted changes made since the private copy was created. For more information, see the JUNOS CLI User Guide.
Most of the variants of the commit operation are available for a private copy. The variants are described in subsequent sections in this chapter:
![]() |
Note: The confirmed-commit operation is not available for a private copy. For information about using that operation for the regular candidate configuration, see Committing the Candidate Configuration Only After Confirmation. |