The instantiation of this leaf node—also known as the
wire representation—in a NETCONF message includes
only the XML element and its value:
<intf-name>GigabitEthernet0/0</intf-name>
A leaf-list is a series of leaf nodes of a specific type. The
following list of trunk interfaces is an example of a leaf-
list:
Click here to view code image
leaf-list trunk-interfaces {
type string;
description "List of trunk interfaces";
}
The NETCONF XML instantiation of this model on the
wire would look like this:
Click here to view code image
<trunk-interfaces>TenGigabitEthernet0/1</trunk-
interfaces>
<trunk-interfaces>TenGigabitEthernet0/2</trunk-
interfaces>
<trunk-interfaces>TenGigabitEthernet0/3</trunk-
interfaces>
<trunk-interfaces>TenGigabitEthernet0/4</trunk-
interfaces>
A container is used to group related nodes within a
subtree. It has only child nodes and no value. A container
can contain any number of child nodes of any type.
Example 12-1 shows a container called statistics that
contains four leaf nodes of different types:
Example 12-1 YANG Container Example
Click here to view code image