Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

Addresses  CPS-43 - Getting issue details... STATUS


Cases

Augmentation

The augmentation is mainly used to extends an existing model. The augmentation is encapsulated within separate
module file, having own namespace and revision.

base.yang

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;
        }
    }
}
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;
    }
}
{
  "base-container": {
    "name": "testName",
    "description": "test description",
    "augmented-leaf": "more information"
  }
}

Imports

Submodules

Module vs Yang File

  • No labels