<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19: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>[CONTROLLER-1803] WriteTransaction&apos;s merge method deletes container data node </title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1803</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;1. version info &lt;br/&gt;
 we use version 1.6.1-SNAPSHOT&lt;br/&gt;
 &amp;lt;dependency&amp;gt;&lt;br/&gt;
 &amp;lt;groupId&amp;gt;org.opendaylight.controller&amp;lt;/groupId&amp;gt;&lt;br/&gt;
 &amp;lt;artifactId&amp;gt;odl-mdsal-broker&amp;lt;/artifactId&amp;gt;&lt;br/&gt;
 &amp;lt;version&amp;gt;1.6.1-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br/&gt;
 &amp;lt;type&amp;gt;xml&amp;lt;/type&amp;gt;&lt;br/&gt;
 &amp;lt;classifier&amp;gt;features&amp;lt;/classifier&amp;gt;&lt;br/&gt;
 &amp;lt;/dependency&amp;gt;&lt;/p&gt;

&lt;p&gt;2. steps&lt;br/&gt;
 1) Yang file is in the Attachment&lt;br/&gt;
 2) We use restclient to PUT data ,the red node is a container&lt;br/&gt;
 &lt;a href=&quot;http://10.46.45.30:8181/restconf/config/bier-bgp-config:config-bgp-info&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://10.46.45.30:8181/restconf/config/bier-bgp-config:config-bgp-info&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;config-bgp-info xmlns=&quot;urn:bier:bgp:config&quot;&amp;gt;&lt;br/&gt;
 &amp;lt;local&amp;gt;&lt;br/&gt;
 &amp;lt;address&amp;gt;192.168.50.20&amp;lt;/address&amp;gt;&lt;br/&gt;
 &amp;lt;as&amp;gt;1&amp;lt;/as&amp;gt;&lt;br/&gt;
 &lt;font color=&quot;#FF0000&quot;&gt; &amp;lt;test-merge/&amp;gt;&lt;/font&gt;&lt;br/&gt;
 &amp;lt;/local&amp;gt;&lt;br/&gt;
 &amp;lt;neighbour&amp;gt;&lt;br/&gt;
 &amp;lt;address&amp;gt;192.168.50.11&amp;lt;/address&amp;gt;&lt;br/&gt;
 &amp;lt;as&amp;gt;1&amp;lt;/as&amp;gt;&lt;br/&gt;
 &amp;lt;/neighbour&amp;gt;&lt;br/&gt;
 &amp;lt;/config-bgp-info&amp;gt;&lt;/p&gt;

&lt;p&gt;3) The following code is exectued:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;----------------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;// read config-bgp-info from datastroe and populate the result to &quot;configBgpInfo&quot;&lt;br/&gt;
ConfigBgpInfo configBgpInfo = null;&lt;br/&gt;
final ReadOnlyTransaction transaction = topoManager.getDataBroker().newReadOnlyTransaction();&lt;br/&gt;
Optional&amp;lt;ConfigBgpInfo&amp;gt; optionalData;&lt;br/&gt;
try {&lt;br/&gt;
 optionalData = transaction.read(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION,&lt;br/&gt;
 configBgpInfoInstanceIdentifier).checkedGet();&lt;br/&gt;
 if (optionalData.isPresent()) {&lt;br/&gt;
 configBgpInfo = optionalData.get();&lt;br/&gt;
 LOG.info(&quot;Test merge configBgpInfo---------------{}&quot;,configBgpInfo);&lt;br/&gt;
 } else &lt;/p&gt;
{
 LOG.info(&quot;Test merge : Failed to read &quot;);
 }
&lt;p&gt;} catch (ReadFailedException e) {&lt;br/&gt;
 LOG.warn(&quot;Test merge failed to read {} &quot;, e);&lt;br/&gt;
}&lt;br/&gt;
transaction.close();&lt;/p&gt;


&lt;p&gt;// use merge to write &quot;configBgpInfo&quot; to datastore&lt;br/&gt;
writeTransaction.merge(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION,&lt;br/&gt;
 configBgpInfoInstanceIdentifier,configBgpInfo,true);&lt;br/&gt;
final CheckedFuture&amp;lt;Void, TransactionCommitFailedException&amp;gt; submitResult = writeTransaction.submit();&lt;/p&gt;

&lt;p&gt;try &lt;/p&gt;
{
 submitResult.get();
}
&lt;p&gt; catch (InterruptedException e) &lt;/p&gt;
{
 LOG.error(&quot;Test merge Test merge Test merge &quot;, e);
} catch (ExecutionException e) {
 LOG.error(&quot;Test merge Test merge Test merge &quot;, e);
}
&lt;p&gt;LOG.info(&quot;Test merge Test merge Test merge Test merge Test merge Test merge Test merge Test merge Test merge&quot;);&lt;/p&gt;

&lt;p&gt;------------------------------------------------------------------------&lt;/p&gt;

&lt;p&gt;4) We use restclient to GET&#160;data ,the red node disappears. (The result is estimated to be the same as step2)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://10.46.45.30:8181/restconf/config/bier-bgp-config:config-bgp-info&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://10.46.45.30:8181/restconf/config/bier-bgp-config:config-bgp-info&lt;/a&gt;&lt;br/&gt;
 &amp;lt;config-bgp-info xmlns=&quot;urn:bier:bgp:config&quot;&amp;gt;&lt;br/&gt;
 &amp;lt;local&amp;gt;&lt;br/&gt;
 &amp;lt;address&amp;gt;192.168.50.20&amp;lt;/address&amp;gt;&lt;br/&gt;
 &amp;lt;as&amp;gt;1&amp;lt;/as&amp;gt;&lt;br/&gt;
 &amp;lt;/local&amp;gt;&lt;br/&gt;
 &amp;lt;neighbour&amp;gt;&lt;br/&gt;
 &amp;lt;address&amp;gt;192.168.50.11&amp;lt;/address&amp;gt;&lt;br/&gt;
 &amp;lt;as&amp;gt;1&amp;lt;/as&amp;gt;&lt;br/&gt;
 &amp;lt;/neighbour&amp;gt;&lt;br/&gt;
 &amp;lt;/config-bgp-info&amp;gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="28979">CONTROLLER-1803</key>
            <summary>WriteTransaction&apos;s merge method deletes container data node </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="10003">Cannot Reproduce</resolution>
                                        <assignee username="gu.min1">Min GU</assignee>
                                    <reporter username="gu.min1">Min GU</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Dec 2017 01:19:25 +0000</created>
                <updated>Fri, 15 Mar 2019 22:04:19 +0000</updated>
                            <resolved>Fri, 15 Mar 2019 22:04:19 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="65621" author="rovarga" created="Wed, 14 Nov 2018 12:49:26 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=gu.min1&quot; class=&quot;user-hover&quot; rel=&quot;gu.min1&quot;&gt;gu.min1&lt;/a&gt; is this still present?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="14318" name="bier-bgp-config.yang" size="650" author="gu.min1" created="Wed, 13 Dec 2017 01:09:34 +0000"/>
                    </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|i038xj:</customfieldvalue>

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