Hi folks, I open source a good tool called yang-compiler on https://github.com/yang-central/yang-compiler The brief introduction is listed below:
Yang compiler is a tool based on YangKit<https://github.com/yang-central/yangkit>, it's designed to solve the problem of YANG files compilation dependencies. For example, after a YANG module is written, if you want to validate it, you will find you have to search all other YANG files that the module depends on. It's very difficult because dependencies are chained, and the chain of dependencies for a YANG module may be very long. In addition, where these dependent YANG files are archived and how to obtain these YANG files are also difficult problems. This brings great inconvenience to users and affects their enthusiasm for using YANG. Yang compiler provide a mechanism to get the dependencies automatically.Firstly, it will search the dependencies from the directory to be complied, if not found, it will search these YANG files from local repository(it's defined in settings.json or default directory), and if it's not found also, it will search the dependencies from module information defined in settings.json(if available), and according to the information to download the YANG files. if it's still not found, it will search the dependencies for remote repository(defined in settings.json or yangcatalog<https://yangcatalog.org/api/> default). If the dependencies are downloaded, it will be saved to local repository. Using Yang compiler, you can compile any YANG file regardless where it's dependencies are. Specification * search and download dependencies automatically. * allow user to customize settings for compilation. * customize local repository,{user.home}/.yang is default. * customize remote repository, yangcatalog<https://yangcatalog.org/api/> is default. * define module information directly if some modules are not in yangcatalog<https://yangcatalog.org/api/>. * allow user to install yang files which are compiled OK. Please try it, and if you have any suggestion, please let me know,:) 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
