ConfD User Community

Validation on delete


#1

I have a list with many leaves. As part of some of the leaf entries, i have some validations to be done.

Now, how do i add validation on the list node delete ?

list xxx {

tailf:validate my_func <<<<<<<<<<< this gets called on any change in list
leaf aaa {

tailf:validate my_func1
}
leaf bbb {

tailf:validate my_func1
}
leaf cccc {
… <<<< no validation >>>
}

}


#2

This is being addressed in Chapter 9.6, Validation Points, in the ConfD User Guide. Depending on your use case, you can either define a XPATH must statement in your YANG model or add the validation point to other parts of the YANG model that the leaf node that is being deleted is dependent on.