Display specific parts of YANG files, in a tree-like structure
An example of how to use the tree-path
option in the pyang utility to display a specific part of the YANG information structure.
$ pyang -f tree --tree-path=interfaces/dataplane/ip *.yang
module: vyatta-interfaces-v1
+--rw interfaces
+--rw vyatta-interfaces-dataplane-v1:dataplane* [tagnode]
+--rw vyatta-interfaces-dataplane-v1:ip
+--rw vyatta-interfaces-dataplane-v1:enable-proxy-arp? empty
+--rw vyatta-interfaces-dataplane-v1:rpf-check? enumeration
+--rw vyatta-interfaces-dataplane-v1:gratuitous-arp-count? uint32
+--rw vyatta-interfaces-dataplane-v1:gratuitous-arp
| +--rw vyatta-interfaces-dataplane-v1:request? garp-packet-action
| +--rw vyatta-interfaces-dataplane-v1:reply? garp-packet-action
+--rw vyatta-interfaces-dataplane-v1:disable-forwarding? empty
+--rw vyatta-interfaces-dataplane-unnumbered-v1:unnumbered
| +--rw vyatta-interfaces-dataplane-unnumbered-v1:donor-interface* [tagnode]
| +--rw vyatta-interfaces-dataplane-unnumbered-v1:tagnode union
| +--rw vyatta-interfaces-dataplane-unnumbered-v1:preferred-address? types:ipv4-address
+--rw vyatta-interfaces-tcp-mss-v1:tcp-mss!
| +--rw vyatta-interfaces-tcp-mss-v1:limit? uint16
| +--rw vyatta-interfaces-tcp-mss-v1:mtu? empty
| +--rw vyatta-interfaces-tcp-mss-v1:mtu-minus? uint16
+--rw vyatta-protocols-igmp-v1:igmp!
| +--rw vyatta-protocols-igmp-v1:querier!
| | +--rw vyatta-protocols-igmp-v1:forced? empty
| | +--rw vyatta-protocols-igmp-v1:querier-timeout? uint32
...