<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55:56 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-1362] Deserialization of instance-identifier doesn&apos;t seem to work</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1362</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;ODL Release - Silicon-SR1 (0.14.1)&lt;/p&gt;

&lt;p&gt;Yangtools version - 6.0.6&lt;/p&gt;

&lt;p&gt;MD-SAL version - 7.0.7&lt;/p&gt;

&lt;p&gt;On receiving the following Netconf notification, the &quot;target&quot; field which is of type &quot;instance-identifier&quot; is not deserialized and hence the related data is missing in the deserialized object,&lt;/p&gt;

&lt;p&gt;&#160;&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;notification xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:netconf:notification:1.0&quot;&lt;/span&gt;&amp;gt;
 &amp;lt;eventTime&amp;gt;2021-11-11T11:26:16Z&amp;lt;/eventTime&amp;gt; 
  &amp;lt;netconf-config-change xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-netconf-notifications&quot;&lt;/span&gt;&amp;gt;
     &amp;lt;changed-by&amp;gt; 
       &amp;lt;username&amp;gt;root&amp;lt;/username&amp;gt; 
       &amp;lt;session-id&amp;gt;3&amp;lt;/session-id&amp;gt; 
     &amp;lt;/changed-by&amp;gt; 
     &amp;lt;datastore&amp;gt;running&amp;lt;/datastore&amp;gt; 
     &amp;lt;edit&amp;gt; 
        &amp;lt;target xmlns:hw=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-hardware&quot;&lt;/span&gt;&amp;gt;/hw:hardware/component[name=&lt;span class=&quot;code-quote&quot;&gt;&apos;chassis-fan0&apos;&lt;/span&gt;]/alias&amp;lt;/target&amp;gt;
        &amp;lt;operation&amp;gt;replace&amp;lt;/operation&amp;gt; 
     &amp;lt;/edit&amp;gt; 
  &amp;lt;/netconf-config-change&amp;gt; 
&amp;lt;/notification&amp;gt;
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Following is the Netconf TRACE, yangtools TRACE and some debugs from SDN-R while processing this notification -&lt;/p&gt;

&lt;p&gt;&#160;&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;
&#160;
2021-11-11T11:26:17,017 | TRACE | nioEventLoopGroupCloseable-3-4 | NetconfDeviceCommunicator | 358 - org.opendaylight.netconf.sal-netconf-connector - 1.13.2 | - | RemoteDevice{NTS_FUNCTION_TYPE_O_RAN_FH-0-830}: Notification received: &amp;lt;notification xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:netconf:notification:1.0&quot;&lt;/span&gt;&amp;gt;
 &amp;lt;eventTime&amp;gt;2021-11-11T11:26:16Z&amp;lt;/eventTime&amp;gt;
 &amp;lt;netconf-config-change xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-netconf-notifications&quot;&lt;/span&gt;&amp;gt;
 &amp;lt;changed-by&amp;gt;
 &amp;lt;username&amp;gt;root&amp;lt;/username&amp;gt;
 &amp;lt;session-id&amp;gt;3&amp;lt;/session-id&amp;gt;
 &amp;lt;/changed-by&amp;gt;
 &amp;lt;datastore&amp;gt;running&amp;lt;/datastore&amp;gt;
 &amp;lt;edit&amp;gt;
 &amp;lt;target xmlns:hw=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-hardware&quot;&lt;/span&gt;&amp;gt;/hw:hardware/hw:component[hw:name=&lt;span class=&quot;code-quote&quot;&gt;&apos;chassis-fan0&apos;&lt;/span&gt;]/hw:alias&amp;lt;/target&amp;gt;
 &amp;lt;operation&amp;gt;replace&amp;lt;/operation&amp;gt;
 &amp;lt;/edit&amp;gt;
 &amp;lt;/netconf-config-change&amp;gt;
