Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC7895 yang module library implementation #15

Merged
merged 5 commits into from
Jul 30, 2020

Conversation

sachinholla
Copy link
Contributor

Added new yang ietf-yang-library.yang, which defines data models for
RFC7895 yang library discovery feature.

New app module yanglib_app.go to handle ietf-yang-library.yang APIs.
REST and gNMI requests for '/ietf-yang-library:modules-state' and its
child paths will be serviced by this app module.

Parses all NB yangs using goyang parser and builds the module info data
tree as per ietf-yang-library.yang. Yangs are parsed upon first request
and cached thereafter.

Uses translib.GetModel() API to identify the yang modules that are
implemented by apps. Other modules are marked as 'import' in yang
library response data. Transformer annotation files (*_annot.yang) are
ignored -- they do not define any data model.

Uses hardcoded module-set-id value for now. Should be changed to use
"yang bundle version" number when yang versioning feature is in.

Yang schema URL is included in the response only if main program set the
root URL through translib.SetSchemaRootURL() API. Schema URL is prepared
by appending the yang file name to the root URL.

Added new yang ietf-yang-library.yang, which defines data models for
RFC7895 yang library discovery feature.

New app module yanglib_app.go to handle ietf-yang-library.yang APIs.
REST and gNMI requests for '/ietf-yang-library:modules-state' and its
child paths will be serviced by this app module. Only GET is supported.

Parses all NB yangs using goyang parser and builds the module info data
tree as per ietf-yang-library.yang. Yangs are parsed upon first request
and cached thereafter.

Uses translib.GetModel() API to identify the yang modules that are
implemented by apps. Other modules are marked as 'import' in yang
library response data. Transformer annotation files (*_annot.yang) are
ignored -- they do not define any data model.

Uses hardcoded module-set-id value for now. Should be changed to use
"yang bundle version" number when yang versioning feature is in.

Yang schema URL is included in the response only if main program set the
root URL through translib.SetSchemaRootURL() API. Schema URL is prepared
by appending the yang file name to the root URL.

"yang-library-change" notification is not supported.
@renukamanavalan renukamanavalan merged commit 1d730df into sonic-net:master Jul 30, 2020
@sachinholla sachinholla deleted the yanglib branch October 1, 2020 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants