Courseiva
Question 778 of 989
Infrastructure and AutomationhardMultiple ChoiceObjective-mapped

200-901 Infrastructure and Automation Practice Question

A developer is designing a data model for network device configurations using YANG. They need to represent a list of interfaces where each interface has a name (string) and speed (enumeration). Which YANG statement correctly defines this structure?

⚠ Common exam trap

Cisco often tests the requirement of the `key` statement in a YANG `list`; candidates may forget that a list without a key is syntactically invalid, leading them to choose option D.

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

list interface { key name; leaf name { type string; } leaf speed { type enumeration; } }

YANG requires a `list` statement to define a collection of entries with multiple leafs, and a `key` statement to uniquely identify each list entry. The `list interface` with `key name` allows multiple interfaces, each having both a `name` (string) and `speed` (enumeration), matching the requirement exactly.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • leaf interface-list { type string; }

    Why it's wrong here

    A leaf cannot represent multiple entries; use a list.

  • leaf-list interface { type string; }

    Why it's wrong here

    leaf-list is for a single-typed list, cannot group name and speed together.

  • list interface { key name; leaf name { type string; } leaf speed { type enumeration; } }

    Why this is correct

    This defines a list with a key, and two leaves for name and speed.

  • list interface { leaf name { type string; } leaf speed { type enumeration; } }

    Why it's wrong here

    A list must have a key leaf to uniquely identify each entry.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 200-901 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 200-901 exam.