<?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: Interface has no attribute append in Tools</title>
    <link>https://community.cisco.com/t5/tools/interface-has-no-attribute-append/m-p/4156408#M1636</link>
    <description>&lt;P&gt;This post have been solved here:&lt;BR /&gt;&lt;A href="https://community.cisco.com/t5/yang-development-kit-ydk/issues-retrieving-xr-interface-information/m-p/4155139" target="_blank" rel="noopener"&gt;https://community.cisco.com/t5/yang-development-kit-ydk/issues-retrieving-xr-interface-information/m-p/4155139&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 08:43:30 GMT</pubDate>
    <dc:creator>SimonJohansen</dc:creator>
    <dc:date>2020-09-24T08:43:30Z</dc:date>
    <item>
      <title>Interface has no attribute append</title>
      <link>https://community.cisco.com/t5/tools/interface-has-no-attribute-append/m-p/4155844#M1635</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I am trying to retrieve information on interfaces from a XR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I only get error messages..&lt;/P&gt;&lt;PRE&gt;sysView.Interfaces.Interface.append(interface)
AttributeError: type object 'Interface' has no attribute 'append'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;code&lt;/STRONG&gt; I am trying to run:&lt;/P&gt;&lt;PRE&gt;    service = NetconfService()
    provider = NetconfServiceProvider(address=ipaddress,
                                      username=user,
                                      password=password)

    model = ifmgr_oper.InterfaceProperties()
    dataNode = ifmgr_oper.InterfaceProperties.DataNodes.DataNode()
    dataNode.data_node_name = "default"
    sysView = ifmgr_oper.InterfaceProperties.DataNodes.DataNode.SystemView()
    interface = ifmgr_oper.InterfaceProperties.DataNodes.DataNode.SystemView.Interfaces.Interface()
    interface.interface_name = "Gi0/0/0/1" 
    
    sysView.Interfaces.Interface.append(interface)
    dataNode.SystemView.append(sysView)
    model.DataNodes.DataNode.append(dataNode)
    
    interface = service.get(provider=provider, read_filter=model)
    print(interface)&lt;/PRE&gt;&lt;P&gt;My imports:&lt;/P&gt;&lt;PRE&gt;import ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper as ifmgr_oper
from ydk.services.netconf_service import NetconfService
from ydk.providers.netconf_provider import NetconfServiceProvider&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed examples from previous asked questions:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cisco.com/t5/yang-development-kit-ydk/how-to-retrieve-the-interface-configuration/td-p/3597539" target="_blank" rel="noopener"&gt;https://community.cisco.com/t5/yang-development-kit-ydk/how-to-retrieve-the-interface-configuration/td-p/3597539&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Used the guide:&lt;BR /&gt;&lt;A href="http://ydk.cisco.com/py/docs/guides/crud_guide.html#creating-a-configuration-with-a-list-and-a-presence-class" target="_blank" rel="noopener"&gt;http://ydk.cisco.com/py/docs/guides/crud_guide.html#creating-a-configuration-with-a-list-and-a-presence-class&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And read the docs:&lt;/P&gt;&lt;P&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" rel="noopener"&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;Any clues on what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Simon Johansen&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:30:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/interface-has-no-attribute-append/m-p/4155844#M1635</guid>
      <dc:creator>SimonJohansen</dc:creator>
      <dc:date>2020-09-23T12:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Interface has no attribute append</title>
      <link>https://community.cisco.com/t5/tools/interface-has-no-attribute-append/m-p/4156408#M1636</link>
      <description>&lt;P&gt;This post have been solved here:&lt;BR /&gt;&lt;A href="https://community.cisco.com/t5/yang-development-kit-ydk/issues-retrieving-xr-interface-information/m-p/4155139" target="_blank" rel="noopener"&gt;https://community.cisco.com/t5/yang-development-kit-ydk/issues-retrieving-xr-interface-information/m-p/4155139&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 08:43:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/interface-has-no-attribute-append/m-p/4156408#M1636</guid>
      <dc:creator>SimonJohansen</dc:creator>
      <dc:date>2020-09-24T08:43:30Z</dc:date>
    </item>
  </channel>
</rss>

