<?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: Invalid List Element Type in Tools</title>
    <link>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592778#M3188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Santiago, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated.&amp;nbsp; Yes I see the issue now with capitlization. Also thanks for pointing out the type Empy()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also seems that this was incorrect -&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: arial; color: #3d3d3d; background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;.interface_configuration.append(ipv4network)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I should have written&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configuration&lt;/SPAN&gt;.ipv4_network.addresses.primary = ipv4network&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All working now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2017 09:04:14 GMT</pubDate>
    <dc:creator>sihart</dc:creator>
    <dc:date>2017-03-21T09:04:14Z</dc:date>
    <item>
      <title>Invalid List Element Type</title>
      <link>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592776#M3186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to YDK and having some problems when trying to apply an ip address to a created Loopback address.&amp;nbsp; Any pointers much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following error is given:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ydk.errors.YPYModelError: &lt;/P&gt;&lt;P&gt;&amp;nbsp; InterfaceConfigurations.interface_configuration: (INVALID_TYPE, Invalid list element type, type = &amp;lt;ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_cfg.InterfaceConfigurations.InterfaceConfiguration.Ipv4Network.Addresses.Primary object at 0x107521b38&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am attempting to run is:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;from &lt;/SPAN&gt;ydk.services &lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;CRUDService&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;from &lt;/SPAN&gt;ydk.providers &lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;NetconfServiceProvider&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;from &lt;/SPAN&gt;ydk.models.cisco_ios_xr &lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;Cisco_IOS_XR_ifmgr_cfg &lt;SPAN style="color: #000080; font-weight: bold;"&gt;as &lt;/SPAN&gt;xr_ifmgr_cfg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffe4ff;"&gt;interface_configurations&lt;/SPAN&gt; = xr_ifmgr_cfg.InterfaceConfigurations()&lt;/P&gt;&lt;P&gt;interface_configuration = &lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;.InterfaceConfiguration()&lt;/P&gt;&lt;P&gt;interface_configuration.active = &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'act'&lt;BR /&gt;&lt;/SPAN&gt;interface_configuration.interface_name = &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'Loopback1'&lt;BR /&gt;&lt;/SPAN&gt;interface_configuration.description = &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'A Yang Loopback'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;ipv4network = interface_configuration.Ipv4Network.Addresses.Primary()&lt;/P&gt;&lt;P&gt;ipv4network.address = &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'10.10.10.1'&lt;BR /&gt;&lt;/SPAN&gt;ipv4network.netmask = &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'255.255.255.0'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;.interface_configuration.append(interface_configuration)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;.interface_configuration.append(ipv4network)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;crud.create(provider, &lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 19:02:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592776#M3186</guid>
      <dc:creator>sihart</dc:creator>
      <dc:date>2017-03-20T19:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid List Element Type</title>
      <link>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592777#M3187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your capitalization is off.&amp;nbsp; YDK follows PEP8 conventions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14900476286346741" jivemacro_uid="_14900476286346741" modifiedtitle="true"&gt;
&lt;P&gt;ipv4network = interface_configuration.Ipv4Network.Addresses.Primary()&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should have&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14900475966315024" jivemacro_uid="_14900475966315024" modifiedtitle="true"&gt;
&lt;P&gt;ipv4network = interface_configuration.Ipv4Network.address.Primary()&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you should indicate that you're creating a virtual interface. See a working example at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://git.io/vyNz9" style="font-size: 10pt;" title="https://git.io/vyNz9"&gt;https://git.io/vyNz9&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should get you going!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 22:09:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592777#M3187</guid>
      <dc:creator>saalvare</dc:creator>
      <dc:date>2017-03-20T22:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid List Element Type</title>
      <link>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592778#M3188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Santiago, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated.&amp;nbsp; Yes I see the issue now with capitlization. Also thanks for pointing out the type Empy()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also seems that this was incorrect -&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: arial; color: #3d3d3d; background-color: #e4e4ff;"&gt;interface_configurations&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial; font-size: 12px;"&gt;.interface_configuration.append(ipv4network)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I should have written&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;interface_configuration&lt;/SPAN&gt;.ipv4_network.addresses.primary = ipv4network&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All working now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 09:04:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/invalid-list-element-type/m-p/3592778#M3188</guid>
      <dc:creator>sihart</dc:creator>
      <dc:date>2017-03-21T09:04:14Z</dc:date>
    </item>
  </channel>
</rss>

