<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53: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>[CONTROLLER-644] JMXGenerator IllegalStateException when referring a Grouping from augmented model</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-644</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I have 2 yang files when constructing a system entity:&lt;/p&gt;

&lt;p&gt;The main file a &quot;system.yang&quot; where the entity-fields are defined, and configuration file &quot;system-config.yang&quot; that provides an augmentation to configuration with binding-broker, data-provider and rpc-registry containers inside (standard definition):&lt;/p&gt;

&lt;p&gt;augment &quot;/config:modules/config:module/config:configuration&quot; {&lt;/p&gt;

&lt;p&gt;An additional container is appended after &quot;container rpc-registry&quot; e.g.&lt;/p&gt;

&lt;p&gt;container entity-config {&lt;br/&gt;
   uses system:entity-fields;&lt;/p&gt;

&lt;p&gt;   leaf description &lt;/p&gt;
{
      type string;
   }
&lt;p&gt;				&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;If I removed the &quot;leaf description&quot; from the &quot;system-config.yang&quot;, I&apos;m getting a  following ERROR. If the &quot;leaf description&quot; remains no ERROR is thrown and entity&apos;s fields are generated:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;ERROR&amp;#93;&lt;/span&gt; Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:0.6.2-SNAPSHOT:generate-sources (default) on project ..: yang-to-sources: One or more code generators failed, including failed list(generatorClass=exception) &lt;/p&gt;
{org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator=java.lang.IllegalStateException}
&lt;p&gt; -&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;Help 1&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Question is why there should be an additional leaf defined?&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25198">CONTROLLER-644</key>
            <summary>JMXGenerator IllegalStateException when referring a Grouping from augmented model</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</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="10000">Done</resolution>
                                        <assignee username="mmarsale@cisco.com">Maros Marsalek</assignee>
                                    <reporter username="mradakov@cisco.com">Miloslav Radakovic</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Jul 2014 09:52:40 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:01 +0000</updated>
                            <resolved>Wed, 30 Jul 2014 10:24:01 +0000</resolved>
                                                                    <component>config</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="48752" author="mmarsale@cisco.com" created="Mon, 28 Jul 2014 09:11:11 +0000"  >&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;I think there should be no reason for a failure when you remove the description node. &lt;/p&gt;

&lt;p&gt;Do you have your yang schemas available somewhere ? e.g. Draft in gerrit ?&lt;/p&gt;

&lt;p&gt;Could you give me a pointer to that so I can reproduce/debug/fix this issue ?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Maros&lt;/p&gt;</comment>
                            <comment id="48759" author="mradakov@cisco.com" created="Mon, 28 Jul 2014 13:50:15 +0000"  >&lt;p&gt;Attachment test.zip has been added with description: TestCase-JMXGenerator Error&lt;/p&gt;</comment>
                            <comment id="48753" author="mradakov@cisco.com" created="Mon, 28 Jul 2014 13:50:45 +0000"  >&lt;p&gt;Hi, &lt;br/&gt;
I don&apos;t have yang schemes in Gerrit, I can&apos;t provide them right now so I prepared a simple test case (enclosed attachment) where mentioned lines are commented (&quot;sys-entity-conf.yang&quot;) and the ERROR is generated:&lt;/p&gt;

&lt;p&gt;container sys-entity-config {&lt;br/&gt;
   uses sysent:sys-entity-fields; &lt;/p&gt;

&lt;p&gt;   //leaf description-config &lt;/p&gt;
{
        //type string;
   //}
&lt;p&gt;	&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;If uncommented, build &quot;mvn clean install&quot; is OK.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
M&lt;/p&gt;</comment>
                            <comment id="48754" author="mmarsale@cisco.com" created="Tue, 29 Jul 2014 08:04:45 +0000"  >&lt;p&gt;Thank you for the test input.&lt;/p&gt;

&lt;p&gt;I have fixed the problem here &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9423/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9423/&lt;/a&gt;. Setting to waiting-for-review.&lt;/p&gt;

&lt;p&gt;There was a problem with the code generator for config subsystem. When using a container with one uses in yang, the generator assumed a dependency. Added a better check for dependency containers.&lt;/p&gt;

&lt;p&gt;Maros&lt;/p&gt;</comment>
                            <comment id="48755" author="mradakov@cisco.com" created="Tue, 29 Jul 2014 12:59:51 +0000"  >&lt;p&gt;Thanx for the fixing.&lt;/p&gt;

&lt;p&gt;Now I have an additional problem related to Yang parser. The same test case holds but in the &quot;sys-entity&quot; yang model I&apos;m using &quot;sys-entity-fields&quot; only with the choice statement: &lt;/p&gt;

&lt;p&gt;grouping sys-entity-fields  {&lt;br/&gt;
  choice version {&lt;br/&gt;
    case v1 {&lt;br/&gt;
      leaf value &lt;/p&gt;
{
        type string;
      }		&lt;br/&gt;
    }&lt;br/&gt;
    case v2 {&lt;br/&gt;
      leaf value {        type string;      }
&lt;p&gt;		&lt;br/&gt;
    }&lt;br/&gt;
  }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;In this case the same ERROR is generated if I reference to entity&apos;s fields from augmented configuration model, i.e.&lt;/p&gt;

&lt;p&gt;In &quot;sys-entity-conf.yang&quot; file&lt;/p&gt;

&lt;p&gt;augment &quot;/config:modules/config:module/config:configuration&quot; {&lt;br/&gt;
  case sys-entity {&lt;br/&gt;
    when &quot;/config:modules/config:module/config:type = &apos;sys-entity&apos;&quot;;&lt;/p&gt;

&lt;p&gt;    .. binding-broker, data-provider, rpc-registry ..&lt;/p&gt;

&lt;p&gt;    container sys-entity-config &lt;/p&gt;
{
      uses sysent:sys-entity-fields; 
    }
&lt;p&gt;  }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;If I remove the container from the augmentation, no ERROR is generated and build is OK, i.e. &lt;/p&gt;

&lt;p&gt;augment &quot;/config:modules/config:module/config:configuration&quot; {&lt;br/&gt;
  case sys-entity &lt;/p&gt;
{
    when &quot;/config:modules/config:module/config:type = &apos;sys-entity&apos;&quot;;

    .. binding-broker, data-provider, rpc-registry ..
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;container sys-entity-config {&lt;br/&gt;
  uses sysent:sys-entity-fields; &lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Now it seems that the ODL controller provides two different parsers or validators for the YANG language? One for not augmented and one for augmented models? I don&apos;t think this is correct from the architecture point of view.&lt;/p&gt;</comment>
                            <comment id="48756" author="mmarsale@cisco.com" created="Wed, 30 Jul 2014 09:28:04 +0000"  >&lt;p&gt;About the two parsers:&lt;/p&gt;

&lt;p&gt;Its not that ODL has 2 parsers (one for augment, one for non-augment). There is only one parser that parses the schema. However, config subsystem has its own code generator on top of schema parsed by yangtools, it only looks and validates some nodes from the schema that are tied to config subsystem. Thats why it did not fail when you put the container outside of the augmentation (It was ignored by config subsystem).&lt;/p&gt;

&lt;p&gt;What you report is a new bug, already reported:&lt;br/&gt;
&lt;a href=&quot;https://bugs.opendaylight.org/show_bug.cgi?id=1451&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugs.opendaylight.org/show_bug.cgi?id=1451&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Changing status of this back to FIXED. The new bug will be tracked in 1451.&lt;/p&gt;

&lt;p&gt;Maros&lt;/p&gt;</comment>
                            <comment id="48757" author="mmarsale@cisco.com" created="Wed, 30 Jul 2014 09:51:19 +0000"  >&lt;p&gt;And about using choices in configuration.&lt;/p&gt;

&lt;p&gt;It is not supported. Config subsystem and its generator supports only a subset of yang statements that can be used for configuration and those are:&lt;/p&gt;

&lt;p&gt;leaf, leaf-list, container, list&lt;/p&gt;

&lt;p&gt;So failing with choices under configuration augment is expected. This limitation is related to JMX usage in config subsystem. Statements other then those mentioned above are difficult to map to JMX&apos;s open types.&lt;/p&gt;

&lt;p&gt;So I suggest using only mentioned types for configuration for now.&lt;/p&gt;</comment>
                            <comment id="48758" author="mradakov@cisco.com" created="Wed, 30 Jul 2014 10:24:01 +0000"  >&lt;p&gt;Thanx for the quick response and clear clarification. I will adapt yangs according to mentioned limitations.&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
Milo&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13394" name="test.zip" size="9230" author="mradakov@cisco.com" created="Mon, 28 Jul 2014 13:50:15 +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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1410</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=1410]]></customfieldvalue>

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

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