You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 5
Next »
Table of contents:
Addresses:
CPS-287
-
Getting issue details...
STATUS
YANG Schema Mount Mechanism Overview
The YANG schema mount mechanism is described in RFC-8528.
In opposite to standard YANG's "use
" and "augment
" the schema mount mechanism allows the model modification at runtime.
While parent (extendable) module require to define the mount point(s) any already defined (legacy) module (including standard)
can be used as a mounted model.
The ietf-yang-schema-mount module defined in RFC-8528 defines structures for following entities:
- mount-point - for mount point(s) definition within parent (extendable) module
- schema-mounts - describes the model for actual assignment of mounted models to mount points
mount-point
Mount point is uniquely identified by its name (label) and the only requirements are
- allocation only within a YANG module of version 1.1+
- allocation only within a "
container
" or a "list
" definition
Below is example of simple mount-point definition
module test-mount {
yang-version 1.1;
namespace "org:onap:cps:test-mount";
prefix tmount;
revision "2020-02-02";
import ietf-yang-schema-mount {
prefix yangmnt;
}
container test-mount-root {
yangmnt:mount-point "root";
}
}
schema-mount
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlJ1c2xhbiBLYXNoYXBvdiIsIm91dHB1dFR5cGUiOiJibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJSdXNsYW4gS2FzaGFwb3YiLCJsYW5ndWFnZSI6ImVuIiwiZGlhZ3JhbURpc3BsYXlOYW1lIjoiIiwic0ZpbGVJZCI6IiIsImF0dElkIjoiMTAwODkyOTAzIiwiZGlhZ3JhbU5hbWUiOiJjcHMteWFuZy1tb3VudC1kZXBlbmRlbmNpZXMtZGlhZ3JhbSIsImFzcGVjdCI6IiIsImxpbmtzIjoiYXV0byIsImNlb05hbWUiOiJDUFMtMjg3IFNwaWtlOiBZYW5nIFNjaGVtYSBNb3VudCBTdXBwb3J0IiwidGJzdHlsZSI6ImlubGluZSIsImNhbkNvbW1lbnQiOmZhbHNlLCJkaWFncmFtVXJsIjoiIiwiY3N2RmlsZVVybCI6IiIsImJvcmRlciI6ZmFsc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