[Contents] [Prev] [Next] [Index] [Report an Error]

Verifying a Configuration Before Committing It

During the process of committing the candidate configuration or a private copy, the NETCONF server confirms that it is syntactically correct. If the syntax check fails, the server does not commit the candidate. To avoid the potential complications of such a failure, it often makes sense to confirm the candidate’s correctness before actually committing it. A client application includes the <validate> and <source> tag elements and <candidate/> tag in an <rpc> tag element:

<rpc>
    <validate>
        <source>
            <candidate/>
        </source>
    </validate>
</rpc>
]]>]]>

The NETCONF server confirms that the candidate is valid by returning the <ok/> tag in the <rpc-reply> tag element:

<rpc-reply xmlns="URN" xmlns:junos="URL">
    <ok/>
</rpc-reply>
]]>]]>

If the candidate is not valid, the <rpc-reply> tag element instead encloses an <rpc-error> tag element explaining the reason for the failure.


[Contents] [Prev] [Next] [Index] [Report an Error]