Closed ianbarrere closed 3 months ago
Have you tried interface.binding.config._unset_mtu()
?
Wow, did not even realize that was there. I must have missed it when looking through the code. This seems to do the trick, so I will close this issue. Thank you!
Hello,
It seems that there is no way to "unset" a leaf after it has been set, and I think this might be useful functionality. For example, looking at the MTU leaf in the OpenConfig interfaces module in particular. It seems to be initialized as 0 when populating a binding without an MTU set:
If I then set it to some non-zero value, it shows up as I would expect:
But I can't remove it after it's been set. If I try "del interface.binding.config.mtu" I get an error about it not having a deleter:
Even if I set it back to 0 it still shows up in the serialization as "mtu": 0. I know I can set it to the default of 1500, for example, but it would be nice to be able to remove the leaf entirely from the serialization like it was to begin with.