summaryrefslogtreecommitdiffstats
path: root/restconf-client/provider/src/test/resources
diff options
context:
space:
mode:
authorVidyashree Rama <vidyashree.rama@huawei.com>2018-08-21 13:47:16 +0530
committerVidyashree Rama <vidyashree.rama@huawei.com>2018-08-21 14:56:05 +0530
commit4633416831f2d98ca50668d4514cbd1905749201 (patch)
tree6c6fa642939ab14a5dcba41c988e72c86b953cbb /restconf-client/provider/src/test/resources
parent224d394cda8a832f8d8c9db03795343ac82f7058 (diff)
Handling identity ref type
Handling identity ref type in properties node serializer Issue-ID: CCSDK-378 Change-Id: Ie74088a5e2449c09f9712048f1856990b81d05e7 Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
Diffstat (limited to 'restconf-client/provider/src/test/resources')
-rw-r--r--restconf-client/provider/src/test/resources/yang/identity-test.yang77
-rw-r--r--restconf-client/provider/src/test/resources/yang/identity-types-second.yang25
-rw-r--r--restconf-client/provider/src/test/resources/yang/identity-types.yang17
3 files changed, 119 insertions, 0 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
new file mode 100644
index 000000000..81d3f0a0b
--- /dev/null
+++ b/restconf-client/provider/src/test/resources/yang/identity-test.yang
@@ -0,0 +1,77 @@
+module identity-test {
+ yang-version 1.1;
+ namespace "identity:ns:test:json:ser";
+ prefix "id";
+
+ import identity-types {
+ prefix "type";
+ }
+
+ import identity-types-second {
+ prefix "sec";
+ }
+
+ revision "2013-07-15";
+
+ identity optical {
+ base type:int-type;
+ }
+
+ identity Giga {
+ base type:physical;
+ }
+
+ typedef available {
+ type identityref {
+ base "type:physical";
+ }
+ }
+
+ typedef typed{
+ type union {
+ type int32;
+ type int8;
+ type identityref {
+ base type:int-type;
+ }
+ }
+ }
+
+ container test {
+ leaf l {
+ type string;
+ }
+ container con1 {
+ leaf interface {
+ type identityref {
+ base "type:int-type";
+ }
+ }
+ container interfaces {
+ list int-list {
+ key "iden";
+ leaf iden {
+ type "id:typed";
+ }
+ container available {
+ leaf-list ll {
+ type available;
+ }
+ leaf leaf1 {
+ type leafref {
+ path "../../iden";
+ }
+ }
+
+ leaf leaf2 {
+ 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
new file mode 100644
index 000000000..ad752de31
--- /dev/null
+++ b/restconf-client/provider/src/test/resources/yang/identity-types-second.yang
@@ -0,0 +1,25 @@
+module identity-types-second{
+ yang-version 1;
+ namespace "identity:list:second:ns:test:json:ser";
+ prefix "sec";
+
+ import identity-types {
+ prefix "type";
+ }
+
+ revision "2013-07-15";
+
+ identity virtual {
+ base type:int-type;
+ }
+
+ identity Ethernet {
+ base type:physical;
+ }
+
+ identity iden1;
+
+ identity iden2 {
+ base iden1;
+ }
+}
diff --git a/restconf-client/provider/src/test/resources/yang/identity-types.yang b/restconf-client/provider/src/test/resources/yang/identity-types.yang
new file mode 100644
index 000000000..25c8fa54f
--- /dev/null
+++ b/restconf-client/provider/src/test/resources/yang/identity-types.yang
@@ -0,0 +1,17 @@
+module identity-types {
+ yang-version 1;
+ namespace "identity:list:ns:test:json:ser";
+ prefix "type";
+ revision "2013-07-15";
+
+ identity int-type {
+ }
+
+ identity physical {
+ base int-type;
+ }
+
+ identity Loopback {
+ base physical;
+ }
+}