Pcornel
Automation · YANG

Leafs

Cheat sheet · https://pcornel.dk/topic.php?topic=5632

Back to the Topic

Answer

A YANG leaf holds a single value of a defined type, such as an interface's mtu or description, and is the endpoint of the data tree.

Remember

  • A leaf holds one typed value.
  • It may be mandatory or have a default.
  • It is the end of a branch.

First checks

  • pyang -f tree <module>.yang | grep -E 'leaf|--rw' — leafs
  • Leaf types and defaults — values
  • mandatory leafs — required

Verify in this order

leaf → typed value

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5632

Confirmation

Confirm action

Continue?