<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55: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-1107] XML document: Lists interleaving not supported</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1107</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Hi, I believe I found a new bug related to XML document parsing when your YANG model has multiple lists in the same container causing them to MAY have interleaves between their elements.&lt;/p&gt;

&lt;p&gt;Using netopeer2+sysrepo as NETCONF server.&lt;/p&gt;

&lt;p&gt;1. Consider the follow YANG model:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
module test2 {
    namespace &lt;span class=&quot;code-quote&quot;&gt;&quot;testenv:idea:test2&quot;&lt;/span&gt;;
    prefix &lt;span class=&quot;code-quote&quot;&gt;&quot;tt&quot;&lt;/span&gt;;
    container parent {
        config &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        list user {
            key name;
            leaf name {
                type string;
            }
        }
        list admin {
            key name;
            leaf name {
                type string;
            }
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;2. Do the following operations in the NETCONF server in this order (In my case I used 3 RPCs edit-config, but should have the same result for YANG patch or RESTCONF POST, not the main point of the issue).&lt;/p&gt;

&lt;p&gt;&#160; &#160; a. create parent/user/name=&quot;Bob&quot;&lt;/p&gt;

&lt;p&gt;&#160; &#160; b. create parent/admin/name=&quot;John&quot;&lt;/p&gt;

&lt;p&gt;&#160; &#160; c. create parent/user/name=&quot;Fred&quot;&lt;/p&gt;

&lt;p&gt;3. That results in the following XML returned by netopeer2+sysrepo to a NETCONF GET operation. Notice that elements of &quot;admin&quot; and &quot;user&quot; are interleaved.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;parent xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;testenv:idea:test2&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;user&amp;gt;
    &amp;lt;name&amp;gt;Bob&amp;lt;/name&amp;gt;
  &amp;lt;/user&amp;gt;
  &amp;lt;admin&amp;gt;
    &amp;lt;name&amp;gt;John&amp;lt;/name&amp;gt;
  &amp;lt;/admin&amp;gt;
  &amp;lt;user&amp;gt;
    &amp;lt;name&amp;gt;Freud&amp;lt;/name&amp;gt;
  &amp;lt;/user&amp;gt;
&amp;lt;/parent&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This is a valid XML according to RFC7950, last paragraph of section 7.8.5:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
The XML elements representing list entries MAY be interleaved with elements &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; siblings of the list, unless the list defines RPC or action input or output parameters.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;However, Opendaylight fails to parse this XML after a RESTCONF GET to mount-point test2:parent, returning (full log in the bottom of the issue):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;errors xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-restconf&quot;&lt;/span&gt;&amp;gt;
    &amp;lt;error&amp;gt;
        &amp;lt;error-message&amp;gt;Request could not be completed because the relevant data model content does not exist&amp;lt;/error-message&amp;gt;
        &amp;lt;error-tag&amp;gt;data-missing&amp;lt;/error-tag&amp;gt;
        &amp;lt;error-type&amp;gt;protocol&amp;lt;/error-type&amp;gt;
    &amp;lt;/error&amp;gt;
&amp;lt;/errors&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you change the insertion order to:&lt;/p&gt;

&lt;p&gt;&#160; &#160; a. create parent/user/name=&quot;Bob&quot;&lt;/p&gt;

&lt;p&gt;&#160; &#160; b. create parent/user/name=&quot;Fred&quot;&lt;/p&gt;

&lt;p&gt;&#160; &#160; c. create parent/admin/name=&quot;John&quot;&lt;/p&gt;

&lt;p&gt;The resulting XML does not have interleaves and the RESTCONF GET works as expected returning:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&amp;lt;parent xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;testenv:idea:test2&quot;&lt;/span&gt;&amp;gt;
    &amp;lt;admin&amp;gt;
        &amp;lt;name&amp;gt;John&amp;lt;/name&amp;gt;
    &amp;lt;/admin&amp;gt;
    &amp;lt;user&amp;gt;
        &amp;lt;name&amp;gt;Freud&amp;lt;/name&amp;gt;
    &amp;lt;/user&amp;gt;
    &amp;lt;user&amp;gt;
        &amp;lt;name&amp;gt;Bob&amp;lt;/name&amp;gt;
    &amp;lt;/user&amp;gt;
&amp;lt;/parent&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Full error log confirms the issue parsing interleaving XML documents:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
ERROR [nioEventLoopGroupCloseable-3-1] Cannot parse anyxml.ERROR [nioEventLoopGroupCloseable-3-1] Cannot parse anyxml.javax.xml.stream.XMLStreamException: ParseError at [row,col]:[-1,-1]Message: Duplicate namespace &lt;span class=&quot;code-quote&quot;&gt;&quot;testenv:idea:test2&quot;&lt;/span&gt; element &lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt; in XML input at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:471) ~[314:org.opendaylight.yangtools.yang-data-codec-xml:4.0.6] at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.read(XmlParserStream.java:486) ~[314:org.opendaylight.yangtools.yang-data-codec-xml:4.0.6] at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.parse(XmlParserStream.java:270) ~[314:org.opendaylight.yangtools.yang-data-codec-xml:4.0.6] at org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream.traverse(XmlParserStream.java:297) ~[314:org.opendaylight.yangtools.yang-data-codec-xml:4.0.6] at org.opendaylight.netconf.util.NetconfUtil.transformDOMSourceToNormalizedNode(NetconfUtil.java:175) ~[288:org.opendaylight.netconf.util:1.8.0] at org.opendaylight.netconf.sal.connect.netconf.util.NetconfRpcStructureTransformer.selectFromDataStructure(NetconfRpcStructureTransformer.java:46) ~[285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.sal.connect.netconf.util.NetconfBaseOps.lambda$extractData$0(NetconfBaseOps.java:226) ~[285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(AbstractTransformFuture.java:242) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.doTransform(AbstractTransformFuture.java:232) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:118) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1138) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:958) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:726) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:48) [76:com.google.guava:27.1.0.jre] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$1.onSuccess(NetconfDeviceRpc.java:60) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc$1.onSuccess(NetconfDeviceRpc.java:57) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1076) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1138) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:958) [76:com.google.guava:27.1.0.jre] at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:726) [76:com.google.guava:27.1.0.jre] at org.opendaylight.netconf.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:45) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:337) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:269) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:48) [285:org.opendaylight.netconf.sal-netconf-connector:1.11.0] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:64) [280:org.opendaylight.netconf.netty-util:1.8.0] at org.opendaylight.netconf.nettyutil.AbstractNetconfSession.channelRead0(AbstractNetconfSession.java:187) [280:org.opendaylight.netconf.netty-util:1.8.0] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) [105:io.netty.transport:4.1.45.Final] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) [100:io.netty.codec:4.1.45.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295) [100:io.netty.codec:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) [105:io.netty.transport:4.1.45.Final] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) [100:io.netty.codec:4.1.45.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295) [100:io.netty.codec:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:59) [105:io.netty.transport:4.1.45.Final] at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:368) [105:io.netty.transport:4.1.45.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [102:io.netty.common:4.1.45.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [102:io.netty.common:4.1.45.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [105:io.netty.transport:4.1.45.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [102:io.netty.common:4.1.45.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [102:io.netty.common:4.1.45.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [102:io.netty.common:4.1.45.Final] at java.lang.&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.run(&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.java:834) [?:?]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Linux: 5.5.15-1&lt;/p&gt;

&lt;p&gt;Opendaylight: release 0.12.0&lt;/p&gt;

&lt;p&gt;NETCONF server: netopeer2 (v1.1.27) and&#160;sysrepo (v1.4.58).&lt;/p&gt;</environment>
        <key id="32682">YANGTOOLS-1107</key>
            <summary>XML document: Lists interleaving not supported</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="jluhrsen">Jamo Luhrsen</assignee>
                                    <reporter username="lcbcfoo">Lucas Castro</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 May 2020 14:26:08 +0000</created>
                <updated>Wed, 10 Jun 2020 18:31:09 +0000</updated>
                            <resolved>Tue, 9 Jun 2020 14:48:24 +0000</resolved>
                                                    <fixVersion>3.0.12</fixVersion>
                    <fixVersion>5.0.3</fixVersion>
                    <fixVersion>4.0.10</fixVersion>
                                    <component>parser</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="68158" author="jluhrsen" created="Sun, 31 May 2020 05:47:19 +0000"  >&lt;p&gt;thanks for reporting &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=lcbcfoo&quot; class=&quot;user-hover&quot; rel=&quot;lcbcfoo&quot;&gt;lcbcfoo&lt;/a&gt;. I think I have something to fix it. I&apos;ll submit a patch soon.&lt;/p&gt;</comment>
                            <comment id="68192" author="JIRAUSER12935" created="Tue, 9 Jun 2020 17:44:27 +0000"  >&lt;p&gt;Great to see it implemented, thanks!&lt;/p&gt;

&lt;p&gt;This is my first contact with Opendaylight internal development, this patch in YANG Tools will only be available in the next Opendaylight release? Or where can I find steps to build the project with this version of YANG Tools?&lt;/p&gt;</comment>
                            <comment id="68199" author="jluhrsen" created="Wed, 10 Jun 2020 18:31:09 +0000"  >&lt;p&gt;this fix made it in to &lt;a href=&quot;https://lists.opendaylight.org/g/release/message/18990&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;yangtools v5.0.3 &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;yangtools is a release integrated project, meaning it will not be available in any full distribution&lt;br/&gt;
build until we bump our development branches for consuming projects to this new version. Once that&lt;br/&gt;
happens I can point you to a way to get an unreleased distribution to play with.&lt;/p&gt;

&lt;p&gt;otherwise if you wait, both Aluminium&apos;s first release (September 2020) and Magnesium SR2 (next month)&lt;br/&gt;
should have this fix. Here is the &lt;a href=&quot;https://docs.opendaylight.org/en/stable-magnesium/release-process/release-schedule.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;release schedule &lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="32747">YANGTOOLS-1111</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03skn:</customfieldvalue>

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