<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:59:56 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>[GENIUS-109] TestInterfaceManager.addInterfaceInfo() writes invalid operational state</title>
                <link>https://jira.opendaylight.org/browse/GENIUS-109</link>
                <project id="10126" key="GENIUS">genius</project>
                    <description>&lt;p&gt;I&#8217;m running into an issue porting Netvirt to YANG Tools 2, and I&#8217;m not sure how I should go about fixing it. Basically, we have test code which creates an interface like this:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;ParentRefs parentRefs = new ParentRefsBuilder()&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setDatapathNodeIdentifier(interfaceInfo.getDpId())&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setParentInterface(interfaceInfo.getInterfaceName())&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .build();&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;return new InterfaceBuilder()&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setKey(new InterfaceKey(interfaceInfo.getInterfaceName()))&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setName(interfaceInfo.getInterfaceName())&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setDescription(&quot;Vlan interface&quot;)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setEnabled(true)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .setType(L2vlan.class)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .addAugmentation(ParentRefs.class, parentRefs)&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .build();&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;(InterfaceBuilder is the version from org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces which doesn&#8217;t have statistics.)&lt;/p&gt;

&lt;p&gt;However trying to store this in the datastore blows up with&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;java.lang.IllegalArgumentException: Node (urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)interface[&lt;/tt&gt;{{&lt;/p&gt;
{(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)name=23701c04-1118-4c65-9425-78a80d49a211}
&lt;p&gt;] is missing mandatory descendant /(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)statistics/discontinuity-time}}&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.google.common.base.Preconditions.checkArgument(Preconditions.java:434)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.opendaylight.yangtools.yang.data.impl.schema.tree.MandatoryLeafEnforcer$Strict.enforceOnData(MandatoryLeafEnforcer.java:44)&lt;/tt&gt;&lt;br/&gt;
{{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.opendaylight.yangtools.yang.data.impl.schema.tree.ListEntryModificationStrategy.verifyStructure(ListEntryModificationStrategy.java:34) }}&lt;/p&gt;

&lt;p&gt;Why is it expecting a statistics node here? Isn&#8217;t that just for org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state&#8217;s version of Interface?&lt;/p&gt;

&lt;p&gt;Is the validator looking at the wrong parent? Presumably &lt;a href=&quot;https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=blob;f=model/ietf/ietf-interfaces/src/main/yang/ietf-interfaces.yang;h=3689c8920d918465e91bf967ef19bbc2a50b07bd;hb=HEAD&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=blob;f=model/ietf/ietf-interfaces/src/main/yang/ietf-interfaces.yang;h=3689c8920d918465e91bf967ef19bbc2a50b07bd;hb=HEAD&lt;/a&gt; is valid but the validator doesn&#8217;t distinguish between interface in interfaces v. interface in interfaces-state.&lt;/p&gt;</description>
                <environment></environment>
        <key id="29009">GENIUS-109</key>
            <summary>TestInterfaceManager.addInterfaceInfo() writes invalid operational state</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="10004" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Verified</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="skitt">Stephen Kitt</assignee>
                                    <reporter username="skitt">Stephen Kitt</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Dec 2017 17:20:46 +0000</created>
                <updated>Thu, 19 Apr 2018 14:37:25 +0000</updated>
                            <resolved>Thu, 19 Apr 2018 14:37:20 +0000</resolved>
                                                    <fixVersion>Oxygen</fixVersion>
                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="60522" author="rovarga" created="Wed, 20 Dec 2017 12:35:22 +0000"  >&lt;p&gt;I think we need steps to reproduce here.&lt;/p&gt;</comment>
                            <comment id="60525" author="skitt@redhat.com" created="Wed, 20 Dec 2017 16:13:26 +0000"  >&lt;p&gt;Indeed, here goes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;build mdsal, controller, genius and netvirt in full (-Pq) with the relevant patches from &lt;a href=&quot;https://wiki.opendaylight.org/view/ODL_Root_Parent:BigBumpOfJan2018:&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.opendaylight.org/view/ODL_Root_Parent:BigBumpOfJan2018&lt;/a&gt; (ignoring errors at the end of the genius build):
	&lt;ul&gt;
		&lt;li&gt;mdsal: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/64168/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/64168&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;controller: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/64175/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/64175&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;genius: &lt;a href=&quot;https://git.opendaylight.org/gerrit/66468&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/66468&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;netvirt: &lt;a href=&quot;https://git.opendaylight.org/gerrit/66563&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/66563&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;run the build in netvirt&#8217;s vpnservice/elanmanager:&lt;br/&gt;
 &lt;tt&gt;cd vpnservice/elanmanager&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;mvn clean install&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="60540" author="rovarga" created="Thu, 21 Dec 2017 09:35:18 +0000"  >&lt;p&gt;The problem is in TestInterfaceManager.addInterfaceInfo(), which is populating the operational data store &#8211; which fails because the data does not contain the mandatory leaf.&lt;/p&gt;</comment>
                            <comment id="60542" author="skitt@redhat.com" created="Thu, 21 Dec 2017 14:30:17 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt;. This is fixed by &lt;a href=&quot;https://git.opendaylight.org/gerrit/66706&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/66706&lt;/a&gt; which also needs &lt;a href=&quot;https://git.opendaylight.org/gerrit/66709&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/66709&lt;/a&gt; in NetVirt.&lt;/p&gt;</comment>
                    </comments>
                    <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03947:</customfieldvalue>

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