<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:52:35 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-256] Loading YANG files from local directory when netconf server does not support netconf monitoring</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-256</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I have a netconf server that does not advertise any YANG files. As a result of which NetConfDevice.getInitialCapabilities() sets cachedCapabilities as [] since none of the capability has module, revision and &quot;?&quot; &amp;amp; hence FilesystemSchemaCachingProvider never loads any files from cache/schema.&lt;/p&gt;

&lt;p&gt;IMHO it is critical since for any netconf device that doesn&apos;t support ietf monitoring, neconf southbound plugin would not be able to read the YANG model and therefore device information can not be accessed using RESTCONF.&lt;/p&gt;

&lt;p&gt;Note: As a workaround, I have hard coded the server capabilities in odl&apos;s code to advertise the YANG files I have written to represent my device. I have put these YANG files in below location:&lt;br/&gt;
\\odl-controller\opendaylight\distribution\opendaylight\target\distribution.opendaylight-osgipackage\opendaylight\cache\schema&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="24810">CONTROLLER-256</key>
            <summary>Loading YANG files from local directory when netconf server does not support netconf monitoring</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="mmarsale@cisco.com">Maros Marsalek</assignee>
                                    <reporter username="kagupta@ciena.com">Kanika Gupta</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Apr 2014 05:47:21 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:20 +0000</updated>
                            <resolved>Mon, 3 Nov 2014 11:03:46 +0000</resolved>
                                                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="47855" author="tony.tkacik@gmail.com" created="Wed, 2 Apr 2014 07:26:00 +0000"  >&lt;p&gt;Changed to enhancement, since this is new feature.&lt;/p&gt;</comment>
                            <comment id="47856" author="kagupta@ciena.com" created="Wed, 2 Apr 2014 07:32:08 +0000"  >&lt;p&gt;Thanks Tony for having a look at it.&lt;/p&gt;

&lt;p&gt;Would it be right to load the yang files from local directory or should the yang files be written in a separate osgi bundle.&lt;/p&gt;

&lt;p&gt;Also, if we put the yang files in local directory, there will be no java source code generated - so in that case how to manipulate the device data?&lt;/p&gt;

&lt;p&gt;-Kanika&lt;/p&gt;</comment>
                            <comment id="47857" author="kagupta@ciena.com" created="Mon, 7 Apr 2014 05:18:43 +0000"  >&lt;p&gt;Hi Tony,&lt;/p&gt;

&lt;p&gt;Is it possible to reference the yang files from OSGI bundle when netconf server doesn&apos;t support ietf monitoring.&lt;/p&gt;

&lt;p&gt;Because now i have to keep two copies of yang files:&lt;/p&gt;

&lt;p&gt;1) OSGI bundle&lt;br/&gt;
2) In /cache/schema for restconf&lt;/p&gt;

&lt;p&gt;-Kanika&lt;/p&gt;</comment>
                            <comment id="47858" author="kagupta@ciena.com" created="Tue, 24 Jun 2014 04:59:53 +0000"  >&lt;p&gt;. I have a netconf server which does not support netconf monitoring and therefore no yang files are loaded from the device. So I wrote my own yang file that represent the device and below is what I hard coded.&lt;/p&gt;

&lt;p&gt;With recent refactoring done in this area, you might not find NetconfDevice.xtend, please look for NetconfDevice.java. &lt;/p&gt;

