[ONOS-5539] Process sub tree defect fix
Change-Id: I6e06a8ca430a86cc538543b161bbbc56dc9cade6
diff --git a/plugin/maven/src/test/resources/choiceAugment/all.yang b/plugin/maven/src/test/resources/choiceAugment/all.yang
deleted file mode 100644
index 4c08537..0000000
--- a/plugin/maven/src/test/resources/choiceAugment/all.yang
+++ /dev/null
@@ -1,128 +0,0 @@
-module ietf-inet {
-
- namespace "yang:all";
- prefix "inet";
- yang-version 1;
-
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
-
-
- container c {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
-
- list l {
- config false;
-choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
-
-
- grouping g {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
-
- notification n {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
- rpc r {
- input {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
- output {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
- }
-
- augment /name {
- choice name {
- case a {
- leaf udp {
- type empty;
- }
- }
- case b {
- leaf tcp {
- type empty;
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/plugin/maven/src/test/resources/choiceTranslator/all.yang b/plugin/maven/src/test/resources/choiceTranslator/all.yang
new file mode 100644
index 0000000..be2fd07
--- /dev/null
+++ b/plugin/maven/src/test/resources/choiceTranslator/all.yang
@@ -0,0 +1,157 @@
+module all {
+
+ namespace "yang:all";
+ prefix "all";
+ yang-version 1;
+
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+
+
+ container c {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+
+ list l {
+ config false;
+choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+
+
+ grouping g {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+ rpc r {
+ input {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+ output {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+ }
+
+ augment /name {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ container cont1 {
+ container cont2 {
+ choice name {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ container cont1 {
+ container cont2 {
+ leaf udp1 {
+ type empty;
+ }
+ }
+ leaf udp2 {
+ type empty;
+ }
+ }
+ }
+ case b {
+ leaf tcp3 {
+ type empty;
+ }
+ }
+ }
+ leaf udp4 {
+ type empty;
+ }
+ }
+ leaf udp5 {
+ type empty;
+ }
+ }
+ }
+ case b {
+ leaf tcp2 {
+ type empty;
+ }
+ }
+ }
+ choice name1 {
+ case a {
+ leaf udp {
+ type empty;
+ }
+ }
+ case b {
+ leaf tcp {
+ type empty;
+ }
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/plugin/maven/src/test/resources/grouping/grouping.yang b/plugin/maven/src/test/resources/grouping/grouping.yang
new file mode 100644
index 0000000..518150f
--- /dev/null
+++ b/plugin/maven/src/test/resources/grouping/grouping.yang
@@ -0,0 +1,58 @@
+module grouping {
+
+ namespace "yang:grouping";
+ prefix "grouping";
+ yang-version 1;
+ revision 2016-10-08;
+
+ grouping link-details {
+ leaf link-id {
+ type union {
+ type int32;
+ type uint16;
+ type enumeration {
+ enum one;
+ enum two;
+ enum five {
+ value 5;
+ }
+ enum six-square {
+ value 36;
+ }
+ }
+ }
+ }
+ typedef group {
+ type bits {
+ bit disable-nagle {
+ position 0;
+ }
+ bit auto-sense-speed {
+ position 1;
+ }
+ bit Mb-only {
+ position 2;
+ }
+ }
+ }
+ container link {
+ leaf port {
+ type int32;
+ }
+
+ leaf-list port-id {
+ type string;
+ }
+ list areas {
+ key "name1";
+ leaf name1 {
+ type string;
+ }
+ }
+ }
+ }
+
+ container cont2 {
+ uses link-details;
+ }
+}
diff --git a/plugin/maven/src/test/resources/pstcodegen/test.yang b/plugin/maven/src/test/resources/pstcodegen/test.yang
new file mode 100644
index 0000000..93e1476
--- /dev/null
+++ b/plugin/maven/src/test/resources/pstcodegen/test.yang
@@ -0,0 +1,83 @@
+module test {
+ namespace "test:test";
+ prefix test;
+
+ container cont1 {
+ leaf leaf1 {
+ type int32;
+ }
+ leaf-list leaf-list1 {
+ type int32;
+ }
+ list list1 {
+ key "name";
+ leaf name {
+ type string;
+ }
+ }
+ container cont2 {
+ leaf leaf2 {
+ type int32;
+ }
+ }
+ }
+ leaf leaf2 {
+ type int32;
+ }
+ leaf-list leaf-list2 {
+ type int32;
+ }
+ list list2 {
+ key "name";
+ leaf name {
+ type string;
+ }
+ }
+ choice choice1 {
+ case case1 {
+ leaf leaf3 {
+ type int32;
+ }
+ leaf-list leaf-list3 {
+ type int32;
+ }
+ list list3 {
+ key "name";
+ leaf name {
+ type string;
+ }
+ }
+ }
+ }
+ grouping group1 {
+ container cont1 {
+ leaf leaf1 {
+ type int32;
+ }
+ leaf-list leaf-list1 {
+ type int32;
+ }
+ list list1 {
+ key "name";
+ leaf name {
+ type string;
+ }
+ }
+ container cont2 {
+ leaf leaf2 {
+ type int32;
+ }
+ }
+ }
+ }
+ rpc rpc1 {
+ input {
+ uses group1;
+ }
+ }
+ augment /cont1/list1 {
+ leaf leaf2 {
+ type int64;
+ }
+ }
+}
\ No newline at end of file