Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Commit a Private Copy of the Configuration Using the Junos XML Protocol

date_range 14-Jul-21

In a Junos XML protocol session with a device running Junos OS, to commit a private copy of the configuration so that it becomes the active configuration on the routing, switching, or security platform, a client application encloses the empty <commit-configuration/> tag in an <rpc> tag element (just as for the candidate configuration).

content_copy zoom_out_map
<rpc>
    <commit-configuration/>
</rpc>

The Junos XML protocol server creates a copy of the current candidate configuration, merges in the changes made to the private copy of the configuration, and then commits the combined candidate to make it the active configuration on the device. 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 opening <commit-results> tag and closing </commit-results> tags with nothing between.

content_copy zoom_out_map
<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 <routing-engine> element encloses the <commit-success/> tag and the <name> element, which reports the name of the Routing Engine on which the commit operation succeeded (re0 on devices that use a single Routing Engine, and either re0 or re1 on devices that can have two Routing Engines).

content_copy zoom_out_map
<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 CLI User Guide.

Most of the variants of the commit operation are available for a private copy.

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 Using the Junos XML Protocol.

external-footer-nav