<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:32 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-194] Milestone: Datastore/Code generation from Yang must enforce constraints across modules as per RFC6020</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-194</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt; 	&quot; When datastore processing is complete, the final contents MUST obey&lt;br/&gt;
   all validation constraints. This validation processing is performed&lt;br/&gt;
   at differing times according to the datastore. If the datastore is&lt;br/&gt;
   &amp;lt;running/&amp;gt; or &amp;lt;startup/&amp;gt;, these constraints MUST be enforced at the&lt;br/&gt;
   end of the &amp;lt;edit-config&amp;gt; or &amp;lt;copy-config&amp;gt; operation. If the&lt;br/&gt;
   datastore is &amp;lt;candidate/&amp;gt;, the constraint enforcement is delayed&lt;br/&gt;
   until a &amp;lt;commit&amp;gt; or &amp;lt;validate&amp;gt; operation.&lt;/p&gt;

&lt;p&gt;   o Any &quot;must&quot; constraints MUST evaluate to &quot;true&quot;.&lt;/p&gt;

&lt;p&gt;   o Any referential integrity constraints defined via the &quot;path&quot;&lt;br/&gt;
      statement MUST be satisfied.&lt;/p&gt;

&lt;p&gt;   o Any &quot;unique&quot; constraints on lists MUST be satisfied.&lt;/p&gt;

&lt;p&gt;   o The &quot;min-elements&quot; and &quot;max-elements&quot; constraints are enforced for&lt;br/&gt;
      lists and leaf-lists.&quot;&lt;/p&gt;

&lt;p&gt;More concrete problem&lt;/p&gt;

&lt;p&gt;I&apos;ve just stumbled on a RESTConf problem that I&apos;m having a hard problem finding a clean way out.&lt;/p&gt;

&lt;p&gt;In a nutshell:&lt;/p&gt;

&lt;p&gt;I have an ACL module that import interfaces module so that ACLs can be attached to interfaces.&lt;/p&gt;

&lt;p&gt;Normally in a router you can not delete an interface without removing the ACL first. This is to ensure consistency. Anyway, I&apos;m sure most people can relate to this issue and find their own example.&lt;/p&gt;

&lt;p&gt;Now, if my Yang models are compiled and loaded, there is nothing stopping the admin from deleting everything, everywhere. By the time I get onDataChanged() all changes are done.&lt;/p&gt;

&lt;p&gt;I just tested and I can go and remove an interface and indirectly stopping, ACL, QoS, packet forwarding, etc and putting the system in a state where ACL is attached to an interface that does not exist.&lt;/p&gt;

&lt;p&gt;In my ACL model interface is a leafref, meaning it is a reference to an interface that should exist in the system but that not enforced by RESTConf/datastore.&lt;/p&gt;


&lt;p&gt;If datastore can not provide such functionality, we need:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;an event that is triggered before changes are actually committed application can sanitize/stop changes that would result in consistency issues&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;Go back to JAX-RS decorators in order to provide consistency and do not rely in automatic RESTconf operations.&lt;/p&gt;

&lt;p&gt;or something else &lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22614">YANGTOOLS-194</key>
            <summary>Milestone: Datastore/Code generation from Yang must enforce constraints across modules as per RFC6020</summary>
                <type id="10000" iconUrl="https://jira.opendaylight.org/images/icons/issuetypes/epic.svg">Epic</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <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>Thu, 26 Jun 2014 13:12:02 +0000</created>
                <updated>Thu, 18 Jan 2024 18:13:32 +0000</updated>
                                                                            <component>data-impl</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="42812" author="tony.tkacik@gmail.com" created="Tue, 16 Jun 2015 07:49:18 +0000"  >&lt;p&gt;Partially fixed in Lithium:&lt;/p&gt;

&lt;p&gt;  The &quot;min-elements&quot; and &quot;max-elements&quot; constraints are enforced for&lt;br/&gt;
      lists and leaf-lists.&quot;&lt;/p&gt;</comment>
                            <comment id="42813" author="rovarga" created="Wed, 1 Jun 2016 12:02:49 +0000"  >&lt;p&gt;MUST/WHEN validation requires Xpath evaluation&lt;/p&gt;</comment>
                            <comment id="42814" author="pkajsa" created="Tue, 18 Oct 2016 11:16:44 +0000"  >&lt;p&gt;leafref validation (beta quality): &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/14891/19&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/14891/19&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="23106">YANGTOOLS-686</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="23092">YANGTOOLS-672</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_10004" key="com.pyxis.greenhopper.jira:gh-epic-label">
                        <customfieldname>Epic Name</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Complete DataTree enforcement </customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1247</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=1247]]></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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i025pz:</customfieldvalue>

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