When compiling a YANG module, instead of trying to deviate a tailf-common YANG extension from a YANG module (which doesn’t work), best practice is to annotate the YANG module with callpoints, actionpoints and validation elements from a separate annotation file.
This is useful for example when implementing a standard YANG module, without modifying the original file.
See ConfD UG, and the examples.confd/validate/c example:
In the given example if I add config false; then I get error error: unexpected keyword ‘config’
Can you please whats wrong if I add config false for some leaf or container?
The documentation (e.g. tailf_yang_extensions(5)) says:
tailf:annotate target
Annotates an existing statement with a 'tailf' statement or a
validation statement. [...]
Any 'tailf' statement, except 'symlink' and 'action' can be annotated.
The statements 'symlink' and 'action' modifies the data model, and are
thus not allowed.
The validation statements 'must', 'min-elements', 'max-elements',
'mandatory', 'unique', and 'when' can also be annotated.
A 'description' can also be annotated.
And thus you can’t add config false via tailf:annotate. But you can add it via a deviation, as the original example in this thread shows. Its mistake was to try to add a callpoint via deviation.