<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:54:53 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>[CONTROLLER-1176] Restconf deserialization of xpath for instance identifiers fails to handle &quot;/&quot; in string literals</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1176</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;Given an instance identifier like:&lt;br/&gt;
&quot;/network-topology:network-topology/network-topology:topology/network-topology:topology&lt;span class=&quot;error&quot;&gt;&amp;#91;network-topology:topology-id=&amp;#39;ovsdb:1&amp;#39;&amp;#93;&lt;/span&gt;/network-topology:node/network-topology:node&lt;span class=&quot;error&quot;&gt;&amp;#91;network-topology:node-id=&amp;#39;ovsdb://127.0.0.1:16640&amp;#39;&amp;#93;&lt;/span&gt;&quot;&lt;/p&gt;

&lt;p&gt;Submitted via restconf, restconf fails to properly deserialize it (instead simple writing a null in the field containing that value).&lt;/p&gt;

&lt;p&gt;Some preliminary debugging showed that in controller/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestUtil.java&lt;/p&gt;

&lt;p&gt;what is going wrong is that on line 41 (in method asInstanceIdentifier()):&lt;/p&gt;

&lt;p&gt;        final String[] xPathParts = valueTrimmed.split(&quot;/&quot;);&lt;/p&gt;

&lt;p&gt;This results in splitting the xpath expression mid-predicate: because the predicate:&lt;span class=&quot;error&quot;&gt;&amp;#91;network-topology:node-id=&amp;#39;ovsdb://127.0.0.1:16640&amp;#39;&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;contains a number of &quot;/&quot; characters within the literal &apos;ovsdb://127.0.0.1:16640&apos; it contains.&lt;/p&gt;

&lt;p&gt;Looking at the XPath BNF:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.w3.org/2002/11/xquery-xpath-applets/xpath-bnf.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.w3.org/2002/11/xquery-xpath-applets/xpath-bnf.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It appears that it is valid to have a &quot;/&quot; within a literal (which in this case it is.&lt;/p&gt;

&lt;p&gt;Please fix the parsing to correctly handle string literals.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="25730">CONTROLLER-1176</key>
            <summary>Restconf deserialization of xpath for instance identifiers fails to handle &quot;/&quot; in string literals</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="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="hagbard">Ed Warnicke</reporter>
                        <labels>
                    </labels>
                <created>Fri, 27 Feb 2015 02:22:18 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:55 +0000</updated>
                            <resolved>Mon, 16 Mar 2015 16:48:03 +0000</resolved>
                                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="50184" author="tony.tkacik@gmail.com" created="Mon, 2 Mar 2015 13:43:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/15900/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/15900/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="50185" author="ragbhat@cisco.com" created="Mon, 2 Mar 2015 18:42:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/15934/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/15934/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made a fix to the RestUtil.java in controller. Tony, I am assuming both of these code paths are utilized and both fixes are needed. If not, We can abandon my fix&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>2766</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=2766]]></customfieldvalue>

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

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