350-501 Automation and Quality of Services Practice Question
Which YANG data modeling construct is used to restrict a leaf value to be a reference to another leaf in the data tree?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
leafref
The 'leafref' type in YANG is used to restrict the value of a leaf to refer to another leaf in the data tree, enforcing referential integrity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
when
Why it's wrong here
'when' is used to make nodes conditional based on other data.
- ✓
leafref
Why this is correct
leafref ensures the value exists at the referenced leaf.
- ✗
must
Why it's wrong here
'must' is used for arbitrary XPath constraints.
- ✗
choice
Why it's wrong here
choice is used to select among alternatives.
Go deeper
Related to this question
About these practice questions
One of 971 original 350-501 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-501 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-501 exam.