<?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: IOS-XR NED device module stored at position 3 in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/ios-xr-ned-device-module-stored-at-position-3/m-p/3703567#M2580</link>
    <description>&lt;P&gt;You cant without modifying your code. The module list isn't an "ordered-by user" list so there is not guarantee to what order the list will be returned in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 09 Sep 2018 13:01:04 GMT</pubDate>
    <dc:creator>hniska</dc:creator>
    <dc:date>2018-09-09T13:01:04Z</dc:date>
    <item>
      <title>IOS-XR NED device module stored at position 3</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/ios-xr-ned-device-module-stored-at-position-3/m-p/3703441#M2579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some question which I am struggling with, I have to read the device NED type from the device module. Almost all&amp;nbsp;NEDs returns with position 0 from the keys the correct NED type except IOS-XR&amp;nbsp;NED the position of the NED type is not 0 but 3 which confuses&amp;nbsp;my python code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an overview of the device modules:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 659px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/18351i444CA71BA40010B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is what I read in Python:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;get_device_type&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;root&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;device&lt;/SPAN&gt;&lt;SPAN&gt;):&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;modules &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; root.devices.device[device].module.keys()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;str&lt;/SPAN&gt;&lt;SPAN&gt;(modules[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Is there a reason why IOS-XR&amp;nbsp;has interfaces instead of device ned type in position 0?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;How do I get around this without&amp;nbsp;modifying the code?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 08 Sep 2018 19:32:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/ios-xr-ned-device-module-stored-at-position-3/m-p/3703441#M2579</guid>
      <dc:creator>Abdel el Anazi</dc:creator>
      <dc:date>2018-09-08T19:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: IOS-XR NED device module stored at position 3</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/ios-xr-ned-device-module-stored-at-position-3/m-p/3703567#M2580</link>
      <description>&lt;P&gt;You cant without modifying your code. The module list isn't an "ordered-by user" list so there is not guarantee to what order the list will be returned in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Sep 2018 13:01:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/ios-xr-ned-device-module-stored-at-position-3/m-p/3703567#M2580</guid>
      <dc:creator>hniska</dc:creator>
      <dc:date>2018-09-09T13:01:04Z</dc:date>
    </item>
  </channel>
</rss>

