Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

Validate your configuration changes — <validate>

An example of how to use the <validate> RPC to run the equivalent of the CLI validate command. This is optional, but useful to check that your changes are valid before you try to commit them.

Note: The validate RPC provides explicit validation. The commit RPC includes some implicit validation.
  1. To validate a set of changes to the existing Vyatta NOS configuration: Use the <validate> RPC.
    <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <validate>
        <source>
          <candidate/>
        </source>
      </validate>
    </rpc>
    ]]>]]>
  2. Optional: To validate a full off-box configuration without the need to first apply it to Vyatta NOS via <edit-config> or copy-config: Use the <config> element instead of the <source> element.
    <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <validate>
        <source>
          <config>
            <interfaces xmlns="urn:vyatta.com:mgmt:vyatta-interfaces:1">
            ...
            </interfaces>
            ...
          </config>
        </source>
      </validate>
    </rpc>
    ]]>]]>