ConfD User Community

Edit the candidate datastore with mismatch tolerant

In some cases, when we try to edit a device candidate datastore, the configurations will have some mismatch with the Yang schema currently loaded in confd.
This case may happen when we try to copy the configurations from device A to device B, but confd A may have the leaf a while confd B doesn’t have.
In this case, when we send the edit netconf request, confd B will report error then prevent editing.
However, for this specific case, the best and most convenience approach is confd can accept editing it can accept (mismatch tolerant, try it best). We know this may be risky in some cases but we will be carefully.

So I wonder whether confd can support this kind of edit Netconf request with mismatch tolerant ?
The result should be candidate datastore is edited with all the configurations matched with schema.

Thanks in advance.

See -

      test-option:  The <test-option> element MAY be specified only if
         the device advertises the :validate:1.1 capability
         (Section 8.6).

         The <test-option> element has one of the following values:

         test-then-set:  Perform a validation test before attempting to
            set.  If validation errors occur, do not perform the
            <edit-config> operation.  This is the default test-option.

         set:  Perform a set without a validation test first.

         test-only:  Perform only the validation test, without
            attempting to set.

I.e. if you want to edit the candidate such that the result does not satisfy the constraints specified in the YANG module (which is perfectly reasonable per se), you need to pass <test-option>set</test-option>. Note though that <commit> will reject such a configuration - there is no way to write an invalid configuration to running.

Thanks for the inforamtion!