[ONOS-5527,ONOS-5529] process sub tree filtering in generted code changes.
Change-Id: I2b5562ee57d887c25f4a6b55cd25006e288563c0
diff --git a/plugin/maven/src/test/resources/augmentTranslator/test.yang b/plugin/maven/src/test/resources/augmentTranslator/test.yang
index c112cef..20393a7 100644
--- a/plugin/maven/src/test/resources/augmentTranslator/test.yang
+++ b/plugin/maven/src/test/resources/augmentTranslator/test.yang
@@ -43,7 +43,21 @@
}
}
}
-
+
+ leaf leaf-a {
+ type int32;
+ }
+
+ leaf-list leaf-list-a {
+ type int32;
+ }
+
+ list list-a {
+ key "name";
+ leaf name {
+ type string;
+ }
+ }
augment /cont3 {
leaf leaf1 {
diff --git a/plugin/maven/src/test/resources/choiceAugment/all.yang b/plugin/maven/src/test/resources/choiceAugment/all.yang
new file mode 100644
index 0000000..4c08537
--- /dev/null
+++ b/plugin/maven/src/test/resources/choiceAugment/all.yang
@@ -0,0 +1,128 @@
+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/choiceAugment/test.yang b/plugin/maven/src/test/resources/choiceAugment/test.yang
new file mode 100644
index 0000000..ceee3d7
--- /dev/null
+++ b/plugin/maven/src/test/resources/choiceAugment/test.yang
@@ -0,0 +1,78 @@
+module test {
+ namespace "test:test";
+ prefix test ;
+
+ import test1{
+ prefix test1;
+ }
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ augment /test1:rpc-input-output/test1:output/ {
+ choice choice1 {
+ container case1 {
+ leaf int-leaf {
+ type int32;
+ }
+ }
+ }
+ }
+
+ list node {
+ key "node-id";
+ leaf node-id{
+ type string;
+ }
+ leaf-list node-prop{
+ type string;
+ }
+ container termination-points{
+ leaf number-of-tp {
+ type int16;
+ }
+ list termination-point {
+ key "tp-id";
+ leaf tp-id {
+ type string;
+ }
+ }
+ }
+ choice choice1{
+ case case1a{
+ leaf leaf1a1{
+ type string;
+ }
+ leaf leaf1a2{
+ type string;
+ }
+ }
+ case case1b{
+ choice choice1b{
+ case case1bi{
+ leaf leaf1bia{
+ type string;
+ }
+ leaf leaf1bib{
+ type string;
+ }
+ }
+ case case1bii{
+ leaf leaf1biia{
+ type string;
+ }
+ leaf leaf1biib{
+ type string;
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugin/maven/src/test/resources/choiceAugment/test2.yang b/plugin/maven/src/test/resources/choiceAugment/test2.yang
new file mode 100644
index 0000000..4caa38b
--- /dev/null
+++ b/plugin/maven/src/test/resources/choiceAugment/test2.yang
@@ -0,0 +1,26 @@
+module test1 {
+ namespace "test1:test1";
+ prefix test1 ;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ rpc rpc-input-output {
+ input {
+ leaf leaf1 {
+ type int32;
+ }
+ }
+ output {
+ leaf leaf1 {
+ type int32;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugin/maven/src/test/resources/identityTranslator/test.yang b/plugin/maven/src/test/resources/identityTranslator/test.yang
new file mode 100644
index 0000000..b8a3193
--- /dev/null
+++ b/plugin/maven/src/test/resources/identityTranslator/test.yang
@@ -0,0 +1,14 @@
+module IdentityInModule{
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix IdentityInModule;
+
+ identity ref-address-family {
+ reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2";
+ }
+ leaf tunnel {
+ type identityref {
+ base ref-address-family;
+ }
+ }
+}
\ No newline at end of file