<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:33 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>[MDSAL-63] Datastore / Restconf / Data Broker should optionally support &quot;default&quot; statement</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-63</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Yang leaf default statement is not honored by Yang/datastore&lt;/p&gt;

&lt;p&gt;I have the following in a model&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;leaf symmetric {
  type boolean;
  default false;
  description &quot;If the chain is symmetric we will create two service paths, one ingress and another egress. Packets traverse the egress service path in the reverse order of the ingress path&quot;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;If a create new container and do not pass a value for leaf &quot;symmetric&quot; I expect &quot;false&quot; to be assigned. But this does not happen.&lt;/p&gt;

&lt;p&gt;If I read the container and try to check the value of &quot;symmetric&quot; from datastore I get a NULL pointer exception:&lt;/p&gt;

&lt;p&gt;if (serviceFunctionChain.isSymmetric()) {&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;And serviceFunctionChain is not NULL. All values are properly there with exception of &quot;symmetric&quot;&lt;/p&gt;

&lt;p&gt;ServiceFunctionChain{getName=SFC2, getSfcServiceFunction=&lt;span class=&quot;error&quot;&gt;&amp;#91;SfcServiceFunction\{getName=firewall-abstract2, getOrder=0, getType=class org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sft.rev140701.Firewall, augmentations={}}, SfcServiceFunction\{getName=napt44-abstract2, getOrder=1, getType=class org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sft.rev140701.Napt44, augmentations={}}&amp;#93;&lt;/span&gt;, augmentations={}}&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26885">MDSAL-63</key>
            <summary>Datastore / Restconf / Data Broker should optionally support &quot;default&quot; statement</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="repenno">Reinaldo Penno</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Dec 2014 01:53:30 +0000</created>
                <updated>Tue, 9 Jan 2024 09:15:23 +0000</updated>
                                                            <fixVersion>14.0.0</fixVersion>
                                    <component>Binding runtime</component>
                    <component>DOM API</component>
                    <component>DOM runtime</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="54059" author="tony.tkacik@gmail.com" created="Mon, 8 Dec 2014 08:45:15 +0000"  >&lt;p&gt;Data Broker APIs / Data APIs should provide an option to user to create data&lt;br/&gt;
with defaults on (e.g. Netconf capability described in &lt;a href=&quot;https://tools.ietf.org/html/rfc6243&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc6243&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;YANG itself does not mandate honoring &quot;default&quot; statements, just captures them and&lt;br/&gt;
mapping to particular system deals how defaults are processed.&lt;/p&gt;

&lt;p&gt;MD-SAL itself is not Netconf (specified via additional capability) nor Restconf, so this is new feature request.&lt;/p&gt;

&lt;p&gt;Default statements are already supported by config models in Config subsystem.&lt;/p&gt;</comment>
                            <comment id="54060" author="ssaxena@luminanetworks.com" created="Fri, 18 Sep 2015 14:05:16 +0000"  >&lt;p&gt;So what is the plan to fix &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-63&quot; title=&quot;Datastore / Restconf / Data Broker should optionally support &amp;quot;default&amp;quot; statement&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-63&quot;&gt;MDSAL-63&lt;/a&gt;? If ODL claims to be a commercial level product and needs to be deployed in Service Provider or Large Enterprise markets, then we need to support all aspects of YANG. Having customers or individual apps deal with handling of default will make adoption of ODL harder.&lt;/p&gt;</comment>
                            <comment id="54061" author="colin@colindixon.com" created="Tue, 13 Oct 2015 17:30:25 +0000"  >&lt;p&gt;There was a long discussion about this on the MD-SAL weekly interest call today. There are meeting minutes here:&lt;br/&gt;
&lt;a href=&quot;https://meetings.opendaylight.org/opendaylight-meeting/2015/md_sal_interest_call/opendaylight-meeting-md_sal_interest_call.2015-10-13-16.44.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://meetings.opendaylight.org/opendaylight-meeting/2015/md_sal_interest_call/opendaylight-meeting-md_sal_interest_call.2015-10-13-16.44.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The implication of the discussion seemed to be that default values could not be actually stored in the data store and returned normally while honoring the spec based on some clarification in RFC6243 which provides methods (for NETCONF) that allow for reads which need to explicitly contain the default nodes.&lt;/p&gt;

&lt;p&gt;For what it&apos;s worth, it&apos;s not clear to me on reading RFC6243 what the correct behavior is. It seems more than RFC6243 notes that different NETCONF implementations have done different things, which has complicated development, so there&apos;s an extension to NETCONF to allow for the behavior to be more explicit.&lt;/p&gt;

&lt;p&gt;Along those lines, unless I&apos;m missing something else, I don&apos;t see the spec as forbidding us from creating default nodes.&lt;/p&gt;</comment>
                            <comment id="68650" author="rovarga" created="Wed, 30 Sep 2020 00:52:44 +0000"  >&lt;p&gt;Okay, my long analysis got lost, sorry. There are four views of data, each having different trade-offs:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;DOM, where we never want to see derived defaults&lt;/li&gt;
	&lt;li&gt;yang-binding builders, where we cannot have 100% coverage due to &apos;default&apos; being an instantiation-override function. Since groupings are reused, we cannot have them implement defaults accurately.&lt;/li&gt;
	&lt;li&gt;DOM-based proxies, which have access to both 1. and 2. (in principe)&lt;/li&gt;
	&lt;li&gt;NETCONF/RESTCONF access&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The crux of the problem is differentiating when a value is default and when it is explicit in binding APIs. We also need to deal with copy constructors. At the end of the day we want two different access methods, one for explicit, on for explicit-or-implicit values &#8211; obviously within binding spec limitations.&lt;/p&gt;

&lt;p&gt;RESTCONF has enough information to know what the user wants, hence it knows how to fake it, and this should have little problem complying.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="22875">YANGTOOLS-455</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="22927">YANGTOOLS-507</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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>2489</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=2489]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10308"><![CDATA[New Feature]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10321"><![CDATA[Carbon]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

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

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