Verify the Candidate Configuration Syntax Using NETCONF
In a NETCONF session with a device running Junos OS, during the process of committing the candidate configuration or a private copy, the NETCONF server confirms that the configuration is syntactically correct. If the syntax check fails, the server does not commit the candidate configuration. To avoid the potential complications of such a failure, it often makes sense to confirm the correctness of the candidate configuration before actually committing it.
In a NETCONF session with a device running Junos OS, to verify
the syntax of the candidate configuration, a client application includes
the <validate>
and <source>
tag elements and the <candidate/>
tag
in an <rpc>
tag element:
<rpc> <validate> <source> <candidate/> </source> </validate> </rpc> ]]>]]>
The NETCONF server confirms that the candidate configuration
syntax is valid by returning the <ok/>
tag in the <rpc-reply>
tag element:
<rpc-reply xmlns="URN" xmlns:junos="URL"> <ok/> </rpc-reply> ]]>]]>
If the candidate configuration syntax is not valid, the server
returns the <rpc-reply>
element and <rpc-error>
child element, which explains the reason
for the error.