4A0-AI1 practice question 4 of 15

What part of the YANG modules' tree structure are containers considered as?

Full set: 80 questions
Answer options
A: Leaves
B: Branches Correct answer
C: Roots
D: Trunk
Correct Answer:
B. Branches
Explanation

In the YANG data modeling language, the data is structured as a hierarchical tree. A container node is used to group related data nodes together. It does not have a value itself but contains other nodes (child nodes), which can be leaves, lists, or other containers. This function of grouping and containing other nodes makes it an interior node in the tree, which is conceptually equivalent to a "branch". The branches create the hierarchical structure of the data model.

Why Incorrect

A. Leaves are terminal nodes in the YANG tree that hold a single value; containers are grouping nodes, not terminal ones.
C. The root is the top-level of the entire data model, typically the module itself; containers are nodes organized within this model.
D. "Trunk" is not a standard term for a YANG data node; "branch" is the correct analogy for an interior, non-terminal node.

References

1. IETF RFC 7950, "The YANG 1.1 Data Modeling Language":

Section 7.5, "container Statement": This section defines the container statement as being "used to define an interior data node in the schema tree." An interior node is synonymous with a branch in a tree data structure, as it has child nodes.

Section 6.1, "Data Tree": This section describes the overall hierarchical data tree structure, distinguishing between nodes that hold data (leaves) and nodes that organize the structure (containers, lists), reinforcing the role of containers as structural branches.

2. Nokia SR OS Model-Driven Management Guide, Release 22.10.R1:

Chapter: "YANG data modeling", Section: "YANG node types": The documentation states, "A container node groups related nodes into a subtree. A container has only child nodes and no value." This description of grouping nodes into a subtree directly corresponds to the function of a branch in a tree.

Scroll to Top