<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Michal,</p>
<p><br>
</p>
<p>Thanks for the quick answer. I tried --search-dir option and I was able to load mef-cfm.yang. The next problem I see is with loading mef-soam-fm.yang:</p>
<p><br>
</p>
<p></p>
<div>Installing a new module from file 'mef-soam-pm.yang'...</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.</div>
<div>[ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed.</div>
<div>Error: Unable to load the module by libyang.</div>
<div>Install operation failed.</div>
<div><br>
</div>
The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue?
<p></p>
<p><br>
</p>
<p>Thanks,</p>
<p>Jakub</p>
<p></p>
<div>
<div></div>
<br>
</div>
<p></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Michal Vaško <mvasko@cesnet.cz><br>
<b>Sent:</b> Tuesday, August 22, 2017 2:30:38 PM<br>
<b>To:</b> Jakub Nadolski<br>
<b>Cc:</b> sysrepo-devel@sysrepo.org<br>
<b>Subject:</b> Re: [sysrepo-devel] loading two different yang file versions into sysrepo</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Jakub,<br>
do not install imported modules directly (unless you want to also implement that module or you want to use an identity from that module). If you install mef-cfm.yang or another module that imports some other modules, they are loaded only as imports (as long
 as they are found in searchpaths), which can have duplicate names (but must have different revisions). Try executing "sysrepoctl -l", it will show you the current status of conformance for each module loaded into sysrepo.<br>
<br>
Regards,<br>
Michal<br>
<br>
On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski <JNadolski@advaoptical.com> wrote:
<br>
 <br>
> Hi All,<br>
> <br>
> <br>
> I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types@2010-09-24.yang. But for other modules in my system, I need ietf-inet-types@2013-07-15.yang. When trying to load both modules to sysrepo and I got an error:<br>
> <br>
> <br>
> sysrepoctl -i --yang=ietf-inet-types@2010-09-24.yang<br>
> Installing a new module from file 'ietf-inet-types@2010-09-24.yang'...<br>
> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types@2010-09-24.yang'...<br>
> Skipping installation of data files for module 'ietf-inet-types'...<br>
> Notifying sysrepo about the change...<br>
> Install operation completed successfully.<br>
> <br>
> sysrepoctl -i --yang=ietf-inet-types@2013-07-15.yang<br>
> Installing a new module from file 'ietf-inet-types@2013-07-15.yang'...<br>
> Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types@2013-07-15.yang'...<br>
> [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'.<br>
> Error: Unable to insert the module into the dependency graph.<br>
> Reverting the install operation...<br>
> Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types@2013-07-15.yang'.<br>
> Install operation failed.<br>
> <br>
> Currently, I know that Netconf client, MG Soft Browser, supports loading two versions of the same yang. Do you know if there's a way to solve this problem?<br>
> <br>
> Thanks in advance,<br>
> Jakub<br>
> <br>
> <br>
 <br>
 <br>
<br>
</div>
</span></font>
</body>
</html>