<?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: Getting everything in a list object without creating a filter in Tools</title>
    <link>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4306488#M1207</link>
    <description>&lt;P&gt;Yes, you can get the entire content of the list in YDK-0.8.5. The examples for such CRUD Service operations are present in the online&amp;nbsp;&lt;A href="https://ygorelik.github.io/ydk-gen/guides/crud_guide.html#creating-and-reading-a-list" target="_self"&gt;documentation&lt;/A&gt;. In short, you need instantiate one list element without configuring any key and set a read filter operation on it. Here is a peace from the documented example, where we try to get route table from deeply rooted YANG model &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.yang&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="c1"&gt;# Create the list member instance Route()&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;route&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Rib&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrfs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Afs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Af&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Safs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Saf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableNames&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableName&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Routes&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Route&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="c1"&gt;# Set the yfilter attribute for the route instance&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;yfilter&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;YFilter&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;read&lt;/SPAN&gt;

&lt;SPAN class="c1"&gt;# Append the list element instance to its respective parent&lt;BR /&gt;&lt;/SPAN&gt;# (all the parent classes up to the top level container must be instantiated!!)&lt;BR /&gt;&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Rib&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrfs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Afs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Af&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Safs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Saf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableNames&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableName&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route_table_name&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;'default'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;routes&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;append&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;BR /&gt;&lt;BR /&gt;# Read the list&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route_table&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;crud&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;read&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;provider&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; table_names&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 19:11:40 GMT</pubDate>
    <dc:creator>yangorelik</dc:creator>
    <dc:date>2021-03-12T19:11:40Z</dc:date>
    <item>
      <title>Getting everything in a list object without creating a filter</title>
      <link>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4305439#M1206</link>
      <description>&lt;P&gt;Is there a way to get everything that a list contains without having to provide the keys for all elements in the list and getting them individually?&lt;/P&gt;&lt;P&gt;I.e. "ydk.models.ietf.ietf_diffserv_policy" contains a class "Policies" which again contains a list "PolicyEntry". Can I get all data from this list all at once? or do I have to get them one by one by creating a filter and providing their corresponding key "policy_name"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 08:31:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4305439#M1206</guid>
      <dc:creator>MahdiR</dc:creator>
      <dc:date>2021-03-11T08:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting everything in a list object without creating a filter</title>
      <link>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4306488#M1207</link>
      <description>&lt;P&gt;Yes, you can get the entire content of the list in YDK-0.8.5. The examples for such CRUD Service operations are present in the online&amp;nbsp;&lt;A href="https://ygorelik.github.io/ydk-gen/guides/crud_guide.html#creating-and-reading-a-list" target="_self"&gt;documentation&lt;/A&gt;. In short, you need instantiate one list element without configuring any key and set a read filter operation on it. Here is a peace from the documented example, where we try to get route table from deeply rooted YANG model &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.yang&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="c1"&gt;# Create the list member instance Route()&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;route&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Rib&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrfs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Afs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Af&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Safs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Saf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableNames&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableName&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Routes&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Route&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="c1"&gt;# Set the yfilter attribute for the route instance&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;yfilter&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;YFilter&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;read&lt;/SPAN&gt;

&lt;SPAN class="c1"&gt;# Append the list element instance to its respective parent&lt;BR /&gt;&lt;/SPAN&gt;# (all the parent classes up to the top level container must be instantiated!!)&lt;BR /&gt;&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;Cisco_IOS_XR_ip_rib_ipv4_oper&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Rib&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrfs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Vrf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Afs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Af&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Safs&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Saf&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableNames&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;IpRibRouteTableName&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route_table_name&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;'default'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="n"&gt;table_name&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;routes&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;append&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;BR /&gt;&lt;BR /&gt;# Read the list&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="n"&gt;route_table&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;crud&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;read&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;provider&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; table_names&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 19:11:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4306488#M1207</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2021-03-12T19:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting everything in a list object without creating a filter</title>
      <link>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4307359#M1208</link>
      <description>&lt;P&gt;Thank you Yan!&lt;/P&gt;&lt;P&gt;Your help as always is appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 09:14:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/getting-everything-in-a-list-object-without-creating-a-filter/m-p/4307359#M1208</guid>
      <dc:creator>MahdiR</dc:creator>
      <dc:date>2021-03-15T09:14:29Z</dc:date>
    </item>
  </channel>
</rss>

