My yang file is as below. Requirement is to disable ‘delete’ operation on the main container and all mandatory leaves and lists. How can I do it?
container mycontainer {
leaf mandatory-leaf {
}
leaf optional-leaf {
}
list mandatory-list {
}
list optional-list {
}
}
Is it possible to hide the ‘delete’ command itself?
Requirement is to deny the operation but still seeing the delete command on the CLI is misleading.
My another problem is when I have rule to deny delete on the container, i am not able to delete optional parameters in the container. I did try to add rule to allow delete for those parameters but the delete-deny-of-container is overriding the optional parameter delete-allow
There is a way to hide the delete command but it will apply globally: You won’t be able to delete anything.
If this is what you want, you can use the clispec modifications node. You can find info on this in the user guide.
Example: