Versions Compared

Key

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

Table of contents:

Table of Contents


Addresses: 

Jira
serverONAP JIRA
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-287

YANG Schema Mount Mechanism Overview

The YANG schema  schema mount mechanism is described in RFC-8528.The main idea is to provide.

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

Code Block
titletest-mount.yang
collapsetrue
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



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




Implementation Approach in a Context of CPS