...
The augmentation is mainly used to extends an existing model. The augmentation is encapsulated within separate
module file, having own namespace and revision.
Code Block |
---|
theme | Emacs |
---|
title | base.yang |
---|
|
|
code | module base {
yang-version 1.1;
namespace "org:onap:cps:test:base";
revision "2020-01-01";
prefix "base";
container base-container {
leaf name {
type string;
}
leaf description {
type string;
}
}
} |
|
Code Block |
---|
theme | Emacs |
---|
title | augment.yang |
---|
| module augment {
yang-version 1.1;
namespace "org:onap:cps:test:augment";
revision "2020-01-02";
prefix "augment";
import base {
prefix "base";
}
grouping augment-group {
leaf augmented-leaf {
type string;
}
}
augment "base:base-container" {
uses augment-group;
}
} |
|
Code Block |
---|
| {
"base-container": {
"name": " |
|
testNametest name",
"description": "test description",
"augmented-leaf": "more information"
}
} |
|
Imports
Submodules
Module vs Yang File