# make all
# make start
# make cli
localhost# config
localhost(config)# mtest a_number 88
localhost(config)# commit
The following warnings were generated:
'mtest a_number': Dangerous value: 88
'mtest a_number': Dangerous value: 88
Proceed? [yes,no]
when I try the validate example, why does the validate callback invoked twice?
Something is definitely wrong in the 6.0 yang-compiler, it emits two warnings for missing tailf:dependency at the same line in mtest.annot.yang while the 6.1 compiler only emit one.
First confdc from ConfD 6.0:
/confd/confd6/confd-6.0/bin/confdc -c -a mtest.annot.yang mtest.yang
mtest.annot.yang:14: warning: The ‘tailf:validate’ expression should have a tailf:dependency. If it doesn’t, the function is called for every commit.
mtest.annot.yang:14: warning: The ‘tailf:validate’ expression should have a tailf:dependency. If it doesn’t, the function is called for every commit.
…
Then confdc from ConfD 6.1:
/confd/confd/confd-6.1/bin/confdc -c -a mtest.annot.yang mtest.yang
mtest.annot.yang:14: warning: The ‘tailf:validate’ expression should have a tailf:dependency. If it doesn’t, the function is called for every commit.
Toolchain: The YANG compiler applied annotations twice, which could
cause e.g. validation callbacks to be invoked twice for each
validation. This has been fixed.
The bug is also present in 5.4 (fixed in 5.4.4) and 6.0 (should be fixed in 6.0.4, not released yet).