...
draw.io Diagram |
---|
border | false |
---|
diagramName | cps-yang-mount-dependencies-diagram |
---|
simpleViewer | false |
---|
links | auto |
---|
tbstyle | inline |
---|
lbox | false |
---|
diagramWidth | 631 |
---|
revision | 2 |
---|
|
...
Inline (data embedded) reference
The reference to mounted module could be embedded directly into mount point and delivered together with a data.
The mounted module reference is expected to be described as ietf-yang-library component
...
Code Block |
---|
title | data-referencing-mounted-module-inline.json |
---|
|
{
"test-mount:root-element": {
"root-mp": { // mount point
"ietf-yang-library:modules-state": { // mounted module (and dependencies) descriptor
"module-set-id": "some-id",
"module": [{
"name": "mounted-module",
"revision": "2020-02-02",
"namespace": "urn:org:onap:cps:test:mounted-module",
"conformance-type": "import"
}
// other modules
]
},
"mounted-module:mounted-container": { // actual mounted module data
// data associated to mounted module
}
}
}
} |
Reference by xpath
If the parent (extendable) module already contains references to mountable modules (i.e. other module imports)
then the required module(s) can be mounted via xpath reference.
Code Block |
---|
theme | Midnight |
---|
title | test-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;
}
import mounted-module {
prefix mntm;
}
container root-element {
yangmnt:mount-point "root-mp";
}
} |
The schema-mount
Code Block |
---|
|
{
"ietf-yang-schema-mount:schema-mounts": {
"namespace": [{
"prefix": "mntm",
"uri": "urn:org:onap:cps:test:mounted-module"
}],
"mount-point": [{
"module": "test-mount",
"label": "root-mp",
"shared-schema": {
"parent-reference": ["/mntm:mounted-container"]
}
}]
}
} |
Implementation Approach in a Context of CPS
...