summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/keatest-module@2022-11-30.yang
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/yang/modules/keatest-module@2022-11-30.yang')
-rw-r--r--src/share/yang/modules/keatest-module@2022-11-30.yang251
1 files changed, 251 insertions, 0 deletions
diff --git a/src/share/yang/modules/keatest-module@2022-11-30.yang b/src/share/yang/modules/keatest-module@2022-11-30.yang
new file mode 100644
index 0000000..8042b26
--- /dev/null
+++ b/src/share/yang/modules/keatest-module@2022-11-30.yang
@@ -0,0 +1,251 @@
+module keatest-module {
+ yang-version 1.1;
+ namespace "urn:ietf:params:xml:ns:yang:keatest-module";
+ prefix tm;
+
+ organization "Sysrepo and ISC";
+ description
+ "ISC imported a test module from Sysrepo tests and adapted it
+ to kea testing regime.";
+ contact
+ "kea-dev@lists.isc.org";
+
+ revision 2022-11-30 {
+ description
+ "Added leafrefs and empty leaf.";
+ }
+
+ revision 2018-11-20 {
+ description "Initial revision";
+ reference "";
+ }
+
+ container container {
+ config true;
+ list list {
+ leaf leaf {
+ type string;
+ }
+ leaf key1 {
+ type string;
+ }
+ leaf key2 {
+ type string;
+ }
+ key "key1 key2";
+ }
+ }
+
+ container main {
+ leaf enum {
+ type enumeration {
+ enum "yes" {
+ value 1;
+ }
+ enum "no" {
+ value 2;
+ }
+ enum "maybe" {
+ value 3;
+ }
+ }
+ }
+ leaf options {
+ type bits {
+ bit strict;
+ bit recursive;
+ bit logging;
+ }
+ }
+ leaf raw {
+ type binary;
+ }
+ leaf dec64 {
+ type decimal64{
+ fraction-digits 2;
+ }
+ }
+ leaf i8 {
+ type int8;
+ }
+ leaf i16 {
+ type int16;
+ }
+ leaf i32 {
+ type int32;
+ }
+ leaf i64 {
+ type int64;
+ }
+ leaf ui8 {
+ type uint8;
+ }
+ leaf ui16 {
+ type uint16;
+ }
+ leaf ui32 {
+ type uint32;
+ }
+ leaf ui64 {
+ type uint64;
+ }
+ leaf empty {
+ type empty;
+ }
+ leaf boolean {
+ type boolean;
+ }
+ leaf string {
+ type string;
+ }
+ leaf id_ref {
+ type identityref {
+ base base_id;
+ }
+ }
+ leaf-list numbers {
+ type uint8;
+ }
+ leaf instance_id {
+ type instance-identifier;
+ }
+ leaf union {
+ type union {
+ type uint8;
+ type enumeration {
+ enum "infinity";
+ }
+ }
+ }
+ leaf leafref-i8 {
+ type leafref {
+ path "/main/i8";
+ }
+ }
+ leaf leafref-raw {
+ type leafref {
+ path "/main/raw";
+ }
+ }
+ leaf leafref-string {
+ type leafref {
+ path "/main/string";
+ }
+ }
+ anyxml xml-data;
+ anydata any-data;
+ }
+
+ identity base_id;
+
+ identity id_1 {
+ base base_id;
+ }
+
+ identity id_2 {
+ base base_id;
+ }
+
+ list list {
+ key "key";
+ leaf key {
+ type string;
+ }
+ leaf id_ref {
+ type identityref {
+ base base_id;
+ }
+ }
+ leaf instance_id {
+ type instance-identifier;
+ }
+ leaf empty {
+ type empty;
+ }
+ }
+
+ container kernel-modules {
+ list kernel-module {
+ key "name";
+
+ leaf name {
+ type string;
+ }
+
+ leaf location {
+ type string;
+ default "/lib/modules";
+ }
+
+ leaf loaded {
+ type boolean;
+ }
+
+ action load {
+ input {
+ leaf params {
+ mandatory "true";
+ type string;
+ }
+ leaf force {
+ type boolean;
+ default "false";
+ when "../../loaded = 'false'";
+ }
+ leaf dry-run {
+ type boolean;
+ default false;
+ }
+ }
+ output {
+ leaf return-code {
+ type uint8;
+ }
+ }
+ }
+ }
+ }
+
+ container presence-container {
+ presence "presence-container";
+
+ leaf topleaf1 {
+ type int8;
+ }
+
+ leaf topleaf2 {
+ type int8;
+ }
+
+ container child1 {
+ leaf child1-leaf {
+ type int8;
+ }
+
+ container grandchild1 {
+ leaf grandchild1-leaf {
+ type int8;
+ default 10;
+ }
+ }
+ }
+
+ container child2 {
+ leaf child2-leaf {
+ type int8;
+ }
+
+ container grandchild2 {
+ leaf grandchild2-leaf1 {
+ type int8;
+ }
+ leaf grandchild2-leaf2 {
+ type int8;
+ }
+ leaf grandchild2-leaf3 {
+ type int8;
+ }
+ }
+ }
+ }
+}