Chapter 5
Changing Configuration Data
Section 5.2.5
Validating Changes
You can validate the syntax of a specified configuration with the validate comment. Validation confirms the syntax
of the specified configuration. After making extensive changes to the candidate configuration, it is recommended
that your validate the candidate configuration before committing it.
To validate a configuration, do the following:
1.
Connect to and log in to the device.
2.
Issue an <rpc> request with the validation command:
<rpc message-id="103"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<validate>
<source>
<{configuration}/>
</source>
</validate>
</rpc>]]>]]>
• {configuration}
The configuration to validate: candidate or running.
For example, to validate the candidate configuration, issue this command:
<rpc message-id="103"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<validate>
<source>
<candidate/>
</source>
</validate>
</rpc>]]>]]>
If the configuration syntax is correct, the device responds with the following:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="103">
<ok/>
</rpc-reply>]]>]]>
If the configuration syntax is not correct, the device responds with an <rpc-error> message. For example:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="103">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-path xmlns:rmf_admin="http://ruggedcom.com/ns/rmf_admin">
/rmf_admin:admin/rmf_admin:authentication
</error-path>
<error-message xml:lang="en">/admin/authentication: admin/timezone must be set</error-message>
<error-info>
<bad-element>authentication</bad-element>
</error-info>
</rpc-error>
</rpc-reply>]]>]]>
• The <error-type>, <error-tag>, and <error-severity> elements provide information about the nature
of the syntax error.
50
RUGGEDCOM NETCONF
Reference Guide
Validating Changes