350-501 Automation and Quality of Services Practice Question
An SP uses NSO for service orchestration. A new service requires YANG data validation to ensure that the 'bandwidth' leaf does not exceed 10000 kbps when the 'service-type' is 'premium'. Which YANG statement is appropriate?
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
✓
must '. <= 10000' { error-message 'Bandwidth too high'; }
A 'must' expression in YANG provides a XPath condition that must evaluate to true for the data to be valid.
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 '. <= 10000'
Why it's wrong here
Incorrect; 'when' is used for conditional presence.
- ✗
leafref bandwidth { path '../bandwidth-limit'; }
Why it's wrong here
Incorrect; leafref references another leaf.
- ✓
must '. <= 10000' { error-message 'Bandwidth too high'; }
Why this is correct
Correct; 'must' validates the condition.
- ✗
range '0..10000';
Why it's wrong here
Incorrect; range is used for type restriction, not conditional.
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.