Open freedanzman opened 1 year ago
IIRC, this is a defect in pyang. If you try yanglint
instead:
❯ /opt/git-repos/libyang/build/yanglint -f tree ietf-ipv4-unicast-routing.yang
module: ietf-ipv4-unicast-routing
augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes:
+--rw ipv4
+--rw route* [destination-prefix]
+--rw destination-prefix inet:ipv4-prefix
+--rw description? string
+--rw next-hop
+---u rt:next-hop-content
augment /rt:fib-route/rt:input/rt:destination-address:
+--rw address? inet:ipv4-address
augment /rt:fib-route/rt:output/rt:route:
+--rw destination-prefix? inet:ipv4-prefix
augment /rt:fib-route/rt:output/rt:route/rt:next-hop/rt:next-hop-options/rt:simple-next-hop:
+--rw next-hop-address? inet:ipv4-address
Unfortunately I cannot recall if a defect was raised against pyang.
ERRORS:
ATTEMPTED DIAGNOSIS:
ietf-routing.yang line 5:
ietf-ipv4-unicast-routing.yang lines 7-9:
ietf-ipv4-unicast-routing.yang lines 103-104:
The error seems to be saying that from the augment statement above, it cannot find "rt:routing-instance" under the "rt:routing" part of the model/tree in ietf-routing.yang.
ietf-routing.yang lines 500-526:
And yet "list routing-instance" is right there on line 523, right under the parent routing container (typical).
So... yeah. No idea why this is broken. I checked the syntax to make sure nothing was missing or misplaced in terms of {}s or ;s and that all seems legitimate to me. No idea why it cannot find routing-instance in the hierarchy when it is clearly there.
Similar problem with fib-route on ietf-ipv4-unicast-routing.yang lines 149/164/180. I was able to find fib-route in ietf-routing.yang line 669.
I must not know enough. Please teach me YANG wizards.
Cheers.