&amp;lt;/notification&amp;gt;
2021-11-11T11:26:17,018 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type BaseStringType{name=(urn:ietf:params:xml:ns:yang:1)string, status=CURRENT, patterns=[]} miss simple org.opendaylight.yangtools.yang.data.codec.xml.QuotedXmlCodec@45d9f6d3
2021-11-11T11:26:17,018 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type DerivedUint32Type{baseType=BaseUint32Type{name=(urn:ietf:params:xml:ns:yang:1)uint32, status=CURRENT, range=org.opendaylight.yangtools.yang.model.util.type.ResolvedRangeConstraint@d93dec}, description=NETCONF Session Id or Zero to indicate none, path=AbsoluteSchemaPath{path=[(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2013-09-29)session-id-or-zero-type]}, status=CURRENT} miss simple org.opendaylight.yangtools.yang.data.codec.xml.NumberXmlCodec@3e195c43
2021-11-11T11:26:17,018 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type DerivedEnumerationType{baseType=BaseEnumerationType{name=(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)enumeration, status=CURRENT, values=[EnumPairImpl{name=running, value=0}, EnumPairImpl{name=startup, value=1}]}, &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;=running, description=Indicates which configuration datastore has changed., path=AbsoluteSchemaPath{path=[(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)netconf-config-change, (urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)datastore]}, status=CURRENT} miss simple org.opendaylight.yangtools.yang.data.codec.xml.QuotedXmlCodec@5185e3d2
2021-11-11T11:26:17,018 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type BaseInstanceIdentifierType{name=(urn:ietf:params:xml:ns:yang:1)instance-identifier, status=CURRENT, requireInstance=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;} miss simple org.opendaylight.yangtools.yang.data.codec.xml.XmlStringInstanceIdentifierCodec@64340942
2021-11-11T11:26:17,019 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type BaseStringType{name=(urn:ietf:params:xml:ns:yang:1)string, status=CURRENT, patterns=[]} hit simple org.opendaylight.yangtools.yang.data.codec.xml.QuotedXmlCodec@45d9f6d3
2021-11-11T11:26:17,019 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type DerivedEnumerationType{baseType=BaseEnumerationType{name=(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2013-09-29)enumeration, status=CURRENT, values=[EnumPairImpl{name=merge, value=0}, EnumPairImpl{name=replace, value=1}, EnumPairImpl{name=create, value=2}, EnumPairImpl{name=delete, value=3}, EnumPairImpl{name=remove, value=4}]}, &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;=merge, description=NETCONF &lt;span class=&quot;code-quote&quot;&gt;&apos;operation&apos;&lt;/span&gt; attribute values, path=AbsoluteSchemaPath{path=[(urn:ietf:params:xml:ns:netconf:base:1.0?revision=2013-09-29)edit-operation-type]}, reference=RFC 6241, Section 7.2, status=CURRENT} miss simple org.opendaylight.yangtools.yang.data.codec.xml.QuotedXmlCodec@6ed10479
2021-11-11T11:26:17,019 | TRACE | nioEventLoopGroupCloseable-3-4 | LeafInterner | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Interned object ImmutableLeafNode{identifier=(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)datastore, value=running} to ImmutableLeafNode{identifier=(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)datastore, value=running}
2021-11-11T11:26:17,019 | TRACE | nioEventLoopGroupCloseable-3-4 | LeafInterner | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Interned object ImmutableLeafNode{identifier=(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)operation, value=replace} to ImmutableLeafNode{identifier=(urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?revision=2012-02-06)operation, value=replace}
2021-11-11T11:26:17,020 | DEBUG | nioEventLoopGroupCloseable-3-4 | NotificationHandler | 358 - org.opendaylight.netconf.sal-netconf-connector - 1.13.2 | - | RemoteDevice{NTS_FUNCTION_TYPE_O_RAN_FH-0-830}: Forwarding notification org.opendaylight.netconf.sal.connect.netconf.schema.mapping.NetconfMessageTransformer$NetconfDeviceNotification@1adea6a4
2021-11-11T11:26:17,020 | INFO | nioEventLoopGroupCloseable-3-4 | ORanChangeNotificationListener | 219 - org.onap.ccsdk.features.sdnr.wt.sdnr-wt-devicemanager-o-ran-sc-oran-provider - 1.3.0.SNAPSHOT | - | onNetconfConfigChange (1) NetconfConfigChange{changedBy=ChangedBy{serverOrUser=ByUser{sessionId=SessionIdOrZeroType{_value=3}, username=root, augmentation=[]}, augmentation=[]}, datastore=Running, edit=[Edit{operation=Replace, augmentation=[]}], augmentation=[]}
2021-11-11T11:26:17,020 | INFO | nioEventLoopGroupCloseable-3-4 | ORanChangeNotificationListener | 219 - org.onap.ccsdk.features.sdnr.wt.sdnr-wt-devicemanager-o-ran-sc-oran-provider - 1.3.0.SNAPSHOT | - | Edit list size is 1
2021-11-11T11:26:17,020 | INFO | nioEventLoopGroupCloseable-3-4 | ORanChangeNotificationListener | 219 - org.onap.ccsdk.features.sdnr.wt.sdnr-wt-devicemanager-o-ran-sc-oran-provider - 1.3.0.SNAPSHOT | - | onNetconfConfigChange (2) Edit{operation=Replace, augmentation=[]}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;In the case of &quot;instance-identifier&quot;, the message reported is - &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;
2021-11-11T11:26:17,018 | TRACE | nioEventLoopGroupCloseable-3-4 | AbstractCodecFactory | 394 - org.opendaylight.yangtools.yang-data-util - 6.0.6 | - | Type BaseInstanceIdentifierType{name=(urn:ietf:params:xml:ns:yang:1)instance-identifier, status=CURRENT, requireInstance=&lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;} miss simple org.opendaylight.yangtools.yang.data.codec.xml.XmlStringInstanceIdentifierCodec@64340942&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;The last 3 lines are debug messages from the ORAN devicemanager where we do the following - &lt;/p&gt;

