Package: ncs-yang
ncs-yangncs-yangis a simple tool to compile specific yang file/s usingncscand to create uml diagrams from it.IntroductionPre-requisitesInstallation and DownloadsHelpFeaturesFAQBug Tracking and SupportLicense and CopyrightAuthor and ThanksIntroductionWe haven't found a simple way to compile single yang file or to create uml diagrams from it. We usuall runmakeormake allto compile the yang files. For uml diagrams we have to copy all the yang files from ncs and the project to an directory and generate uml diagram usingpyang -f umlcommand.Being a developer we wanted to trigger/generate with simple commands or single line commands. Which leaded to create this library.Pre-requisitesncsc, pyang commands must be reconginsed by the terminal.ncs-yang supports both trains ofpython2.7+ and 3.1+, the OS should not matter.Installation and DownloadsThe best way to get ncs-yang is with setuptools or pip. If you already have setuptools, you can install as usual:python -m pip install ncs-yangpip install ncs-yangOtherwise download it from PyPi, extract it and run thesetup.pyscriptpython setup.py installIf you're Interested in the source, you can always pull from the github repo:From githubgit clone https://github.com/kirankotari/ncs-yang.gitHelp⋊>~/k/i/ncs-yangonmaster$ncs-yang--help

ncs-yang<YangFileorYangFiles>[--uml|--jtox|--dsdl]--schema<yang>[--json|--xml|--yml]--yang-sync<settings.yml>tocollectyangfilesfromremotemachine--payload<payload.json><YangFileorYangFiles>willreturnpayload.xml--payload<payload.xml><YangFileorYangFiles>willreturnpayload.json--payload<payload.yml>willreturnpayload.json<YangFileorYangFiles>willreturnpayload.xml--log[info|debug]--path<dependencyyangpath>-h|--help-v|--versionFeaturesCompiling specific yang filesrunning single yang file⋊>~/k/i/cfs-packageonsprint$ncs-yangsrc/yang/cfs-mpls.yang[INFO]::[ncs-yang]::compilingyangfile:src/yang/cfs-mpls.yang/opt/ncs/ncs-5.2.1.2/bin/ncsc`lscfs-mpls-ann.yang>/dev/null2>&1&&echo"-a cfs-mpls-ann.yang"`--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../common/src/yang--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../resource-manager/src/yang-c-o/opt/ncs/ncs-run/packages/cfs-package/load-dir/cfs-mpls.fxssrc/yang/cfs-mpls.yangrunning multiple yang files⋊>~/k/i/cfs-package/src/yangonsprint$ncs-yangcfs-mpls.yangcfs-asa.yang[INFO]::[ncs-yang]::compilingyangfile:cfs-mpls.yang/opt/ncs/ncs-5.2.1.2/bin/ncsc`lscfs-mpls-ann.yang>/dev/null2>&1&&echo"-a cfs-mpls-ann.yang"`--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../common/src/yang--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../resource-manager/src/yang-c-o/opt/ncs/ncs-run/packages/cfs-package/load-dir/cfs-mpls.fxscfs-mpls.yang[INFO]::[ncs-yang]::compilingyangfile:cfs-asa.yang/opt/ncs/ncs-5.2.1.2/bin/ncsc`lscfs-asa-ann.yang>/dev/null2>&1&&echo"-a cfs-asa-ann.yang"`--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../common/src/yang--yangpath/opt/ncs/ncs-run/packages/cfs-package/src/../../resource-manager/src/yang-c-o/opt/ncs/ncs-run/packages/cfs-package/load-dir/cfs-asa.fxscfs-asa.yangCreating uml diagrams from yang files⋊>~/k/i/c/s/yangonsprint$ncs-yangcfs-mpls.yang--uml[INFO]::[ncs-yang]::generatedumldiagram:cfs-mpls.umlFAQQuestion:I am seeing an error?Answer:Error might be related to yang file, we recommend to check again beforing opening a bug.Change LogNew in 1.2.4Feature Adding yang-syncFeature Adding payload convertionFeature Adding schema generatorNew in 1.2.3Fix: Import issues, logger correctionsNew in 1.2Feature: Adding UML Diagrams supportFeature: Adding Jtox supportFeature: Adding DSDL supportBug Tracking and SupportPlease report any suggestions, bug reports, or annoyances with ncs-yang through theGithub bug tracker.License and Copyrightncs-yang is licensedApache 2.02019-2020Author and Thanksncs-yang was developed byKiran Kumar Kotari, For any suggestions or comments contactkkotari@cisco.comorkirankotari@live.com. If you find any bugs please fix them and send me a pull request.