<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:42 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-591] Report error if default value for typedef fails constraint validation from typedef or base typedef</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-591</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Yangtools should be augmented to report an error in the following block:&lt;/p&gt;

&lt;p&gt;    typedef listen-ipv4-address &lt;/p&gt;
{
        type iit:ipv4-address;
        //default &quot;0.0.0.0&quot;;
        default &quot;xxx&quot;;
    }

&lt;p&gt;The value of &quot;xxx&quot; provided for &quot;default&quot; does not match the constraints of the base type (ipv4-address), which is defined by a pattern.&lt;/p&gt;

&lt;p&gt;In the Xored YangIDE Eclipse plugin, which uses Yangtools, this does not report an error.&lt;/p&gt;

&lt;p&gt;In constrast, the Pyang Python compiler reports the following:&lt;/p&gt;

&lt;p&gt;error: the value &quot;xxx&quot; does not match its base type at ietf-inet-types.yang:179 - pattern mismatch for the default value for pattern defined at ietf-inet-types.yang:184&lt;/p&gt;

&lt;p&gt;This is as used in the Yang Design Studio Eclipse plugin, which utilizes Pyang.&lt;/p&gt;

&lt;p&gt;When I reported this in the yangtools-dev mailing list, Robert Varga indicated &quot;it would require&lt;br/&gt;
the parser to have knowledge of data type binding &amp;#8211; something which it currently does not have.&quot;&lt;/p&gt;

&lt;p&gt;I&apos;m interested in any issues that show a disparity between what pyang acknowledges as valid Yang code, compared to Yangtools.  This isn&apos;t to be &quot;competitive&quot;, it&apos;s simply to provide consistency with other tools in the domain.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23011">YANGTOOLS-591</key>
            <summary>Report error if default value for typedef fails constraint validation from typedef or base typedef</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="-1">Unassigned</assignee>
                                    <reporter username="dkarr">David M. Karr</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Mar 2016 16:23:20 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:45 +0000</updated>
                            <resolved>Sun, 16 Oct 2016 20:45:33 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="43816" author="davidmichaelkarr@gmail.com" created="Mon, 14 Mar 2016 23:53:49 +0000"  >&lt;p&gt;Note that I understand there is debatable ambiguity in the Yang specification, specifically in this area (and I&apos;m sure in others), but I think it&apos;s reasonable to look past that and consider what&apos;s &quot;reasonable and logical&quot;, and experience from existing implementations.&lt;/p&gt;

&lt;p&gt;Specifically, irrespective of whether the Yang specification is clear on whether or how the default value could ever be used, I can&apos;t see how anyone could argue that there&apos;s any doubt that it&apos;s reasonable for the value specified as the &quot;default&quot; to not be valid according to the constraints of the type or its base types.&lt;/p&gt;

&lt;p&gt;It&apos;s also reasonable to consider that at least one Yang compiler, being Pyang, explicitly states that this value needs to be validated against those constraints.  Being consistent with other existing implementations, even if by ad hoc conventions, is good for all users of both products.&lt;/p&gt;</comment>
                            <comment id="43817" author="tony.tkacik@gmail.com" created="Mon, 25 Apr 2016 13:28:32 +0000"  >&lt;p&gt;Probably duplicate of 4650&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="22971">YANGTOOLS-551</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>5517</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=5517]]></customfieldvalue>

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

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