[sysrepo-devel] How to install yang with different revision?

liuai liuai_finch at 163.com
Wed Nov 29 03:21:00 UTC 2017


Thanks. Another question, i have two devices that use same yang module, how can i use sysrepo as the datastore to store two devices's data? Is it possible?


Thanks,
Aiping


At 2017-11-28 21:19:20, "Michal Vaško" <mvasko at cesnet.cz> wrote:
>Hello,
>sysrepo supports more revisions of one module, but only one can always be implemented (installed) as per [1]! So, using sysrepoctl install only modules that you actually want to be implemented, imported modules get loaded automatically. You can see the current state of each module by executing 'sysrepoctl -l'.
>
>Regards,
>Michal
>
>[1] https://tools.ietf.org/html/rfc7950#section-5.6.5
>
>On Tuesday, November 28, 2017 13:14 CET, liuai <liuai_finch at 163.com> wrote:
>
>> Hi All,
>>
>>
>> I have a question about import yang with different revision.
>>
>>
>> root at 5fed04cb28dc:/# sysrepoctl -i -g test-system.yang
>> Installing a new module from file 'test-system.yang'...
>> Installing the YANG file to '/etc/sysrepo/yang/test-system at 2016-06-01.yang'...
>> Installing data files for module 'test-system'...
>> Notifying sysrepo about the change...
>> Install operation completed successfully.
>> root at 5fed04cb28dc:/#
>> root at 5fed04cb28dc:/# sysrepoctl -i -ig test-system1.yang
>> Installing a new module from file 'test-system1.yang'...
>> Installing the YANG file to '/etc/sysrepo/yang/test-system at 2017-08-01.yang'...
>> [ERR] Module 'test-system' is already implemented in revision '2016-06-01'.
>> Error: Unable to insert the module into the dependency graph.
>> Reverting the install operation...
>> Deleted the schema file '/etc/sysrepo/yang/test-system at 2017-08-01.yang'.
>> Install operation failed.
>> root at 5fed04cb28dc:/#
>>
>>
>> Does sysrepo support different revision for yang?
>>
>>
>> Thanks,
>> AiPing
>





 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sysrepo.org/archives/sysrepo-devel/attachments/20171129/225856c4/attachment.html>


More information about the sysrepo-devel mailing list