Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Handling Errors While Editing the Candidate Configuration in a NETCONF Session

 

In a NETCONF session with a device running Junos OS, you can use NETCONF XML management protocol operations along with Junos XML or command-line interface (CLI) configuration statements to change the configuration on a routing, switching, or security platform. If the NETCONF server cannot incorporate the configuration data, the server returns the <rpc-error> tag element with information explaining the reason for the failure. By default, when the NETCONF server encounters an error while incorporating new configuration data into the candidate configuration, it halts the incorporation process. You can explicitly specify that the NETCONF server ignore errors or halt on error when incorporating new configuration data by including the <error-option> tag element.

A client application can explicitly specify that the NETCONF server stop incorporating new configuration data when it encounters an error. The application includes the <error-option> tag element with the value stop-on-error in the <edit-config> tag element.

Alternatively, the application can specify that the NETCONF server continue to incorporate new configuration data when it encounters an error. The application includes the <error-option> tag element with the value ignore-error in the <edit-config> tag element.

The client application can include the optional <test-option> tag element described in the NETCONF specification. Regardless of the value provided, the NETCONF server for the Junos OS performs a basic syntax check on the configuration data in the <edit-config> tag element. When the <test-option> tag is included, NETCONF performs a complete syntactic and semantic validation in response to the <commit> and <validate> tag elements (that is, when the configuration is committed or explicitly checked), but not in response to the <edit-config> tag element.