<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:24 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>[YANGTOOLS-492] Yang tools failing to parse Augmentations under &quot;uses&quot; clause while mounting a Netconf Device(Both Helium SR5 and Lithium)</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-492</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;I am trying to mount a Netconf device that has an YANG file that uses augmentation under &quot;uses&quot; clause. The YANG snippet looks like this.&lt;/p&gt;

&lt;p&gt;augment /if:interfaces/interfaces-bridge:bridge {&lt;br/&gt;
uses firewall-if-parameters &lt;br/&gt;
{&lt;br/&gt;
augment firewall {&lt;br/&gt;
leaf-list l2 &lt;/p&gt;
{ type types:alpha-numeric; ordered-by &quot;user&quot;; configd:help &quot;Ruleset for forwarded packets on bridge interface&quot;; configd:allowed &quot;echo $VAR(/security/firewall/name/@@)&quot;; configd:validate &quot;check-fw-ruleset-exists&quot;; }
&lt;p&gt;}&lt;br/&gt;
}&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Note that there are two augmentation targets here. Yang tools fails to handle this condition. It is doing an unsafe type cast while handling the augmentations under &quot;uses&quot; clause.&lt;/p&gt;

&lt;p&gt;If I manually take out the uses augment as pasted below, this file is parsed properly and device is mounted.&lt;/p&gt;

&lt;p&gt;================= Section which YANG tools fails to parse.&lt;br/&gt;
augment firewall {&lt;br/&gt;
leaf-list l2 &lt;/p&gt;
{ type types:alpha-numeric; ordered-by &quot;user&quot;; configd:help &quot;Ruleset for forwarded packets on bridge interface&quot;; configd:allowed &quot;echo $VAR(/security/firewall/name/@@)&quot;; configd:validate &quot;check-fw-ruleset-exists&quot;; }
&lt;p&gt;}&lt;br/&gt;
}&lt;br/&gt;
================&lt;/p&gt;

&lt;p&gt;I think the issue is YANG tools may be handling the direct uses augmentation well but if this augmentation comes under another augmentation as specified in the snippet, it is having issues.&lt;/p&gt;

&lt;p&gt;The issue is in the resolveUsesAugment method of java file YangParserImpl.java.&lt;/p&gt;

&lt;p&gt;Please note that this happens in both Helium and Lithium.&lt;/p&gt;

&lt;p&gt;Stack trace is below:&lt;/p&gt;

&lt;p&gt;java.lang.ClassCastException: org.opendaylight.yangtools.yang.parser.builder.impl.AugmentationSchemaBuilderImpl cannot be cast to org.opendaylight.yangtools.yang.parser.builder.api.SchemaNodeBuilder&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.resolveUsesAugment(YangParserImpl.java:954)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.resolveUses(YangParserImpl.java:1157)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.resolveUsesForNodes(YangParserImpl.java:1126)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.build(YangParserImpl.java:709)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.buildModules(YangParserImpl.java:335)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$2.apply(SharedSchemaContextFactory.java:106)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$2.apply(SharedSchemaContextFactory.java:68)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:859)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:106)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures.transform(Futures.java:613)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures.transform(Futures.java:565)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory.createSchemaContext(SharedSchemaContextFactory.java:142)&lt;span class=&quot;error&quot;&gt;&amp;#91;160:org.opendaylight.yangtools.yang-parser-impl:0.6.6.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$RecursiveSchemaSetup.setUpSchema(NetconfDevice.java:318)&lt;span class=&quot;error&quot;&gt;&amp;#91;270:org.opendaylight.controller.sal-netconf-connector:1.1.4.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$RecursiveSchemaSetup.access$1000(NetconfDevice.java:288)&lt;span class=&quot;error&quot;&gt;&amp;#91;270:org.opendaylight.controller.sal-netconf-connector:1.1.4.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$RecursiveSchemaSetup$1.onFailure(NetconfDevice.java:334)&lt;span class=&quot;error&quot;&gt;&amp;#91;270:org.opendaylight.controller.sal-netconf-connector:1.1.4.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures$4.run(Futures.java:1140)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:106)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:47)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1152)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1088)&lt;span class=&quot;error&quot;&gt;&amp;#91;135:com.google.guava:14.0.1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$RecursiveSchemaSetup.setUpSchema(NetconfDevice.java:349)&lt;span class=&quot;error&quot;&gt;&amp;#91;270:org.opendaylight.controller.sal-netconf-connector:1.1.4.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$RecursiveSchemaSetup.run(NetconfDevice.java:303)&lt;span class=&quot;error&quot;&gt;&amp;#91;270:org.opendaylight.controller.sal-netconf-connector:1.1.4.Helium-SR4&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_79&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_79&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_79&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_79&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22912">YANGTOOLS-492</key>
            <summary>Yang tools failing to parse Augmentations under &quot;uses&quot; clause while mounting a Netconf Device(Both Helium SR5 and Lithium)</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="pkajsa">Peter Kajsa</assignee>
                                    <reporter username="bvaradar@brocade.com">Balaji Varadaraju</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Sep 2015 00:05:14 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:36 +0000</updated>
                            <resolved>Fri, 16 Oct 2015 12:00:00 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="43477" author="pkajsa" created="Wed, 2 Sep 2015 12:37:14 +0000"  >&lt;p&gt;fix: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/26329/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/26329/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43478" author="bvaradar@brocade.com" created="Wed, 2 Sep 2015 15:53:17 +0000"  >&lt;p&gt;Hi Peter,&lt;br/&gt;
       Thanks a lot for the very quick fix on this. Really appreciate it. I&apos;ve tested this fix locally and it works. Netconf device is mounted without issues.&lt;/p&gt;

&lt;p&gt;Thanks again,&lt;br/&gt;
Bala&lt;/p&gt;</comment>
                            <comment id="43479" author="pkajsa" created="Fri, 4 Sep 2015 13:08:47 +0000"  >&lt;p&gt;You are welcome,&lt;br/&gt;
Peter&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>4231</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=4231]]></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_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10325"><![CDATA[Lithium-2]]></customfieldvalue>

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

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