Chapter 5
Changing Configuration Data
RUGGEDCOM NETCONF
Reference Guide
50
Validating Changes
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.
Содержание RUGGEDCOM MX5000RE
Страница 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Страница 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Страница 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Страница 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Страница 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Страница 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...