-
Notifications
You must be signed in to change notification settings - Fork 120
Description
Is there a built-in or preferred way to get only config false nodes from a data tree?
The background here is that I'm writing a gNMI server component that serializes a ygot structure with some config false and some config true nodes. I'd like to be able to faithfully get either the CONFIG or OPERATIONAL leafs accordingly via a gNMI GetRequest. So I'm envisioning an option for EmitJSON or something that only outputs one or the other.
I see that there's PruneConfigFalse() in ygot, but this is the opposite of what I'd like to do. I could probably diff the output before and after running PruneConfigFalse() and determine it from there, but it seems rather hacky. I also see the IsConfig() function in util, but this would also require building something from scratch.