Skip to content

Get config false only nodes from tree #1041

@ianbarrere

Description

@ianbarrere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions