Automation · YANG
Leaf Lists
Cheat sheet · https://pcornel.dk/topic.php?topic=5633
Answer
A YANG leaf-list holds several values of the same type, such as a list of DNS servers or permitted VLANs, without keys.
Remember
- A leaf-list holds several values of one type.
- It has no keys.
- ordered-by user keeps order.
First checks
pyang -f tree <module>.yang | grep '\*'— leaf-lists- Leaf-list ordering — semantics
- JSON array representation — payload
Verify in this order
leaf-list → array of values
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=5633