350-501 Automation and Quality of Services Practice Question
An SP engineer is using YANG to model a service. Which statement correctly describes the use of a 'leafref' type?
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
✓
It restricts the leaf value to match another leaf's value
Leafref references an existing leaf in the YANG data tree, ensuring consistency.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It performs data validation using XPath
Why it's wrong here
Leafref uses simple path references, not full XPath.
- ✗
It defines a new leaf with a default value
Why it's wrong here
Leafref does not define a new leaf but references an existing one.
- ✓
It restricts the leaf value to match another leaf's value
Why this is correct
Leafref enforces that the value must equal the value of the referenced leaf.
- ✗
It allows multiple values to be selected
Why it's wrong here
Leafref is for a single value; leaf-list is for multiple.
Go deeper
Related to this question
About these practice questions
This 350-501 question is part of Courseiva's 971-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.