Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

draw.io Diagram
borderfalse
diagramNamecps-schema-mount-simplified-diagram
simpleViewerfalse
width
linksauto
tbstyleinline
diagramDisplayName
lboxfalse
diagramWidth481
revision3

The ietf-yang-schema-mount module defined in RFC-8528 defines structures for following entities:

...

Below is example of simple mount-point definition within a YANG module

Code Block
themeMidnight
titletest-mount.yang
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 root-element {
        yangmnt:mount-point "root-mp";
	}
}

...

Code Block
titleyang-library-exaample.json
{ 
  "ietf-yang-library:yang-library": {
     "content-id": "14e2ab5dc325f6d86f743e8d3ade233f1a61a899some-id",
     "module-set": [
        {
          "name": "module-set",
          "module": [
              {
                "name": "mounted-module",
                "revision": "2020-02-02",
                "namespace": "urn:org:onap:cps:test:mounted-module"
              }
              // other modules 
           ]
         }
      ]
   }
}

So the data on model dependencies will be as shown on diagram

draw.io Diagram
borderfalse
diagramNamecps-yang-mount-dependencies-diagram
simpleViewerfalse
width
linksauto
tbstyleinline
diagramDisplayName
lboxfalse
diagramWidth631
revision2

...