[sysrepo-devel] loading two different yang file versions into sysrepo

Jakub Nadolski JNadolski at advaoptical.com
Tue Aug 22 13:19:01 UTC 2017


Hi Michal,


This is standard one, from MEF - https://www.mef.net/Assets/Technical_Specifications/PDF/MEF_39.pdf


Thanks,

Jakub

________________________________
From: Michal Vaško <mvasko at cesnet.cz>
Sent: Tuesday, August 22, 2017 3:14:52 PM
To: Jakub Nadolski
Cc: sysrepo-devel at sysrepo.org
Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo

Hello Jakub,
could you please provide the module in question for us? If you do not want to publish it publicly, it would be great if you could send it to my private email at least. We want to examine the problem carefully and then decide whether to fix this error or really consider the value invalid.

Regards,
Michal

On Tuesday, August 22, 2017 14:59 CEST, Jakub Nadolski <JNadolski at advaoptical.com> wrote:

> Hi Michal,
>
>
> 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:
>
>
> Installing a new module from file 'mef-soam-pm.yang'...
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Invalid value " " in "fake-default" element.
> [ERR] (srctl_ly_log_cb:500) libyang: Module "mef-soam-pm" parsing failed.
> Error: Unable to load the module by libyang.
> Install operation failed.
>
> The invalid value " " is used as default value for some leafs with bits type. Is this could be libyang issue?
>
>
> Thanks,
>
> Jakub
>
>
> ________________________________
> From: Michal Vaško <mvasko at cesnet.cz>
> Sent: Tuesday, August 22, 2017 2:30:38 PM
> To: Jakub Nadolski
> Cc: sysrepo-devel at sysrepo.org
> Subject: Re: [sysrepo-devel] loading two different yang file versions into sysrepo
>
> Hi Jakub,
> 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.
>
> Regards,
> Michal
>
> On Tuesday, August 22, 2017 13:59 CEST, Jakub Nadolski <JNadolski at advaoptical.com> wrote:
>
> > Hi All,
> >
> >
> > I am using standard yang module mef-cfm.yang which depends on the ietf-inet-types at 2010-09-24.yang. But for other modules in my system, I need ietf-inet-types at 2013-07-15.yang. When trying to load both modules to sysrepo and I got an error:
> >
> >
> > sysrepoctl -i --yang=ietf-inet-types at 2010-09-24.yang
> > Installing a new module from file 'ietf-inet-types at 2010-09-24.yang'...
> > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2010-09-24.yang'...
> > Skipping installation of data files for module 'ietf-inet-types'...
> > Notifying sysrepo about the change...
> > Install operation completed successfully.
> >
> > sysrepoctl -i --yang=ietf-inet-types at 2013-07-15.yang
> > Installing a new module from file 'ietf-inet-types at 2013-07-15.yang'...
> > Installing the YANG file to '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'...
> > [ERR] (md_insert_lys_module:1905) Module 'ietf-inet-types' is already implemented in revision '2010-09-24'.
> > Error: Unable to insert the module into the dependency graph.
> > Reverting the install operation...
> > Deleted the schema file '/_path_/sysrepo/build/repository/yang/ietf-inet-types at 2013-07-15.yang'.
> > Install operation failed.
> >
> > 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?
> >
> > Thanks in advance,
> > Jakub
> >
> >
>
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sysrepo.org/archives/sysrepo-devel/attachments/20170822/53be7294/attachment.html>


More information about the sysrepo-devel mailing list