<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:02 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-15] Provide new Parser constructor</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-15</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;What I need is an option like&lt;/p&gt;

&lt;p&gt;parseYangModels(File yangFile, File directory)&lt;/p&gt;


&lt;p&gt;Currently I need to do something like this this :&lt;/p&gt;

&lt;p&gt;  List&amp;lt;File&amp;gt; yangFiles = new ArrayList&amp;lt;File&amp;gt;();&lt;br/&gt;
  yangFiles.add(new File(&quot;IF-MIB.yang&quot;));&lt;br/&gt;
  yangFiles.add(new File(&quot;iana-if-type.yang&quot;));&lt;br/&gt;
  yangFiles.add(new File(&quot;SNMPv2-TC.yang&quot;));&lt;br/&gt;
  yangFiles.add(new File(&quot;ietf-yang-types.yang&quot;));&lt;/p&gt;

&lt;p&gt;  YangModelParser parser = new YangParserImpl();&lt;br/&gt;
  Set&amp;lt;Module&amp;gt; modules = new HashSet&amp;lt;Module&amp;gt;();&lt;br/&gt;
  modules = parser.parseYangModels(yangFiles);&lt;/p&gt;

&lt;p&gt;Of course hard-coding won&apos;t work, so otherwise I&apos;ll need to parse each Yang file and compute the import transitive closure myself.&lt;/p&gt;

&lt;p&gt;I think this would be a useful addition to the API.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22435">YANGTOOLS-15</key>
            <summary>Provide new Parser constructor</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="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chrhartl@cisco.com">Christopher Hartley</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Sep 2013 02:30:11 +0000</created>
                <updated>Sun, 10 Apr 2022 18:34:51 +0000</updated>
                            <resolved>Thu, 26 Sep 2013 22:47:01 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="42518" author="mvitez@cisco.com" created="Tue, 24 Sep 2013 12:45:12 +0000"  >&lt;p&gt;I am not sure if I fully understand your suggestion. Currently parser provides a couple of parse* methods which take List of files or streams and return collection of modules. Do you want to add method to parser for parsing single file which returns single Module object?&lt;/p&gt;</comment>
                            <comment id="42519" author="chrhartl@cisco.com" created="Wed, 25 Sep 2013 00:31:04 +0000"  >&lt;p&gt;Martin,&lt;/p&gt;

&lt;p&gt;the issue comes that if a module imports other modules (take IF-MIB.yang as an example) then I currently need to by hand look inside the yang files and determine all the imports than add them to the list before I call parseYangModels().&lt;/p&gt;

&lt;p&gt;What I need is a convenience method that I can give the main file to and a path where my Yang files are. The convenience method would determine all of the files required to parse the original file, then call parseYangModels(ArrayList&amp;lt;File&amp;gt;) with a list of all the files needed to parse the original file.&lt;/p&gt;

&lt;p&gt;So based on my original example, I could do something like this&lt;/p&gt;

&lt;p&gt;  YangModelParser parser = new YangParserImpl();&lt;br/&gt;
  Set&amp;lt;Module&amp;gt; modules = new HashSet&amp;lt;Module&amp;gt;();&lt;br/&gt;
  modules = parser.parseYangModels((&quot;IF-MIB.yang&quot;, &quot;C:\yang&quot;);&lt;/p&gt;

&lt;p&gt;modules would contain IF-MIB.yang, iana-if-type, SNMPv2-TC and ietf-yang-types&lt;/p&gt;</comment>
                            <comment id="42520" author="mvitez@cisco.com" created="Thu, 26 Sep 2013 09:12:02 +0000"  >&lt;p&gt;Implemented in version 0.5.8-SNAPSHOT.&lt;/p&gt;</comment>
                            <comment id="42521" author="chrhartl@cisco.com" created="Thu, 26 Sep 2013 22:47:01 +0000"  >&lt;p&gt;thanks for this.&lt;/p&gt;

&lt;p&gt;I looked in build 117 &lt;br/&gt;
&lt;a href=&quot;https://jenkins.opendaylight.org/yangtools/job/yangtools-merge/117/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/yangtools/job/yangtools-merge/117/&lt;/a&gt;&lt;br/&gt;
and all the changes are in yang-parser-impl, but&lt;br/&gt;
there is no jar file. It just says &quot;yang-parser-impl (didn&#8217;t run)&quot;&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>71</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=71]]></customfieldvalue>

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

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