<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:48 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-761] Tree traversal to find a parent does not return data.</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-761</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I have the following tree in the configuration tree:&lt;br/&gt;
Nodes&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;  Node &#8211; SampleNodeAugmentation&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;  NodeConnector &#8211; SampleNodeConnectorAugmentation&lt;/p&gt;

&lt;p&gt;There can be multiple instances of Node under Nodes and multiple instances of NodeConnector under Node. There can be only one instance of SampleNodeAugmentation and SampleNodeConnectorAugmentation for a given instance of Node or NodeConnector.&lt;/p&gt;

&lt;p&gt;I have registered for datachangenotification on the SampleNodeConnectorAugmentation. When I get the instance of SampleNodeConnectorAugmentation in onDataChanged, I need to traverse the tree up and get some data from the SampleNodeAugmentation object. &lt;/p&gt;

&lt;p&gt;I tried the following in onDataChanged:&lt;br/&gt;
Map&amp;lt;InstanceIdentifier&amp;lt;?&amp;gt;, DataObject&amp;gt; created = change.getCreatedData();&lt;br/&gt;
for (Map.Entry&amp;lt;InstanceIdentifier&amp;lt;?&amp;gt;, DataObject&amp;gt; entry : created.entrySet())&lt;br/&gt;
 {&lt;br/&gt;
   InstanceIdentifier&amp;lt;?&amp;gt; ii = entry.getKey();&lt;br/&gt;
InstanceIdentifier&amp;lt;NodeConnector&amp;gt; ncii = ii.firstIdentifierOf(NodeConnector.class);&lt;br/&gt;
InstanceIdentifier&amp;lt;Node&amp;gt; nii = ncii.firstIdentifierOf(Node.class);&lt;br/&gt;
System.out.println(&quot;**** Instance Identifier of the node connector is : &quot; + ncii.toString());&lt;br/&gt;
System.out.println(&quot;**** Instance Identifier of the node is : &quot; + nii.toString());&lt;br/&gt;
ReadOnlyTransaction readTx = dataService.newReadOnlyTransaction();&lt;br/&gt;
try {&lt;br/&gt;
ncdata = readTx.read(LogicalDatastoreType.CONFIGURATION, nii).get();&lt;br/&gt;
} catch (InterruptedException | ExecutionException e) {&lt;br/&gt;
e.printStackTrace();&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;However, the ReadOnlyTransaction does not return a Node object. It looks like the ReadOnlyTransaction needs the Key of the object along with the path to return the object and the firstIdentiferOf does not return a keyed identifier.&lt;br/&gt;
Using an instance identifier without a key works only for root objects like the Nodes class or the NetworkTopology class that can have only one instance in the MD-SAL.&lt;/p&gt;

&lt;p&gt;There should be a way to traverse up the tree from a given object in the tree.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="25315">CONTROLLER-761</key>
            <summary>Tree traversal to find a parent does not return data.</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="10002">Duplicate</resolution>
                                        <assignee username="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="ramkumar.gowrishankar@gmail.com">Ramkumar Gowrishankar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Sep 2014 20:03:44 +0000</created>
                <updated>Mon, 9 Feb 2015 10:43:29 +0000</updated>
                            <resolved>Mon, 9 Feb 2015 10:43:29 +0000</resolved>
                                    <version>Helium</version>
                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="49034" author="rovarga" created="Thu, 4 Sep 2014 12:28:43 +0000"  >&lt;p&gt;Read/put/merge/delete on wildcarded instance identifiers is not defined, so &lt;a href=&quot;https://git.opendaylight.org/gerrit/10767&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/10767&lt;/a&gt; adds preconditions to catch them early on.&lt;/p&gt;

&lt;p&gt;The root cause still needs to be investigated, though.&lt;/p&gt;</comment>
                            <comment id="49035" author="tony.tkacik@gmail.com" created="Tue, 9 Sep 2014 14:24:15 +0000"  >&lt;p&gt;Could you please provide information, on which build you experienced this error?&lt;br/&gt;
Also &quot;ls -la&quot; of plugins folder of controller will be helpful.&lt;/p&gt;</comment>
                            <comment id="49036" author="george.y.zhao@huawei.com" created="Mon, 19 Jan 2015 23:23:14 +0000"  >&lt;p&gt;move to Lithium&lt;/p&gt;</comment>
                            <comment id="49037" author="tony.tkacik@gmail.com" created="Mon, 9 Feb 2015 10:33:42 +0000"  >&lt;p&gt;Fixed in stable and master. As it turned out MD-SAL did return also instance identifiers without keys, which should not be used for reads.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="22690">YANGTOOLS-270</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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1690</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=1690]]></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="10315"><![CDATA[Lithium]]></customfieldvalue>

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

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