&lt;p&gt;&#160;&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;
log.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;onNetconfConfigChange (1) {}&quot;&lt;/span&gt;, notification.toString());
&lt;span class=&quot;code-object&quot;&gt;StringBuffer&lt;/span&gt; sb = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;StringBuffer&lt;/span&gt;();
List&amp;lt;Edit&amp;gt; editList = notification.nonnullEdit();
log.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;Edit list size is {}&quot;&lt;/span&gt;, editList.size());
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (Edit edit : editList) {
 &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (sb.length() &amp;gt; 0) {
   sb.append(&lt;span class=&quot;code-quote&quot;&gt;&quot;, &quot;&lt;/span&gt;);
 }
 sb.append(edit);
 InstanceIdentifier&amp;lt;?&amp;gt; target = edit.getTarget();
 &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (target != &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;) {
   log.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;TARGET: {} {}&quot;&lt;/span&gt;, target.getClass(), target.getTargetType());
   &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (PathArgument pa : target.getPathArguments()) {
     log.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;PathArgument {} Type {}&quot;&lt;/span&gt;, pa, pa.getType().getFields());
   }
   &lt;span class=&quot;code-comment&quot;&gt;// Write to database
&lt;/span&gt; }
}
log.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;onNetconfConfigChange (2) {}&quot;&lt;/span&gt;, sb);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I am not certain if it is already resolved in the later versions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="34923">YANGTOOLS-1362</key>
            <summary>Deserialization of instance-identifier doesn&apos;t seem to work</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="pendurty">Ravi Pendurty</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Nov 2021 04:47:59 +0000</created>
                <updated>Sun, 14 Nov 2021 14:21:11 +0000</updated>
                            <resolved>Sun, 14 Nov 2021 08:46:55 +0000</resolved>
                                    <version>7.0.9</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="70136" author="JIRAUSER13146" created="Fri, 12 Nov 2021 04:56:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=highstreetherbert&quot; class=&quot;user-hover&quot; rel=&quot;highstreetherbert&quot;&gt;highstreetherbert&lt;/a&gt;, FYI..&lt;/p&gt;</comment>
                            <comment id="70137" author="JIRAUSER13150" created="Fri, 12 Nov 2021 08:35:32 +0000"  >&lt;p&gt;Not clear if it is a netconf or yangtools problem .. could be a missing configuration of yangtools by netconf.&lt;/p&gt;

&lt;p&gt;The problem seems to be here:&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;target xmlns:hw=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:yang:ietf-hardware&quot;&lt;/span&gt;&amp;gt;/hw:hardware/component[name=&lt;span class=&quot;code-quote&quot;&gt;&apos;chassis-fan0&apos;&lt;/span&gt;]/alias&amp;lt;/target&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;&quot;target&quot; is an xml element from namespace: xmlns=&quot;urn:ietf:params:xml:ns:yang:ietf-netconf-notifications&quot;&lt;/li&gt;
	&lt;li&gt;xmlns:hw is relevant for the &quot;content&quot; part of the element -&amp;gt; This seems not to work.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For information:&#160;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=alex.stancu&quot; class=&quot;user-hover&quot; rel=&quot;alex.stancu&quot;&gt;alex.stancu&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="70138" author="rovarga" created="Sun, 14 Nov 2021 08:37:57 +0000"  >&lt;p&gt;The instance identifier seems very much invalid as per &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc6020#section-9.13.5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://datatracker.ietf.org/doc/html/rfc6020#section-9.13.5&lt;/a&gt; &amp;#8211; it is missing prefixes for component, name and alias &amp;#8211; hence those would be resolved as part of ietf-netconf-notifications&lt;/p&gt;</comment>
                            <comment id="70139" author="rovarga" created="Sun, 14 Nov 2021 08:46:55 +0000"  >&lt;p&gt;The problem is actually that you are trying to do this with Binding APIs: the instance identifier would refer (were it properly encoded) to a leaf, YangInstanceIdentifiers pointing to leaf nodes are not representable as InstanceIdentifer (what would be DataObject class?).&lt;/p&gt;

&lt;p&gt;Switch to DOM APIs and you will be fine.&lt;/p&gt;</comment>
                            <comment id="70140" author="JIRAUSER13146" created="Sun, 14 Nov 2021 12:24:40 +0000"  >&lt;p&gt;As per - &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc7951#section-6.11&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://datatracker.ietf.org/doc/html/rfc7951#section-6.11&lt;/a&gt; - the provided instance identifier seems to be OK. Are the 2 references (the one provided by you above and the one in this comment) contradictory?&lt;/p&gt;</comment>
                            <comment id="70141" author="rovarga" created="Sun, 14 Nov 2021 14:00:34 +0000"  >&lt;p&gt;They are not contradictory at all. RFC6020/RFC7950 define the encoding in XML, RFC7951 defines the encoding in JSON. Since we are talking about NETCONF here, RFC7951 is simply irrelevant.&lt;/p&gt;</comment>
                            <comment id="70142" author="JIRAUSER13146" created="Sun, 14 Nov 2021 14:21:11 +0000"  >&lt;p&gt;Thanks a lot Robert. Appreciate your inputs on this issue.&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i040nj:</customfieldvalue>

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