[sysrepo-devel] ?==?utf-8?q? loading two different yang file versions into sysrepo

Michal Vaško mvasko at cesnet.cz
Tue Aug 22 12:30:38 UTC 2017

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.


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

More information about the sysrepo-devel mailing list