<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:39:12 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[SNMP-12] MibTable assumes Enum values start from 0</title>
                <link>https://jira.opendaylight.org/browse/SNMP-12</link>
                <project id="10169" key="SNMP">snmp</project>
                    <description>&lt;p&gt;The MibTable class assumes that Enums start from 0 which is is not always true and causes problems.&lt;br/&gt;
For example, in this leaf, the first value is 1:&lt;/p&gt;

&lt;p&gt;&amp;gt; leaf ifAdminStatus {&lt;br/&gt;
&amp;gt;        type enumeration {&lt;br/&gt;
&amp;gt;          enum up      &lt;/p&gt;
{ value 1; }
&lt;p&gt;&amp;gt;          enum down    &lt;/p&gt;
{ value 2; }
&lt;p&gt;&amp;gt;          enum testing &lt;/p&gt;
{ value 3; }
&lt;p&gt;&amp;gt;        }&lt;br/&gt;
&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;etc&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;This is the relevant snippet from the MibTable class:&lt;/p&gt;

&lt;p&gt;&amp;gt; } else if (Enum.class.isAssignableFrom(objectType)) {&lt;br/&gt;
&amp;gt;                    setObject = objectType.getEnumConstants()&lt;span class=&quot;error&quot;&gt;&amp;#91;variable.toInt()&amp;#93;&lt;/span&gt;;&lt;/p&gt;

&lt;p&gt;getEnumConstants returns an array like &lt;span class=&quot;error&quot;&gt;&amp;#91;up, down, testing&amp;#93;&lt;/span&gt;, however variable.toInt() ranges from 1 to 3. &lt;br/&gt;
If ifAdminStatus is up, variable.toInt()=1 so:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;up, down, testing&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; =&amp;gt; down&lt;/p&gt;

&lt;p&gt;If ifAdminStatus is testing, you get &lt;span class=&quot;error&quot;&gt;&amp;#91;up, down, testing&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;3&amp;#93;&lt;/span&gt; which causes an exception:&lt;/p&gt;

&lt;p&gt;&amp;gt;2016-04-04 12:17:47,386 | WARN  | tp1045961511-266 | MibTable                         | 242 - org.opendaylight.snmp - 1.1.0.Beryllium | Populate Exception&lt;br/&gt;
&amp;gt;java.lang.ArrayIndexOutOfBoundsException: 3&lt;br/&gt;
&amp;gt;	at org.opendaylight.snmp.plugin.internal.MibTable.parse(MibTable.java:179)&lt;br/&gt;
&amp;gt;	at org.opendaylight.snmp.plugin.internal.MibTable.populate(MibTable.java:88)&lt;/p&gt;

&lt;p&gt;The correct code should shift variable.toInt() accordingly to account for this. Right now I am working on fixing this.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26809">SNMP-12</key>
            <summary>MibTable assumes Enum values start from 0</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="10001" iconUrl="https://jira.opendaylight.org/" description="">In Review</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rski@intracom-telecom.com">Romanos Skiadas</reporter>
                        <labels>
                    </labels>
                <created>Mon, 4 Apr 2016 11:26:04 +0000</created>
                <updated>Thu, 19 Oct 2017 21:24:54 +0000</updated>
                                            <version>unspecified</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="53869" author="abbas.pareedkunju@tcs.com" created="Tue, 31 May 2016 05:13:13 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Is it ok if I start working on this?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Abbas&lt;/p&gt;</comment>
                            <comment id="53870" author="rski@intracom-telecom.com" created="Tue, 31 May 2016 05:59:05 +0000"  >&lt;p&gt;(In reply to Abbas P Pareedkunju from comment #1)&lt;br/&gt;
&amp;gt; Hi,&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Is it ok if I start working on this?&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Thanks,&lt;br/&gt;
&amp;gt; Abbas&lt;/p&gt;

&lt;p&gt;I&apos;ve already submitted a pull request to fix it&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/37249/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/37249/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="53871" author="abbas.pareedkunju@tcs.com" created="Tue, 31 May 2016 06:08:29 +0000"  >&lt;p&gt;Thanks to confirm Romanos. &lt;br/&gt;
I have assigned it back to the default.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5650</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=5650]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02vm7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>