Pcornel
Automation · YANG

Lists

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

Back to the Topic

Answer

A YANG list holds multiple entries identified by a key, such as interfaces keyed by name, each entry with the same set of child nodes.

Remember

  • Lists hold entries identified by keys.
  • All entries share the same children.
  • Keys appear in RESTCONF URIs.

First checks

  • pyang -f tree <module>.yang | grep '\[' — lists with keys
  • List key in RESTCONF URL (=key) — addressing
  • ordered-by user — ordering

Verify in this order

list[key] → entries

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=5631

Confirmation

Confirm action

Continue?