In order to increase interoperability  of YANG modules and related implementations, the IETF defined in RFC8407  Guidelines for Authors and Reviewers of Documents Containing YANG Data Models.

The guidelines are optional from YANG point of view, but developer experience shows that RFC8407 complaint YANG data modules decrease debug and integration test times.

Example: canonical order

If a the YANG statement "must" appears after a YANG statement "list" it may happen that the parser for a data tree first processes the "list" statement, runs into an issues, which will be later excluded by the YANG "must" statement.

Example: description

The YANG statement "description" is not needed for machines and algorithms, however it is very useful for development and debugging, avoiding that human users need to search for the right interpretation of the related YANG  statements. In addition the description text can be shown in configuration user interfaces to guide the user. 

Problem statement

Even all new developed and pubic available YANG data models are RFC8407 compliant, some existing YANG data models are not and may never be updated. 

Proposed solution

A µService could read the standard YANG data models and modify them in run-time to provide the result for further code generation. The intent is to ensure or at least to increase the interoperability of different NetConf Server and NetConf Client implementations based in different NetConf frameworks and programming languages. 

Interoperability requirements 



NetConf Client programming language
CC++GOJavaPythonTypeScript
NetConf Server programming languageCXXXXXX
C++XXXXXX
GOXXXXXX
JavaXXXXXX
PythonXXXXXX
Typescript





Runtime Yang Linter Component Diagram

LicenseApache 2.0O-RAN-SC Runtime Yang Linter Component Diagram YANG repostandard linter supportcomplementary  Runtime YANG linter  NetConf server and client code generationC, C++, GO, Java, Python, TypeScript Public available standardYANG moduleswith well-known copyrightand license statement SDO spcific and additionalinformation toenhance YANG statements. use use useThanks to plantUml!2020-03-29 | onap.org | o-ran-sc.org


LicenseApache 2.0O-RAN-SC Runtime Yang Linter Activity Diagram Itterate over each YANG data modelin YANG repo select next YANG yesisInCache? Continue with next YANG, yeshasImports? itterate over imports continue with this YANG pyang--strict yeshasError? log findings The file is not YANG.Continue with next YANG, yeswarning? log findings pyang -f yang--yang-canonical check SDO lookup contact for SDO add YANG statement contact nomodule:desciption has copyright lookup description append description whih hint'Additional Information by O-RAN-SC.' yesany:useful:description exists in supportiveDB pyang--lint yeserror? yesmust have contact check SDO lookup contact for SDO add YANG statement contact yesothers to be defined yeswarning? to be defined Continue with next YANG, yesnext? provide in-memory cache for code generation manual analysis of all findings Thanks to plantUml!2020-03-29 | onap.org | o-ran-sc.org

  • No labels