Validate capability

This capability indicates that the device can deliver configurations without considering the configuration sequence. During the delivery, the device only checks the syntactic validity of configurations rather than the configuration sequence. The device checks semantic validity when committing the configurations. After correcting the configuration delivery sequence, the device commits the configurations to the <running/> configuration database.

Before performing the <validate> operation, locking the <running/> configuration database is advised to prevent adverse impacts on the validate operation when other users operate the <running/> configuration database.

If the NMDA data set is supported, the data set format in the source configuration database is different, as shown in the following:

Validate checks are classified into syntactic checks and semantic checks.
  • Syntactic check: RPC packet validity, model matching, data type, value range, authorization, whether existing data is to be created or nonexistent data is to be deleted, and whether the parent node exists
  • Semantic check: semantic items, such as the dependency between configurations

The <source> parameter of the Validate operation supports only <candidate/> and <running/>.

If the validate capability is supported, the <edit-config> operation can carry the test-option parameter. The value of the <test-option> parameter can be test-then-set, set, or test-only. If this parameter is not carried in the <edit-config> operation, the system uses the test-then-set process by default.
  • <test-then-set>: The system checks the delivered configurations for syntactic and semantic errors. If the check succeeds, the system modifies the configuration. If the check fails, the system displays a failure message and the failure cause and does not modify the configuration.
  • <set>: The system checks configurations for syntactic errors. After the check succeeds, the system commits the configurations to the <candidate/> configuration database. Semantic errors are not checked. However, when performing the <commit> or <confirmed-commit> operation, the system checks configurations for semantic errors and commits the configurations to the <running/> configuration database after the check succeeds.
  • <test-only>: The system checks configurations only for syntactic and semantic errors and reports the check result without committing the configurations to any configuration database.
Change the interface name of the IFM feature to text in the <running/> configuration database and perform a syntactic and semantic check.
  • RPC request

    <?xml version="1.0" encoding="utf-8"?>
    <rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <edit-config>
        <target>
          <running/>
        </target>
        <test-option>test-then-set</test-option>
        <config>
          <ifm xmlns="urn:huawei:yang:huawei-ifm">
            <interfaces>
              <interface xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
                <name>GigabitEthernet1/0/0</name>
                <description>text</description>
              </interface>
            </interfaces>
          </ifm>
        </config>
      </edit-config>
    </rpc>
  • RPC reply

    <?xml version="1.0" encoding="utf-8"?>
    <rpc-reply xmlns:nc-ext="urn:huawei:yang:huawei-ietf-netconf-ext"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
               message-id="2"
               nc-ext:flow-id="27">
      <ok/>
    </rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >