In my yang model, I have a few elements that need to be validated with external Python code.
Let’s say that in the same module I have leaves A and B that need to be validated, each of which with different Python code.
Using the “tailf:validate” extension, should I declare (and register in the Python code) a different validation call back for each leaf above or do I register one callback only, which will validate everything in sequence?
This:
leaf A {
type string;
tailf:validate vp {
tailf:dependency ".";
}
}
leaf B {
type string;
tailf:validate vp {
tailf:dependency ".";
}
}
or this:
leaf A {
type string;
tailf:validate vpA {
tailf:dependency ".";
}
}
leaf B {
type string;
tailf:validate vpB {
tailf:dependency ".";
}
}