<?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: Issues retrieving XR interface information in Tools</title>
    <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4156517#M1641</link>
    <description>&lt;P&gt;Good day&amp;nbsp;yangorelik!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you so much for such a detailed answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution worked.&lt;BR /&gt;I encountered two issues after&amp;nbsp;implementing your example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first was to find the "data_node_name". But the IT had the answer.&lt;BR /&gt;My data_node_name was: "0/RSP0/CPU0"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The second was that you use non-capital letters when appending and some words are snake case.&lt;BR /&gt;When you add models to variabels you use camel case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still think the doc and guide in itself is not descriptive enough, but with your helped it went rather fast. Thank you again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you get a lovely day,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Simon Johansen&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 12:00:37 GMT</pubDate>
    <dc:creator>SimonJohansen</dc:creator>
    <dc:date>2020-09-24T12:00:37Z</dc:date>
    <item>
      <title>Issues retrieving XR interface information</title>
      <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155139#M1637</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;I am trying to retrieve information from a cisco XR device.&lt;BR /&gt;I want the information on the interfaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;code&lt;/STRONG&gt; i am running:&lt;/P&gt;&lt;PRE&gt;service = NetconfService()
provider = NetconfServiceProvider(address=ip_address,
                                  username=user_name,
                                  password=password)

model = test.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface()
interfaceFilter = test.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface.interface

interfaceFilter.interface_name = "Gi0/0/0/1" 
model.interface.append(interfaceFilter)

interface = service.get(provider=provider, read_filter=interfaceFilter)
print(interface)&lt;/PRE&gt;&lt;P&gt;The &lt;STRONG&gt;output&lt;/STRONG&gt; i am getting:&lt;/P&gt;&lt;PRE&gt;interfaceFilter = test.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface.interface
AttributeError: type object 'Interface' has no attribute 'interface'&lt;/PRE&gt;&lt;P&gt;Imports:&lt;/P&gt;&lt;PRE&gt;import ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper as test
from ydk.services.netconf_service import NetconfService
from ydk.providers.netconf_provider import NetconfServiceProvider&lt;/PRE&gt;&lt;P&gt;May one of you be so kind as to give me any hints on how I can proceed to get around this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 09:12:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155139#M1637</guid>
      <dc:creator>SimonJohansen</dc:creator>
      <dc:date>2020-09-22T09:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issues retrieving XR interface information</title>
      <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155413#M1638</link>
      <description>&lt;P&gt;These 2 lines do not correspond to the Model API:&lt;/P&gt;&lt;PRE&gt;model = test.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface()
