Skip to content

pyang validation for expanded i_children (i.e. set_phase_i_children) doesn't populate augments prior to reaching them. #881

@wenovus

Description

@wenovus

If there are augments, then prior to validation iteration reaching it, an augmented node does not appear in the parent node. I think this might be a bug since it is unintuitive to plugin writers.

I didn't get a chance to create a replicating issue, but I did see this issue in our openconfig plugin using openconfig models:
https://github.com/openconfig/oc-pyang/pull/54/files#diff-b9009a670813b4f2059da1df3ec89fa7650699e698a338fb5396ac21288d1218L910-L917

Where stmt.parent.i_children changed after validation reached the augmented nodes, which happened last and caused us to miss a style bug in the model which our plugin was intended to catch.

I saw this happening both when the checkers were added to reference_2, as well as in a new validation stage after it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions