<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:09 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-734] yang-system-test: -p directories are for dependency search</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-734</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;This request is not very compatible with &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-726&quot; title=&quot;yang-system-test could support recursive search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-726&quot;&gt;&lt;del&gt;YANGTOOLS-726&lt;/del&gt;&lt;/a&gt; so that would need to use option different from -p.&lt;/p&gt;

&lt;p&gt;Examining existing Yang validators, it turns out their focus is not on validating a whole set of Yang models, but on validating a single Yang file instead.&lt;br/&gt;
This single file is given as an argument (not -p option).&lt;/p&gt;

&lt;p&gt;Of course most Yang modules are including other modules, so to ascertain validity those other modules should also be available. Thus a Yang validator needs to be able to search for dependencies, and -p directories are the locations the validator should search for the needed files in (defaulting to current working directory if no -p is given).&lt;/p&gt;

&lt;p&gt;In order for yang-system-test to be used as a Yang validator in existing validation frameworks, it should honor the same semantics.&lt;/p&gt;

&lt;p&gt;As a evidence, here &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; is description of -p in yanglint, and here &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; is how yangvalidator.com invokes pyang to validate a particular Yang file.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://github.com/CESNET/libyang/blob/master/tools/lint/main_ni.c#L50&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/CESNET/libyang/blob/master/tools/lint/main_ni.c#L50&lt;/a&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://github.com/cmoberg/bottle-yang-extractor-validator/blob/master/bottle-yang-extractor-validator/main.py#L93&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/cmoberg/bottle-yang-extractor-validator/blob/master/bottle-yang-extractor-validator/main.py#L93&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S.: For purpose of validation of single files, perhaps odl-yang-validator would be a better name than yang-system-test.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23154">YANGTOOLS-734</key>
            <summary>yang-system-test: -p directories are for dependency search</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="pkajsa">Peter Kajsa</assignee>
                                    <reporter username="vrpolak">Vratko Polak</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Jan 2017 17:10:47 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:57 +0000</updated>
                            <resolved>Thu, 23 Feb 2017 08:53:46 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="44308" author="vrpolak" created="Wed, 11 Jan 2017 12:09:18 +0000"  >&lt;p&gt;As an example let us have these files present:&lt;br/&gt;
    ./to-test.yang&lt;br/&gt;
    ./deps/standard.yang&lt;br/&gt;
    ./deps/broken.yang&lt;/p&gt;

&lt;p&gt;Where module to-test imports module standard, but not module broken. Assume that bronken.yang is broken and would cause a failure. Assume to-test.yang is correct and would pass.&lt;/p&gt;

&lt;p&gt;Currently this call:&lt;br/&gt;
    $ java -jar yangsystemtestlongname.jar -p deps to-test.yang&lt;br/&gt;
would attempt to add also ./deps/broken.yang and thus fail.&lt;/p&gt;

&lt;p&gt;After fixing this. the same call would only add ./to-test.yang (because it is an explicit filename) and ./deps/standard.yang (discovered dependency), but not ./deps/broken.yang&lt;/p&gt;

&lt;p&gt;In comparison, this call:&lt;br/&gt;
    $ java -jar yangsystemtestlongname.jar to-test.yang&lt;br/&gt;
would fail, because the required import was not satisfied.&lt;/p&gt;

&lt;p&gt;After copying ./deps/standard.yang to ./standard.yang the repeated call would again pass, as ./ is implicitly always present in the list of directories where dependencies are searched for.&lt;/p&gt;</comment>
                            <comment id="44309" author="vrpolak" created="Wed, 11 Jan 2017 12:11:24 +0000"  >&lt;p&gt;Aside of performance implications, this is also important for this case:&lt;br/&gt;
    ./to-test-no-imports.yang&lt;br/&gt;
    ./broken.yang&lt;/p&gt;</comment>
                            <comment id="44310" author="vzelcamo@cisco.com" created="Mon, 23 Jan 2017 15:10:47 +0000"  >&lt;p&gt;due higher priorities for API freeze, moving for M5 Carbon.&lt;/p&gt;</comment>
                            <comment id="44311" author="vrpolak" created="Mon, 23 Jan 2017 15:25:09 +0000"  >&lt;p&gt;Most implementations of single module validators first scan all file names in -p directories to build a &quot;library&quot; of files, and when building a &quot;schema context&quot; they search and add files from that library only when needed to satisfy an import. Yangtools currently does not support such &quot;library&quot; behavior, so the fix is not trivial.&lt;/p&gt;</comment>
                            <comment id="44312" author="pkajsa" created="Mon, 30 Jan 2017 18:38:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/51018/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/51018/&lt;/a&gt;&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>7480</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=7480]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10318"><![CDATA[Change Request]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10348"><![CDATA[Carbon-M5]]></customfieldvalue>

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

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