interfaceFilter = test.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface.interface&lt;/PRE&gt;&lt;P&gt;Please work with documentation, IOS XR Model API, and hundreds of examples on the web. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 16:56:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155413#M1638</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-09-22T16:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issues retrieving XR interface information</title>
      <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155696#M1639</link>
      <description>&lt;P&gt;Good morning&amp;nbsp;yangorelik!&lt;/P&gt;&lt;P&gt;Thank you so much for a reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to work with the documentation, but i find it rather limiting and hard to work with. But maybe you have a different documentation than I got.&lt;/P&gt;&lt;P&gt;I am using this one:&lt;BR /&gt;&lt;A href="http://ydk.cisco.com/py/docs/gen_doc_7f55e5ce98f5bdaba72a929253ec0ac5291b646a.html#ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface" target="_blank"&gt;http://ydk.cisco.com/py/docs/gen_doc_7f55e5ce98f5bdaba72a929253ec0ac5291b646a.html#ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried to search the web for examples but i found none that mached my case.&amp;nbsp;&lt;BR /&gt;Perhaps you could provide a link to one of your examples? I would be grateful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry for been such a rookie, I appreciate the time you use for answering me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Simon Johansen&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 07:28:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4155696#M1639</guid>
      <dc:creator>SimonJohansen</dc:creator>
      <dc:date>2020-09-23T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issues retrieving XR interface information</title>
      <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4156124#M1640</link>
      <description>&lt;P&gt;To better understand data hierarchy you could try to get properties for all interfaces. Here is my example for CiscoDevNet XR sandbox:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;#!/usr/bin/env python&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper &lt;SPAN&gt;as &lt;/SPAN&gt;test&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.services.netconf_service &lt;SPAN&gt;import &lt;/SPAN&gt;NetconfService&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.providers.netconf_provider &lt;SPAN&gt;import &lt;/SPAN&gt;NetconfServiceProvider&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;BR /&gt;log_ydk = logging.getLogger(&lt;SPAN&gt;'ydk'&lt;/SPAN&gt;)&lt;BR /&gt;log_ydk.setLevel(logging.INFO)&lt;BR /&gt;handler = logging.StreamHandler()&lt;BR /&gt;log_ydk.addHandler(handler)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;__name__ == &lt;SPAN&gt;"__main__"&lt;/SPAN&gt;:&lt;BR /&gt;    service = NetconfService()&lt;BR /&gt;    provider = NetconfServiceProvider(&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;    all_ifcs = test.InterfaceProperties()&lt;BR /&gt;    service.get(provider&lt;SPAN&gt;, &lt;/SPAN&gt;all_ifcs)&lt;/PRE&gt;&lt;P&gt;I am getting the following (truncated due to long output):&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;ygorelik$ ./xr_interface_properties.py &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Path where models are to be downloaded: /Users/ygorelik/.ydk/sbx-iosxr-mgmt.cisco.com&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Connected to sbx-iosxr-mgmt.cisco.com on port 10000 using ssh with timeout of -1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Executing 'get' RPC on [Cisco-IOS-XR-ifmgr-oper:interface-properties]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;============= Sending RPC to device =============&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&amp;lt;rpc &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;get &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;filter&amp;gt;&amp;lt;interface-properties &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper"&lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&amp;lt;/filter&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/get&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/rpc&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;============= Received RPC from device =============&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN&gt;xml version&lt;/SPAN&gt;&lt;SPAN&gt;="1.0"&lt;/SPAN&gt;&lt;SPAN&gt;?&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;rpc-reply &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0" &lt;/SPAN&gt;&lt;SPAN&gt;message-id&lt;/SPAN&gt;&lt;SPAN&gt;="4"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;data&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;interface-properties &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;data-node-name&amp;gt;&lt;/SPAN&gt;0/RP0/CPU0&lt;SPAN&gt;&amp;lt;/data-node-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;locationview-name&amp;gt;&lt;/SPAN&gt;0/0/CPU0&lt;SPAN&gt;&amp;lt;/locationview-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;interfaces&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface-name&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/0&lt;SPAN&gt;&amp;lt;/interface-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/0&lt;SPAN&gt;&amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;type&amp;gt;&lt;/SPAN&gt;IFT_GETHERNET&lt;SPAN&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation&amp;gt;&lt;/SPAN&gt;ether&lt;SPAN&gt;&amp;lt;/encapsulation&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation-type-string&amp;gt;&lt;/SPAN&gt;ARPA&lt;SPAN&gt;&amp;lt;/encapsulation-type-string&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;mtu&amp;gt;&lt;/SPAN&gt;1514&lt;SPAN&gt;&amp;lt;/mtu&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;sub-interface-mtu-overhead&amp;gt;&lt;/SPAN&gt;0&lt;SPAN&gt;&amp;lt;/sub-interface-mtu-overhead&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;l2-transport&amp;gt;&lt;/SPAN&gt;false&lt;SPAN&gt;&amp;lt;/l2-transport&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;bandwidth&amp;gt;&lt;/SPAN&gt;1000000&lt;SPAN&gt;&amp;lt;/bandwidth&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface-name&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/1&lt;SPAN&gt;&amp;lt;/interface-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/1&lt;SPAN&gt;&amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;type&amp;gt;&lt;/SPAN&gt;IFT_GETHERNET&lt;SPAN&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation&amp;gt;&lt;/SPAN&gt;ether&lt;SPAN&gt;&amp;lt;/encapsulation&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation-type-string&amp;gt;&lt;/SPAN&gt;ARPA&lt;SPAN&gt;&amp;lt;/encapsulation-type-string&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;mtu&amp;gt;&lt;/SPAN&gt;1514&lt;SPAN&gt;&amp;lt;/mtu&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;sub-interface-mtu-overhead&amp;gt;&lt;/SPAN&gt;0&lt;SPAN&gt;&amp;lt;/sub-interface-mtu-overhead&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;l2-transport&amp;gt;&lt;/SPAN&gt;false&lt;SPAN&gt;&amp;lt;/l2-transport&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;bandwidth&amp;gt;&lt;/SPAN&gt;1000000&lt;SPAN&gt;&amp;lt;/bandwidth&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;/interfaces&amp;gt;&lt;BR /&gt;            &amp;lt;/locationview&amp;gt;&lt;BR /&gt;            &amp;lt;locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;locationview-name&amp;gt;&lt;/SPAN&gt;0/0/CPU0&lt;SPAN&gt;&amp;lt;/locationview-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;/locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;/locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;/data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;/data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;/interface-properties&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;/data&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/rpc-reply&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Important&lt;/STRONG&gt; to note that &lt;EM&gt;data-node&lt;/EM&gt;, &lt;EM&gt;locationview&lt;/EM&gt; and &lt;EM&gt;interface&lt;/EM&gt; are list elements and have to be handled properly!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also&lt;/STRONG&gt;, the get filter building must always start from the top level container!&lt;/P&gt;&lt;P&gt;Here is an example for getting properties of specific interface:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;#!/usr/bin/env python&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper &lt;SPAN&gt;as &lt;/SPAN&gt;test&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.services.netconf_service &lt;SPAN&gt;import &lt;/SPAN&gt;NetconfService&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.providers.netconf_provider &lt;SPAN&gt;import &lt;/SPAN&gt;NetconfServiceProvider&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;BR /&gt;log_ydk = logging.getLogger(&lt;SPAN&gt;'ydk'&lt;/SPAN&gt;)&lt;BR /&gt;log_ydk.setLevel(logging.INFO)&lt;BR /&gt;handler = logging.StreamHandler()&lt;BR /&gt;log_ydk.addHandler(handler)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;__name__ == &lt;SPAN&gt;"__main__"&lt;/SPAN&gt;:&lt;BR /&gt;    service = NetconfService()&lt;BR /&gt;    provider = NetconfServiceProvider(&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;    all_ifcs = test.InterfaceProperties()&lt;BR /&gt;    my_data_node = test.InterfaceProperties.DataNodes.DataNode()&lt;BR /&gt;    my_data_node.data_node_name = &lt;SPAN&gt;'0/RP0/CPU0'&lt;BR /&gt;&lt;/SPAN&gt;    all_ifcs.data_nodes.data_node.append(my_data_node)&lt;BR /&gt;&lt;BR /&gt;    my_locationview = test.InterfaceProperties.DataNodes.DataNode.Locationviews.Locationview()&lt;BR /&gt;    my_locationview.locationview_name = &lt;SPAN&gt;'0/RP0/CPU0'&lt;BR /&gt;&lt;/SPAN&gt;    my_data_node.locationviews.locationview.append(my_locationview)&lt;BR /&gt;&lt;BR /&gt;    my_ifc = test.InterfaceProperties.DataNodes.DataNode.Locationviews.Locationview.Interfaces.Interface()&lt;BR /&gt;    my_ifc.interface_name = &lt;SPAN&gt;'GigabitEthernet0/0/0/0'&lt;BR /&gt;&lt;/SPAN&gt;    my_locationview.interfaces.interface.append(my_ifc)&lt;BR /&gt;&lt;BR /&gt;    my_ifc_props = service.get(provider&lt;SPAN&gt;, &lt;/SPAN&gt;my_ifc)&lt;/PRE&gt;&lt;P&gt;And results:&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;Path where models are to be downloaded: /Users/ygorelik/.ydk/sbx-iosxr-mgmt.cisco.com&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Connected to sbx-iosxr-mgmt.cisco.com on port 10000 using ssh with timeout of -1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Executing 'get' RPC on [Cisco-IOS-XR-ifmgr-oper:interface-properties]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;============= Sending RPC to device =============&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&amp;lt;rpc &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;get &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;filter&amp;gt;&amp;lt;interface-properties &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;data-node-name&amp;gt;&lt;/SPAN&gt;0/RP0/CPU0&lt;SPAN&gt;&amp;lt;/data-node-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;locationview-name&amp;gt;&lt;/SPAN&gt;0/RP0/CPU0&lt;SPAN&gt;&amp;lt;/locationview-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;interfaces&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;interface-name&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/0&lt;SPAN&gt;&amp;lt;/interface-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;/interfaces&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;/locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;/locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;/data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;/data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/interface-properties&amp;gt;&amp;lt;/filter&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/get&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/rpc&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;============= Received RPC from device =============&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN&gt;xml version&lt;/SPAN&gt;&lt;SPAN&gt;="1.0"&lt;/SPAN&gt;&lt;SPAN&gt;?&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;rpc-reply &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="urn:ietf:params:xml:ns:netconf:base:1.0" &lt;/SPAN&gt;&lt;SPAN&gt;message-id&lt;/SPAN&gt;&lt;SPAN&gt;="1"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;data&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;interface-properties &lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;data-node-name&amp;gt;&lt;/SPAN&gt;0/RP0/CPU0&lt;SPAN&gt;&amp;lt;/data-node-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;locationview-name&amp;gt;&lt;/SPAN&gt;0/RP0/CPU0&lt;SPAN&gt;&amp;lt;/locationview-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;interfaces&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface-name&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/0&lt;SPAN&gt;&amp;lt;/interface-name&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;interface&amp;gt;&lt;/SPAN&gt;GigabitEthernet0/0/0/0&lt;SPAN&gt;&amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;type&amp;gt;&lt;/SPAN&gt;IFT_GETHERNET&lt;SPAN&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;actual-line-state&amp;gt;&lt;/SPAN&gt;im-state-admin-down&lt;SPAN&gt;&amp;lt;/actual-line-state&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation&amp;gt;&lt;/SPAN&gt;ether&lt;SPAN&gt;&amp;lt;/encapsulation&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;encapsulation-type-string&amp;gt;&lt;/SPAN&gt;ARPA&lt;SPAN&gt;&amp;lt;/encapsulation-type-string&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;mtu&amp;gt;&lt;/SPAN&gt;1514&lt;SPAN&gt;&amp;lt;/mtu&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;sub-interface-mtu-overhead&amp;gt;&lt;/SPAN&gt;0&lt;SPAN&gt;&amp;lt;/sub-interface-mtu-overhead&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;l2-transport&amp;gt;&lt;/SPAN&gt;false&lt;SPAN&gt;&amp;lt;/l2-transport&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                  &amp;lt;bandwidth&amp;gt;&lt;/SPAN&gt;1000000&lt;SPAN&gt;&amp;lt;/bandwidth&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                &amp;lt;/interface&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;              &amp;lt;/interfaces&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            &amp;lt;/locationview&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;          &amp;lt;/locationviews&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        &amp;lt;/data-node&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      &amp;lt;/data-nodes&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    &amp;lt;/interface-properties&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  &amp;lt;/data&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/rpc-reply&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope that helps to understand the basics of building models.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 19:55:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4156124#M1640</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-09-23T19:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issues retrieving XR interface information</title>
      <link>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4156517#M1641</link>
      <description>&lt;P&gt;Good day&amp;nbsp;yangorelik!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you so much for such a detailed answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution worked.&lt;BR /&gt;I encountered two issues after&amp;nbsp;implementing your example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first was to find the "data_node_name". But the IT had the answer.&lt;BR /&gt;My data_node_name was: "0/RSP0/CPU0"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The second was that you use non-capital letters when appending and some words are snake case.&lt;BR /&gt;When you add models to variabels you use camel case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still think the doc and guide in itself is not descriptive enough, but with your helped it went rather fast. Thank you again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you get a lovely day,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Simon Johansen&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 12:00:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/issues-retrieving-xr-interface-information/m-p/4156517#M1641</guid>
      <dc:creator>SimonJohansen</dc:creator>
      <dc:date>2020-09-24T12:00:37Z</dc:date>
    </item>
  </channel>
</rss>

