summaryrefslogtreecommitdiffstats
path: root/restconf-client/provider/src/test/resources/yang
diff options
context:
space:
mode:
authorjanani b <janani.b@huawei.com>2018-09-12 18:30:28 +0530
committerjanani b <janani.b@huawei.com>2018-09-12 18:30:28 +0530
commit259eece936114ccacf9acc8f412eeed033fd10c4 (patch)
treea3cd3e726b234c546e5433a9006ac71896c0760d /restconf-client/provider/src/test/resources/yang
parentf7086e83c97a72be14ef6813b3c1f8bd0546452e (diff)
UT and defect fixes for DF serializer
UT and defect fixes Issue-ID: CCSDK-376 Change-Id: Ia5f04a0d7e07caad0e3b380fdfa6cc109ec43b4e Signed-off-by: janani b <janani.b@huawei.com>
Diffstat (limited to 'restconf-client/provider/src/test/resources/yang')
-rw-r--r--restconf-client/provider/src/test/resources/yang/identity-test.yang10
-rw-r--r--restconf-client/provider/src/test/resources/yang/identity-types-second.yang2
-rw-r--r--restconf-client/provider/src/test/resources/yang/test-augment.yang59
-rw-r--r--restconf-client/provider/src/test/resources/yang/test-yang.yang114
4 files changed, 103 insertions, 82 deletions
diff --git a/restconf-client/provider/src/test/resources/yang/identity-test.yang b/restconf-client/provider/src/test/resources/yang/identity-test.yang
index 81d3f0a0b..12ef717f6 100644
--- a/restconf-client/provider/src/test/resources/yang/identity-test.yang
+++ b/restconf-client/provider/src/test/resources/yang/identity-test.yang
@@ -58,16 +58,16 @@ module identity-test {
type available;
}
leaf leaf1 {
- type leafref {
- path "../../iden";
- }
+ type leafref {
+ path "../../iden";
+ }
}
leaf leaf2 {
- type identityref {
+ type identityref {
base type:int-type;
base sec:iden1;
- }
+ }
}
}
}
diff --git a/restconf-client/provider/src/test/resources/yang/identity-types-second.yang b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang
index ad752de31..98d6a6e60 100644
--- a/restconf-client/provider/src/test/resources/yang/identity-types-second.yang
+++ b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang
@@ -1,4 +1,4 @@
-module identity-types-second{
+module identity-types-second {
yang-version 1;
namespace "identity:list:second:ns:test:json:ser";
prefix "sec";
diff --git a/restconf-client/provider/src/test/resources/yang/test-augment.yang b/restconf-client/provider/src/test/resources/yang/test-augment.yang
index bac19171b..795000d39 100644
--- a/restconf-client/provider/src/test/resources/yang/test-augment.yang
+++ b/restconf-client/provider/src/test/resources/yang/test-augment.yang
@@ -14,19 +14,24 @@ module test-augment {
augment "/t:cont1/t:cont2/t:cont4" {
container cont5 {
leaf leaf13 {
- type string;
+ type empty;
}
}
list list7 {
- leaf leaf14 {
- type string;
- }
+ leaf leaf14 {
+ type instance-identifier;
+ }
}
leaf leaf15 {
type string;
}
leaf-list ll6 {
- type string;
+ type union {
+ type int32;
+ type enumeration {
+ enum "unbounded";
+ }
+ }
}
uses "t:g1";
}
@@ -34,16 +39,22 @@ module test-augment {
uses "t:g1";
augment "/t:ch1/t:c1/t:cont8/t:cont6" {
choice ch2 {
- case c3 {
- leaf leaf21 {
- type string;
- }
- }
- case c4 {
- leaf leaf22 {
- type string;
- }
- }
+ case c3 {
+ leaf leaf21 {
+ type string;
+ }
+ }
+ case c4 {
+ leaf leaf22 {
+ type enumeration {
+ enum zero;
+ enum one;
+ enum seven {
+ value 7;
+ }
+ }
+ }
+ }
}
}
@@ -72,14 +83,24 @@ module test-augment {
}
augment "/t:create-sfc/t:input" {
- leaf leaf36 {
- type string;
- }
+ leaf leaf36 {
+ type bits {
+ bit angle {
+ position 0;
+ }
+ bit degree {
+ position 1;
+ }
+ bit movement {
+ position 2;
+ }
+ }
+ }
}
augment "/t:create-sfc/t:output" {
leaf leaf37 {
- type string;
+ type boolean;
}
}
} \ No newline at end of file
diff --git a/restconf-client/provider/src/test/resources/yang/test-yang.yang b/restconf-client/provider/src/test/resources/yang/test-yang.yang
index e99d87bf8..b2bf06003 100644
--- a/restconf-client/provider/src/test/resources/yang/test-yang.yang
+++ b/restconf-client/provider/src/test/resources/yang/test-yang.yang
@@ -17,7 +17,7 @@ module test-yang {
list list1 {
key "leaf1 leaf2";
leaf leaf1 {
- type string;
+ type empty;
}
leaf leaf2 {
type string;
@@ -87,66 +87,66 @@ module test-yang {
}
choice ch1 {
- case c1 {
- container cont8 {
- container cont6 {
- leaf leaf16 {
- type string;
- }
- }
- list list8 {
- leaf leaf18 {
- type string;
- }
- }
- leaf leaf19 {
- type string;
- }
- leaf-list ll7 {
- type string;
- }
- }
- }
- case c2 {
- container cont9 {
- leaf leaf20 {
- type string;
- }
- leaf-list ll8 {
- type string;
- }
- container cont11 {
- choice ch3 {
- case c1 {
- leaf leaf25 {
+ case c1 {
+ container cont8 {
+ container cont6 {
+ leaf leaf16 {
type string;
- }
- uses g1;
- }
- }
- }
- }
- }
+ }
+ }
+ list list8 {
+ leaf leaf18 {
+ type string;
+ }
+ }
+ leaf leaf19 {
+ type string;
+ }
+ leaf-list ll7 {
+ type string;
+ }
+ }
+ }
+ case c2 {
+ container cont9 {
+ leaf leaf20 {
+ type string;
+ }
+ leaf-list ll8 {
+ type string;
+ }
+ container cont11 {
+ choice ch3 {
+ case c1 {
+ leaf leaf25 {
+ type string;
+ }
+ uses g1;
+ }
+ }
+ }
+ }
+ }
}
grouping g1 {
- container cont13 {
- container cont12 {
- leaf leaf26 {
- type string;
- }
- }
- list list9 {
- leaf leaf27 {
- type string;
- }
- }
- leaf leaf28 {
- type string;
- }
- leaf-list ll9 {
- type string;
- }
+ container cont13 {
+ container cont12 {
+ leaf leaf26 {
+ type string;
+ }
+ }
+ list list9 {
+ leaf leaf27 {
+ type string;
+ }
+ }
+ leaf leaf28 {
+ type string;
+ }
+ leaf-list ll9 {
+ type string;
+ }
}
}