<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: List versus Leaf-List nodes in YANG in Tools</title>
    <link>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311864#M3720</link>
    <description>&lt;P&gt;They way I finally got this was, thinking like&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;leaf list&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;&lt;SPAN&gt;is like &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;&lt;SPAN&gt;&amp;nbsp;simple array of single values [“a”, “b”, “c”]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;but a list&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;like a array of objects&lt;/SPAN&gt;&lt;SPAN&gt;, where each object has properties, multiple fields [{name: “eth0”, mtu: 1500}, {name:”eth1”, mtu: 9000}]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 13:09:22 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2025-07-21T13:09:22Z</dc:date>
    <item>
      <title>List versus Leaf-List nodes in YANG</title>
      <link>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311858#M3718</link>
      <description>&lt;P&gt;Hello, everyone.&lt;/P&gt;
&lt;P&gt;I am studying automation for my ENCOR exam.&lt;/P&gt;
&lt;P&gt;I have a quick question - what is the difference between a leaf-list node and a list node in YANG models? Google defines them as:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Leaf-list node&lt;/STRONG&gt; — Contains a sequence of leaf nodes &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;List node&lt;/STRONG&gt; — Contains a sequence of list entries, each of which is uniquely identified by one or more key leafs&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am a bit confused about the explanations above, they seem somewhat the same to me. Could someone please tell me what is the major distinction here? Both represent some form of a list/array that contains multiple nodes, right?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&lt;BR /&gt;David&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 12:57:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311858#M3718</guid>
      <dc:creator>Mitrixsen</dc:creator>
      <dc:date>2025-07-21T12:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: List versus Leaf-List nodes in YANG</title>
      <link>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311860#M3719</link>
      <description>&lt;P&gt;hello G.&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Leaf-list&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;= Simple array of single-value items (like&amp;nbsp;[10, 20, 30]&lt;/SPAN&gt;&lt;SPAN&gt;). Example: VLAN lists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;List&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;= Structured table with keyed entries (like&amp;nbsp;[{name: "Gi0/1", mtu: 1500}, {...}]&lt;/SPAN&gt;&lt;SPAN&gt;). but some more key difference would be that&amp;nbsp;Leaf-list values have no sub-fields, and also&amp;nbsp;List entries have multiple attributes and require unique keys...&lt;BR /&gt;&lt;/SPAN&gt;Example YANG:&lt;/LI&gt;&lt;/UL&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;leaf-list vlans { type uint16; }  // Simple values
list interface {                  // Structured data
  key "name";
  leaf name { type string; }
  leaf mtu { type uint16; }
}&lt;/LI-CODE&gt;&lt;P&gt;and for Encor I'd say use leaf-list for basic value arrays and&amp;nbsp;for complex configurations needing keys&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;check these links G;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://datatracker.ietf.org/doc/html/rfc6020#section-7.6" target="_blank" rel="noopener"&gt;https://datatracker.ietf.org/doc/html/rfc6020#section-7.6&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/products-installation-and-configuration-guides-list.html#!yang-overview" target="_blank" rel="noopener"&gt;https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/products-installation-and-configuration-guides-list.html#!yang-overview&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://developer.cisco.com/docs/nso-guides-6.3/the-yang-data-modeling-language/" target="_blank" rel="noopener"&gt;https://developer.cisco.com/docs/nso-guides-6.3/the-yang-data-modeling-language/&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://www.youtube.com/watch?v=zy9QA-uU0u4" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=zy9QA-uU0u4&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;hope it helps\&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Enes&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 13:05:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311860#M3719</guid>
      <dc:creator>Enes Simnica</dc:creator>
      <dc:date>2025-07-21T13:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: List versus Leaf-List nodes in YANG</title>
      <link>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311864#M3720</link>
      <description>&lt;P&gt;They way I finally got this was, thinking like&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;leaf list&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;&lt;SPAN&gt;is like &lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;&lt;SPAN&gt;&amp;nbsp;simple array of single values [“a”, “b”, “c”]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;but a list&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;like a array of objects&lt;/SPAN&gt;&lt;SPAN&gt;, where each object has properties, multiple fields [{name: “eth0”, mtu: 1500}, {name:”eth1”, mtu: 9000}]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 13:09:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311864#M3720</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-07-21T13:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: List versus Leaf-List nodes in YANG</title>
      <link>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311865#M3721</link>
      <description>&lt;P&gt;Hello David,&lt;/P&gt;
&lt;P&gt;First, a leaf node hold a single, simple value (like an integer or string) and has no child nodes.&lt;/P&gt;
&lt;P&gt;-&amp;gt; A leaf-list node is a collection of such leaf nodes _ each entry contain exactly one value of a specific type, essentialy forming a flat list of simple values.&lt;/P&gt;
&lt;P&gt;On the other hand, a list node is more complex: it defines a sequence of structured entries (like records), each uniquely identified by one or more key leaf nodes. Each entry in a list node can have multiple child node of any type, making it suitable for representing more detailed/hierarchical data structure.&lt;/P&gt;
&lt;P&gt;--&lt;A href="https://support.huawei.com/enterprise/en/doc/EDOC1100332772/eefbe002/node-types-of-a-yang-model" target="_blank" rel="noopener"&gt;https://support.huawei.com/enterprise/en/doc/EDOC1100332772/eefbe002/node-types-of-a-yang-model&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 13:13:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/list-versus-leaf-list-nodes-in-yang/m-p/5311865#M3721</guid>
      <dc:creator>M02@rt37</dc:creator>
      <dc:date>2025-07-21T13:13:40Z</dc:date>
    </item>
  </channel>
</rss>