&lt;p&gt;1.	Placed 03-neconf-devices.xml in initial directory, updated netconf server ip, port, password, name. Started the controller and was able to see the netconf servers in opendaylight inventory (&lt;a href=&quot;http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/&lt;/a&gt;)&lt;br/&gt;
2.	Wrote yang file to represent netconf server (based on get-config information received from the node using netconf rpc) and placed it in /cache/schema. But netconf plugin was not reading this yang file and I filed the bug-628 for it. However, to proceed I hardcoded server capabilities in NetconfDevice.xtend as below:&lt;br/&gt;
o	a) Declare following variables in NetconfDevice.xtend&lt;br/&gt;
Set&amp;lt;String&amp;gt; newServerCapabilities    &lt;br/&gt;
Collection&amp;lt;String&amp;gt; newCapabilities&lt;br/&gt;
o	Add following code in NetconfDevice.xtend&lt;br/&gt;
private def getNewServerCapabilities() &lt;/p&gt;
{
                newCapabilities = new java.util.ArrayList&amp;lt;String&amp;gt; (java.util.Arrays.asList(&quot;urn:ietf:params:netconf:base:1.0&quot;,
                &quot;urn:ietf:params:netconf:capability:candidate:1.0&quot;,
                &quot;urn:ietf:params:netconf:capability:confirmed-commit:1.0&quot;,
                &quot;urn:ietf:params:netconf:capability:validate:1.0&quot;,
                &quot;urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file&quot;,
                &quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;,
                &quot;urn:ietf:params:xml:ns:netconf:capability:candidate:1.0&quot;,
                &quot;urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0&quot;,
                &quot;urn:ietf:params:xml:ns:netconf:capability:validate:1.0&quot;,
                &quot;urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file&quot;,          
                      &quot;http://xml.server.net/xnm/1.1/xnm?module=my-config&amp;amp;revision=2013-08-19&quot;));//This is the yang file I wrote = my-config.yang
                 newServerCapabilities = Sets.newHashSet(newCapabilities);
    }
&lt;p&gt;o	Update getInitialCapabilities() method as below&lt;br/&gt;
             def getInitialCapabilities() {&lt;br/&gt;
             //val capabilities = client?.capabilities; //Notice this commented line&lt;br/&gt;
                   val capabilities = getNewServerCapabilities();&lt;br/&gt;
o	From command prompt go to the location \\odl-controller\opendaylight\md-sal\sal-netconf-connector and &quot;run mvn clean install&quot;&lt;br/&gt;
o	Copy sal-netconf-connector-1.1-SNAPSHOT.jar from .m2 repository to odl&apos;s plugin folder.&lt;br/&gt;
o	Accessed device information using postman with below URL:&lt;br/&gt;
&lt;a href=&quot;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/node_0001/yang-ext:mount/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/node_0001/yang-ext:mount/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="47859" author="ankit21.a@tcs.com" created="Thu, 17 Jul 2014 11:06:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9107/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9107/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9107/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9107/&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;I have fixed the code to read the schema file from ODL local.&lt;/p&gt;</comment>
                            <comment id="47860" author="ankit21.a@tcs.com" created="Fri, 18 Jul 2014 08:50:07 +0000"  >&lt;p&gt;Hi I have fixed the ODL code and below mentioned gerrit code can be used for fixing the issue:&lt;/p&gt;

&lt;p&gt;changes in MD-SAL: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9135&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9135&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;changes in yangtools: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9112/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9112/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="47861" author="mmarsale@cisco.com" created="Fri, 18 Jul 2014 09:12:10 +0000"  >&lt;p&gt;(In reply to Ankit agarwal from comment #6)&lt;/p&gt;

&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;Your commits do not solve the problem reported here. This problem says that if you put yang files into local folder for a device that does not report its modules, there is no way for netconf-connector to load them. There needs to be a mechanism to tell netconf-connector about schemas in /cache/schema folder.&lt;/p&gt;

&lt;p&gt;You are possibly solving a problem with device reporting yang modules but without revision. Is that correct ? If so, please report a new bug and put your commits there.&lt;/p&gt;

&lt;p&gt;Maros&lt;/p&gt;</comment>
                            <comment id="47862" author="ankit21.a@tcs.com" created="Mon, 21 Jul 2014 07:25:53 +0000"  >&lt;p&gt;Raised a new Bug - 1393 as suggested&lt;/p&gt;</comment>
                            <comment id="47863" author="mmarsale@cisco.com" created="Thu, 31 Jul 2014 15:11:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9490/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9490/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="47864" author="rahulswaminathan08@gmail.com" created="Mon, 3 Nov 2014 11:03:46 +0000"  >&lt;p&gt;Hi Maros/Kanika,&lt;/p&gt;

&lt;p&gt;I checked the above commit message &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/9490/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/9490/&lt;/a&gt; and it says &quot;User can place yang files into cache/schema folder and set the capabilities for these modules into config attribute for netconf-connector.&quot;&lt;/p&gt;

&lt;p&gt;I&apos;m using the ODL&apos;s Service Provider Ubuntu VM in my testing. I&apos;ve added my YANG file in controller-sp/opendaylight/cache/schema. But, I&apos;m unable find the file where I&apos;ve to add the capabilities.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Rahul Swaminathan&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>628</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=628]]></customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

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

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