<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54: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>[YANGTOOLS-749] Unable to create LeafRefContext for leafref from different model imported with different than default prefix</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-749</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Situation&lt;/p&gt;

&lt;p&gt;module ioam-sb-trace {&lt;/p&gt;

&lt;p&gt;import ietf-interfaces &lt;/p&gt;
{ prefix &quot;ietf-if&quot;; }

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;leaf intf-name {&lt;br/&gt;
     type ietf-if:interface-ref; &lt;br/&gt;
     mandatory true;&lt;br/&gt;
     description&lt;br/&gt;
       &quot;Instance of ietf-interfaces:interface-ref&quot;;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;-------------------------&lt;br/&gt;
module ietf-interfaces {&lt;/p&gt;

&lt;p&gt;    yang-version 1;&lt;/p&gt;

&lt;p&gt;    namespace&lt;br/&gt;
      &quot;urn:ietf:params:xml:ns:yang:ietf-interfaces&quot;;&lt;/p&gt;

&lt;p&gt;    prefix if;&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
typedef interface-ref {&lt;br/&gt;
      type leafref &lt;/p&gt;
{
        path &quot;/if:interfaces/if:interface/if:name&quot;;
      }
&lt;p&gt;      description&lt;br/&gt;
        &quot;This type is used by data models that need to reference&lt;br/&gt;
       configured interfaces.&quot;;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;In this situation, SchemaContext is created fine, but when trying to construct LeafRefContext, following error is showed&lt;/p&gt;

&lt;p&gt;org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefPathParseException: No module import for prefix: if in module: ioam-sb-trace&lt;/p&gt;

&lt;p&gt;	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefPathParserListenerImpl.getQNameModuleForImportPrefix(LeafRefPathParserListenerImpl.java:191)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefPathParserListenerImpl.enterPrefix(LeafRefPathParserListenerImpl.java:133)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefPathParser$PrefixContext.enterRule(LeafRefPathParser.java:997)&lt;br/&gt;
	at org.antlr.v4.runtime.tree.ParseTreeWalker.enterRule(ParseTreeWalker.java:66)&lt;br/&gt;
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:49)&lt;br/&gt;
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)&lt;br/&gt;
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)&lt;br/&gt;
	at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefPathParserImpl.parseLeafRefPathSourceToSchemaPath(LeafRefPathParserImpl.java:37)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContextTreeBuilder.buildLeafRefContextReferencingTree(LeafRefContextTreeBuilder.java:141)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContextTreeBuilder.buildLeafRefContextReferencingTree(LeafRefContextTreeBuilder.java:91)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContextTreeBuilder.buildLeafRefContextReferencingTree(LeafRefContextTreeBuilder.java:91)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContextTreeBuilder.buildLeafRefContextReferencingTree(LeafRefContextTreeBuilder.java:91)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContextTreeBuilder.buildLeafRefContextTree(LeafRefContextTreeBuilder.java:47)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContext.create(LeafRefContext.java:53)&lt;br/&gt;
	at io.fd.hc2vpp.model.test.LeafRefContextTest.testLeafRefContextCreation(LeafRefContextTest.java:65)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;br/&gt;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
	at java.lang.reflect.Method.invoke(Method.java:498)&lt;br/&gt;
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)&lt;br/&gt;
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)&lt;br/&gt;
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)&lt;br/&gt;
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)&lt;br/&gt;
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)&lt;br/&gt;
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)&lt;br/&gt;
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;br/&gt;
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)&lt;br/&gt;
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)&lt;br/&gt;
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)&lt;br/&gt;
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)&lt;br/&gt;
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)&lt;br/&gt;
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)&lt;br/&gt;
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)&lt;br/&gt;
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)&lt;br/&gt;
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)&lt;br/&gt;
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)&lt;br/&gt;
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;br/&gt;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
	at java.lang.reflect.Method.invoke(Method.java:498)&lt;br/&gt;
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)&lt;/p&gt;

&lt;p&gt;-----------------------&lt;br/&gt;
If changed like so, LeafRefContext is created fine&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
import ietf-interfaces &lt;/p&gt;
{ prefix &quot;if&quot;; }
&lt;p&gt; &amp;lt;-- default prefix for model ietf-interfaces&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;leaf intf-name {&lt;br/&gt;
     type if:interface-ref; &lt;br/&gt;
     mandatory true;&lt;br/&gt;
     description&lt;br/&gt;
       &quot;Instance of ietf-interfaces:interface-ref&quot;;&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23169">YANGTOOLS-749</key>
            <summary>Unable to create LeafRefContext for leafref from different model imported with different than default prefix</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="jsrnicek@cisco.com">Jan Srnicek</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Feb 2017 14:02:29 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:57 +0000</updated>
                            <resolved>Mon, 29 May 2017 07:56:18 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="44365" author="rovarga" created="Fri, 14 Apr 2017 15:13:34 +0000"  >&lt;p&gt;This is a problem with RevisionAwareXPath, as it does not offer enough information to make sense of that it actually is. The only method we provide is &apos;toString()&apos;, which is insufficient, as our users need at least the equivalent of javax.namespace.NamespaceContext to be able to do anything with that string.&lt;/p&gt;

&lt;p&gt;Prefix mapping needs to be derived from the prefix mapping of the module which first defined the type.&lt;/p&gt;</comment>
                            <comment id="44366" author="pkajsa" created="Mon, 15 May 2017 06:52:58 +0000"  >&lt;p&gt;fix of current implementation: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/56946/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/56946/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44367" author="rovarga" created="Tue, 16 May 2017 23:48:56 +0000"  >&lt;p&gt;Since this affect FD.io, we need to backport this to Carbon SR1 and Boron SR4:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/57225&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/57225&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/57224&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/57224&lt;/a&gt;&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>7844</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=7844]]></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="10322"><![CDATA[Boron-4]]></customfieldvalue>

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

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