<?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: bgp_oper unable to read for a particular vrf_name in Tools</title>
    <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4178741#M1719</link>
    <description>&lt;P&gt;Sorry, I cannot help you being outside Cisco, because I do not have access to your router and public XR sandbox does not have BGP configuration.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 17:18:53 GMT</pubDate>
    <dc:creator>yangorelik</dc:creator>
    <dc:date>2020-11-04T17:18:53Z</dc:date>
    <item>
      <title>bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4177166#M1716</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;I need to get only vrf operational data under BGP, but am getting an error when I try to read it. Please guide me on how I can get the required output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;ydk.models.cisco_ios_xr&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Cisco_IOS_XR_ipv4_bgp_oper&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;xr_ipv4_bgp_oper&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;#BGP&amp;nbsp;instances&amp;nbsp;data:&amp;nbsp;Instance&amp;nbsp;specific&amp;nbsp;BGP&amp;nbsp;data&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bgp_oper_obj&amp;nbsp;=&amp;nbsp;xr_ipv4_bgp_oper.Bgp()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_instance_list&amp;nbsp;=&amp;nbsp;bgp_oper_obj.Instances()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_instance_list_obj&amp;nbsp;=&amp;nbsp;bgp_oper_instance_list.Instance()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_active_instance_obj&amp;nbsp;=&amp;nbsp;bgp_oper_instance_list_obj.InstanceActive()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_instance_list.instance.append(bgp_oper_instance_list_obj)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_active_instance_vrf_list&amp;nbsp;=&amp;nbsp;bgp_oper_active_instance_obj.Vrfs()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_active_instance_vrf_list_obj&amp;nbsp;&amp;nbsp;=&amp;nbsp;bgp_oper_active_instance_vrf_list.Vrf()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_active_instance_vrf_list_obj.vrf_name&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"TEST-VRF"&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bgp_oper_active_instance_vrf_list.vrf.append(bgp_oper_active_instance_vrf_list_obj)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;crud_service.read(device_netconf,bgp_oper_active_instance_vrf_list_obj)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I am trying to get oper data for TEST-VRF vrf.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;i get the below error when I run the script.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV id="tinyMceEditorarynair_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorarynair_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "assurance_master.py", line 149, in &amp;lt;module&amp;gt;&lt;BR /&gt;bgp_oper_main(device_netconf ,device_input)&lt;BR /&gt;File "assurance_master.py", line 108, in bgp_oper_main&lt;BR /&gt;crud_service.read(device_netconf,bgp_oper_active_instance_vrf_list_obj)&lt;BR /&gt;File "/usr/local/lib/python3.5/dist-packages/ydk/services/crud_service.py", line 63, in read&lt;BR /&gt;top_filters = _get_top_level_entity(filters, provider.get_session().get_root_schema())&lt;BR /&gt;File "/usr/local/lib/python3.5/dist-packages/ydk/entity_utils/entity_utils.py", line 216, in _get_top_level_entity&lt;BR /&gt;data_node = get_data_node_from_entity(top_entity, root_schema)&lt;BR /&gt;RuntimeError: YInvalidArgumentError: ancestor for entity cannot be nullptr as one of the ancestors is a list. Path: vrfs&lt;BR /&gt;Disconnected from device&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:04:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4177166#M1716</guid>
      <dc:creator>arynair</dc:creator>
      <dc:date>2020-11-02T07:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4177729#M1717</link>
      <description>&lt;P&gt;Hello arynair&lt;/P&gt;&lt;P&gt;1. When building model objects you have to keep in mind that all container and list related objects are already initialized in the parent object instances. As example for your script, the &lt;EM&gt;instances&lt;/EM&gt; container object under&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;bgp_oper_obj&lt;/EM&gt; has&amp;nbsp;&lt;/SPAN&gt;already been instantiated and can be referenced as&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;bgp_oper_obj.instances&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;When building a list you have to instantiate list element objects and &lt;STRONG&gt;explicitly&lt;/STRONG&gt; set all keys of the element. Then you add the list element object to the list object, which is automatically&amp;nbsp;&lt;/SPAN&gt;instantiated as container objects.&lt;/P&gt;&lt;P&gt;Considering the above notes your object building would look like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.services &lt;SPAN&gt;import &lt;/SPAN&gt;CRUDService&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.providers &lt;SPAN&gt;import &lt;/SPAN&gt;NetconfServiceProvider&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.models.cisco_ios_xr &lt;SPAN&gt;import &lt;/SPAN&gt;Cisco_IOS_XR_ipv4_bgp_oper &lt;SPAN&gt;as &lt;/SPAN&gt;xr_ipv4_bgp_oper&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;enable_logging&lt;/SPAN&gt;(level):&lt;BR /&gt;    log = logging.getLogger(&lt;SPAN&gt;'ydk'&lt;/SPAN&gt;)&lt;BR /&gt;    log.setLevel(level)&lt;BR /&gt;    handler = logging.StreamHandler()&lt;BR /&gt;    formatter = logging.Formatter(&lt;BR /&gt;            &lt;SPAN&gt;"%(asctime)s - %(name)s - %(levelname)s - %(message)s"&lt;/SPAN&gt;)&lt;BR /&gt;    handler.setFormatter(formatter)&lt;BR /&gt;    log.addHandler(handler)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;build_bgp_vrf_obj&lt;/SPAN&gt;():&lt;BR /&gt;    bgp_oper_obj = xr_ipv4_bgp_oper.Bgp()&lt;BR /&gt;&lt;BR /&gt;    bgp_oper_instance_list_obj = xr_ipv4_bgp_oper.Bgp.Instances.Instance()&lt;BR /&gt;    bgp_oper_instance_list_obj.instance_name = &lt;SPAN&gt;'default'&lt;BR /&gt;&lt;/SPAN&gt;    bgp_oper_obj.instances.instance.append(bgp_oper_instance_list_obj)&lt;BR /&gt;&lt;BR /&gt;    bgp_oper_active_instance_vrf_list_obj = xr_ipv4_bgp_oper.Bgp.Instances.Instance.InstanceActive.Vrfs.Vrf()&lt;BR /&gt;    bgp_oper_active_instance_vrf_list_obj.vrf_name = &lt;SPAN&gt;"TEST-VRF"&lt;BR /&gt;&lt;/SPAN&gt;    bgp_oper_instance_list_obj.instance_active.vrfs.vrf.append(bgp_oper_active_instance_vrf_list_obj)&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;bgp_oper_instance_list_obj&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;__name__ == &lt;SPAN&gt;'__main__'&lt;/SPAN&gt;:&lt;BR /&gt;&lt;BR /&gt;    enable_logging(logging.INFO)&lt;BR /&gt;&lt;BR /&gt;    provider = NetconfServiceProvider(&lt;BR /&gt;        &lt;SPAN&gt;address&lt;/SPAN&gt;=&lt;SPAN&gt;'sbx-iosxr-mgmt.cisco.com'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;port&lt;/SPAN&gt;=&lt;SPAN&gt;10000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;username&lt;/SPAN&gt;=&lt;SPAN&gt;'admin'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;password&lt;/SPAN&gt;=&lt;SPAN&gt;'C1sco12345'&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;    crud = CRUDService()&lt;BR /&gt;    bgp_vrf_obj = build_bgp_vrf_obj()&lt;BR /&gt;    vrf_oper = crud.read(provider&lt;SPAN&gt;, &lt;/SPAN&gt;bgp_vrf_obj)&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2020 04:20:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4177729#M1717</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-11-03T04:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4178330#M1718</link>
      <description>&lt;P&gt;Hi Yan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Facing Ycode error when trying to read all bgp oper info with top level object. (No filter)&lt;/P&gt;
&lt;P&gt;The code breaks with same error.&lt;/P&gt;
&lt;P&gt;bgp_oper_obj = xr_ipv4_bgp_oper.Bgp()&lt;/P&gt;
&lt;P&gt;I mean when only this line is in the code, not including others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Couldn't fetch child entity extended-nh-encoding-capability-suppressed-info in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/config-instances/config-instance[instance-name='default']/config-instance-default-vrf/entity-configurations/entity-configuration[1]/af-independent-config!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "assurance_master.py", line 165, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bgp_oper_main(device_netconf ,device_input)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "assurance_master.py", line 122, in bgp_oper_main&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a = crud_service.read(device_netconf,bgp_oper_instance_list_obj)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "/usr/local/lib/python3.5/dist-packages/ydk/services/crud_service.py", line 65, in read&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;read_top_entity = self._crud.read(provider, top_filters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.gen.throw(type, value, traceback)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_raise(_exc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "/usr/local/lib/python3.5/dist-packages/ydk/errors/error_handler.py", line 54, in _raise&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;exec("raise exc from None")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ydk.errors.YCoreError: Couldn't fetch child entity 'extended-nh-encoding-capability-suppressed-info' in parent /Cisco-IOS-XR-ipv4-bgp-oper:bgp/config-instances/config-instance[instance-name='default']/config-instance-default-vrf/entity-configurations/entity-configuration[1]/af-independent-config&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 04:10:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4178330#M1718</guid>
      <dc:creator>arynair</dc:creator>
      <dc:date>2020-11-04T04:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4178741#M1719</link>
      <description>&lt;P&gt;Sorry, I cannot help you being outside Cisco, because I do not have access to your router and public XR sandbox does not have BGP configuration.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:18:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4178741#M1719</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-11-04T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4180188#M1720</link>
      <description>&lt;P&gt;What XR bundle version are you using?&amp;nbsp; What XR version is running on the device?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 22:53:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4180188#M1720</guid>
      <dc:creator>saalvare</dc:creator>
      <dc:date>2020-11-06T22:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4180664#M1721</link>
      <description>&lt;P&gt;xr version on device is 7.0.2, xr bundle version on ydk is 6.6.2&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="588_218_1.5.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/88034i9EE0B6DBBFA4CA1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="588_218_1.5.png" alt="588_218_1.5.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; I am having similar trouble with the rib-ipv4-oper module as well:&lt;/P&gt;
&lt;P&gt;attaching log for the filter, and output received before the code breaks. I am trying to retrieve the route information, so it would be great if could get help in bypassing the error&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 04:04:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4180664#M1721</guid>
      <dc:creator>arynair</dc:creator>
      <dc:date>2020-11-09T04:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4181004#M1722</link>
      <description>&lt;P&gt;I could not reproduce your issue with YDK-0.8.5. PFA my script and log files.&lt;/P&gt;&lt;P&gt;Please note that there were multiple bug fixes since 0.8.3, which potentially could affect the results.&lt;/P&gt;&lt;P&gt;I suggest you upgrade your YDK (currently available only on GitHub) and repeat your tests. Alternatively you can try the tests on &lt;A href="https://github.com/CiscoDevNet/ydk-gen#docker" target="_self"&gt;Docker&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 17:06:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4181004#M1722</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-11-09T17:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4181385#M1723</link>
      <description>&lt;P&gt;Hi Yang,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing the same issue when running the script on docker for ydk 0.8.5&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;ydk.models.cisco_ios_xr&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Cisco_IOS_XR_ip_rib_ipv4_oper&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;xr_ip_rib_ipv4_oper&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;ydk.providers&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;NetconfServiceProvider&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;ydk.services&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;CRUDService&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;logging&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;ipv4_rib_oper_obj&amp;nbsp;=&amp;nbsp;xr_ip_rib_ipv4_oper.Rib()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;ipv4_vrfs_list&amp;nbsp;=&amp;nbsp;ipv4_rib_oper_obj.Vrfs()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;ipv4_vrfs_list_obj&amp;nbsp;=&amp;nbsp;ipv4_vrfs_list.Vrf()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;ipv4_vrfs_list_obj.vrf_name&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"TEST-VRF"&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;crud_service.read(device_netconf,ipv4_vrfs_list)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;the error log that was attached is an output to this script structure when running it on iosxr 7.0.2&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV id="tinyMceEditor_1df36c459974bcarynair_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditor_1df36c459974bcarynair_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;ydk (0.8.5)&lt;BR /&gt;ydk-models-cisco-ios-xr (6.6.3.post1)&lt;BR /&gt;ydk-models-ietf (0.1.5.post2)&lt;BR /&gt;ydk-models-openconfig (0.1.8)&lt;BR /&gt;ydk-service-gnmi (0.4.0.post5)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is the current environment&lt;/P&gt;
&lt;DIV id="tinyMceEditor_1df36c459974bcarynair_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;and error is :ydk.errors.YCoreError: Couldn't fetch child entity 'l2-info' in parent /Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf[vrf-name='default']/afs/af[af-name='IPv4']/safs/saf[saf-name='Unicast']/ip-rib-route-table-names/ip-rib-route-table-name[route-table-name='default']/routes/route[address='0.0.0.0'][prefix-length='0']/route-path/ipv4-rib-edm-path[1]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PFA the logs&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Nov 2020 05:36:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4181385#M1723</guid>
      <dc:creator>arynair</dc:creator>
      <dc:date>2020-11-10T05:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4182300#M1724</link>
      <description>There are some errors in your script (same as mentioned in my first post), but I don't think that will affect the error. Anyway, it is worth of trying.&lt;BR /&gt;from&amp;nbsp;ydk.models.cisco_ios_xr&amp;nbsp;import&amp;nbsp;Cisco_IOS_XR_ip_rib_ipv4_oper&amp;nbsp;as&amp;nbsp;xr_ip_rib_ipv4_oper&amp;nbsp;&lt;BR /&gt;from&amp;nbsp;ydk.providers&amp;nbsp;import&amp;nbsp;NetconfServiceProvider&lt;BR /&gt;from&amp;nbsp;ydk.services&amp;nbsp;import&amp;nbsp;CRUDService&lt;BR /&gt;import&amp;nbsp;logginglog = logging.getLogger('ydk')log.setLevel(logging.INFO)ipv4_rib_oper_obj&amp;nbsp;=&amp;nbsp;xr_ip_rib_ipv4_oper.Rib()&lt;BR /&gt;# ipv4_vrfs_list&amp;nbsp;=&amp;nbsp;ipv4_rib_oper_obj.Vrfs() # THE LIST HAS BEEN ALREADY INITIALIZED IN THE Rib CONSTRUCTOR&lt;BR /&gt;ipv4_vrfs_list_obj&amp;nbsp;=&amp;nbsp;xr_ip_rib_ipv4_oper.Rib.Vrfs.Vrf()&amp;nbsp;# Correct initialization of the iner class&lt;BR /&gt;ipv4_vrfs_list_obj.vrf_name&amp;nbsp;=&amp;nbsp;"TEST-VRF"&lt;BR /&gt;ipv4_rib_oper_obj.vrfs.vrf.append(ipv4_vrfs_list_obj)&amp;nbsp;# !! MUST ADD LIST ELEMENT TO THE LIST&lt;BR /&gt;&lt;BR /&gt;vrf_oper = crud_service.read(device_netconf,&amp;nbsp;ipv4_vrfs_list_obj) &amp;nbsp;# REQUESTING SPECIFIC VRF OPER DATA&lt;BR /&gt;&lt;BR /&gt;!!Before running the script please remove all YANG models in temporary repository under&amp;nbsp;$HOME/.ydk/*. That will enforce model download from device, which will ensure match between the model and received RPC.&lt;BR /&gt;&lt;BR /&gt;Yan GorelikYDK Solutions&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Nov 2020 18:26:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4182300#M1724</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-11-11T18:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: bgp_oper unable to read for a particular vrf_name</title>
      <link>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4190570#M1725</link>
      <description>&lt;P&gt;hi Yan,&lt;/P&gt;
&lt;P&gt;i was not able to resolve the issue and used alternate method using ncclient&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Arya&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 09:08:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/bgp-oper-unable-to-read-for-a-particular-vrf-name/m-p/4190570#M1725</guid>
      <dc:creator>arynair</dc:creator>
      <dc:date>2020-11-30T09:08:48Z</dc:date>
    </item>
  </channel>
</rss>

