Verifying a Configuration Before Committing It
During the process of committing the candidate configuration or a private copy, the Junos XML protocol server confirms that it is syntactically correct. If the syntax check fails, the server does not commit the candidate. To avoid the potential complications of such a failure, it often makes sense to confirm the candidate’s correctness before actually committing it. The client application encloses the empty <check/> tag in <commit-configuration> and <rpc> tag elements:
<rpc>
<commit-configuration>
<check/>
</commit-configuration>
</rpc>
The Junos XML protocol server encloses its response in <rpc-reply>, <commit-results>, and <routing-engine> tag elements. If the syntax check succeeds, the <routing-engine> tag element encloses the <commit-check-success/> tag and the <name> tag element, which reports the name of the Routing Engine on which the check 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>
<routing-engine>
<name>(re0 | re1)</name>
<commit-check-success/>
</routing-engine>
</commit-results>
</rpc-reply>
If the syntax check fails, an <xnm:error> tag element encloses tag elements that describe the error.
The <check/> tag can be combined with the <synchronize/> tag, which is described in Verifying the Configuration on Both Routing Engines.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1