<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:56:29 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-1555] nested instance identifer values</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1555</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;The following instance-identifer value for node osiIf &#160;&lt;/p&gt;

&lt;p&gt;crosses a list element&lt;/p&gt;

&lt;p&gt;whose key my-is-is:name is an intance-identifer ...&lt;/p&gt;

&lt;p&gt;This following encoding seems reasonable as output of a GET,&lt;/p&gt;

&lt;p&gt;in which the single quote characters are escaped&lt;/p&gt;

&lt;p&gt;in the nested instance-idenfier value.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;&amp;lt;osiIf &#160;xmlns:my-interfaces=&quot;xxx&quot; &#160;
&#160; &#160; &#160; &#160; xmlns:my-is-is=&quot;yyy&quot;&#160;
&#160; &#160; &#160; &#160; xmlns:my-routing=&quot;zzz&quot;&amp;gt;/my-routing:routing/my-routing:control-plane-protocol[my-routing:name=&apos;MANAGEMENT-PLANE&apos;]/my-is-is:isis/my-is-is:interface[my-is-is:name=&apos;/my-interfaces:interfaces/my-interfaces:if[my-interfaces:typeIf=&amp;amp;apos;lan&amp;amp;apos;][my-interfaces:idx=&amp;amp;apos;1&amp;amp;apos;]&apos;]&amp;lt;/osiIf&amp;gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;But it is not accepted by opendaylight sw, which raises the following error:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;{
&#160; &quot;errors&quot;: {
&#160; &#160; &quot;error&quot;: [
      {
 &#160; &#160; &#160; &#160; &quot;error-tag&quot;: &quot;operation-failed&quot;,
 &#160; &#160; &#160; &#160; &quot;error-info&quot;: &quot;java.lang.IllegalArgumentException: Could not parse Instance Identifier &apos;/my-routing:routing/my-routing:control-plane-protocol[my-routing:name=&apos;MANAGEMENT-PLANE&apos;]/my-is-is:isis/my-is-is:interface[my-is-is:name=&apos;/my-interfaces:interfaces/my-interfaces:if[my-interfaces:typeIf=&apos;lan&apos;][my-interfaces:idx=&apos;1&apos;]&apos;]&apos;. Offset: 203 : Reason: Precondition must ends with &apos;]&apos;&quot;,
 &#160; &#160; &#160; &#160; &quot;error-message&quot;: &quot;Transaction failed&quot;,
 &#160; &#160; &#160; &#160; &quot;error-type&quot;: &quot;application&quot;
 &#160; &#160; &#160; }
&#160; &#160; ]
&#160; }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>&lt;p&gt;karaf 18.3&lt;/p&gt;</environment>
        <key id="37734">YANGTOOLS-1555</key>
            <summary>nested instance identifer values</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="brigam">Maurizio Brigandi&apos;</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Dec 2023 16:50:27 +0000</created>
                <updated>Tue, 12 Dec 2023 18:11:22 +0000</updated>
                            <resolved>Tue, 12 Dec 2023 17:52:23 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="72909" author="rovarga" created="Tue, 12 Dec 2023 17:52:23 +0000"  >&lt;p&gt;This is not a bug.&lt;br/&gt;
The problem here is you are using XML entities to hide nested apostrophes &amp;#8211; and those get replaced by the XML parser, as &lt;a href=&quot;https://stackoverflow.com/questions/50038062/java-xmlstreamreader-converts-quot-to&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;it it&apos;s job&lt;/a&gt;. That means your document&apos;s instance-identifier value is completely equivalent to the string we report in the error message &amp;#8211; which is exactly what the XMLStreamReader gives us.&lt;/p&gt;

&lt;p&gt;In order to make this case work, you need to use YANG string escaping, and since the embedded instance-identifier value uses single-quoted strings, the outer value needs to use double-quoted strings and escape the value using the &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc7950#page-46&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;rules associated with that&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/opendaylight/yangtools/blob/bab5285c29c41b6e25098fd1859803534d24324f/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/AbstractStringInstanceIdentifierCodec.java#L106-L127&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/opendaylight/yangtools/blob/bab5285c29c41b6e25098fd1859803534d24324f/data/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/AbstractStringInstanceIdentifierCodec.java#L106-L127&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I.e. the value should be:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;/my-routing:routing/my-routing:control-plane-protocol[my-routing:name=&apos;MANAGEMENT-PLANE&apos;]/my-is-is:isis/my-is-is:interface[my-is-is:name=&quot;/my-interfaces:interfaces/my-interfaces:if[my-interfaces:typeIf=&apos;lan&apos;][my-interfaces:idx=&apos;1&apos;]&quot;]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0472n:</customfieldvalue>

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