[ONOS-5232] bits enum class generation modifications and code refactoring.
Change-Id: I67fb31c586802e9cf682aa6e707475ad8fdc096f
diff --git a/plugin/maven/src/test/resources/ChoiceCaseTranslator.yang b/plugin/maven/src/test/resources/ChoiceCaseTranslator.yang
index 35cbf19..5834795 100644
--- a/plugin/maven/src/test/resources/ChoiceCaseTranslator.yang
+++ b/plugin/maven/src/test/resources/ChoiceCaseTranslator.yang
@@ -2,7 +2,7 @@
yang-version 1;
namespace http://huawei.com;
prefix Ant;
- notification food {
+ container food {
choice snack {
case sports-arena {
leaf pretzel {
@@ -18,5 +18,25 @@
}
}
}
+ container dinner {
+ leaf cheese {
+ type string;
+ }
+ }
+ choice snack2 {
+ case sports-arena {
+ leaf pretzel {
+ type string;
+ }
+ leaf beer {
+ type string;
+ }
+ }
+ case late-night {
+ leaf chocolate {
+ type string;
+ }
+ }
+ }
}
}
diff --git a/plugin/maven/src/test/resources/rpcAugment/inter/1.yang b/plugin/maven/src/test/resources/rpcAugment/inter/1.yang
new file mode 100644
index 0000000..dcfe919
--- /dev/null
+++ b/plugin/maven/src/test/resources/rpcAugment/inter/1.yang
@@ -0,0 +1,17 @@
+module ietf-inet1 {
+
+ namespace "yang:all1";
+ prefix "inet1";
+ yang-version 1;
+
+ import ietf-inet2 {
+ prefix inet2;
+ }
+
+ augment /inet2:get-port/inet2:input {
+ leaf port {
+ type int32;
+ }
+ }
+
+}
diff --git a/plugin/maven/src/test/resources/rpcAugment/inter/2.yang b/plugin/maven/src/test/resources/rpcAugment/inter/2.yang
new file mode 100644
index 0000000..7c6ccbf
--- /dev/null
+++ b/plugin/maven/src/test/resources/rpcAugment/inter/2.yang
@@ -0,0 +1,33 @@
+module ietf-inet2 {
+
+ namespace "yang:all2";
+ prefix "inet2";
+ yang-version 1;
+
+
+ rpc get-port {
+ input {
+ leaf port {
+ type int32;
+ }
+
+ leaf-list port-id {
+ type string;
+ }
+ }
+ output {
+ container port {
+ leaf port-number {
+ type enumeration {
+ enum zero-0;
+ }
+ }
+ leaf ip {
+ type int32;
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/plugin/maven/src/test/resources/rpcAugment/intra/all.yang b/plugin/maven/src/test/resources/rpcAugment/intra/all.yang
new file mode 100644
index 0000000..6fc76ea
--- /dev/null
+++ b/plugin/maven/src/test/resources/rpcAugment/intra/all.yang
@@ -0,0 +1,103 @@
+module ietf-inet {
+
+ namespace "yang:all";
+ prefix "inet";
+ yang-version 1;
+
+ typedef ip-address {
+ type int32;
+ }
+
+ leaf-list id {
+ type string;
+ }
+
+ leaf mybits {
+ type bits {
+ bit disable-nagle {
+ position 0;
+ }
+ bit auto-sense-speed {
+ position 1;
+ }
+ bit Mb-only {
+ position 2;
+ }
+ }
+ }
+
+ container network {
+ leaf network-ip {
+ type ip-address;
+ }
+ }
+
+ typedef leaf1 {
+ type leafref {
+ path "/network/network-ip";
+ }
+ }
+
+ grouping link-details {
+ leaf link-id {
+ type int32;
+ }
+ container link {
+ leaf port {
+ type int32;
+ }
+
+ leaf-list port-id {
+ type string;
+ }
+ list areas {
+ key "name1";
+ leaf name1 {
+ type string;
+ }
+ }
+ }
+ }
+
+ notification link-up {
+ leaf link-id {
+ type int32;
+ }
+
+ leaf-list link-name {
+ type string;
+ }
+ }
+
+ rpc get-port {
+ input {
+ leaf port {
+ type int32;
+ }
+
+ leaf-list port-id {
+ type string;
+ }
+ uses link-details;
+ }
+ output {
+ container port {
+ leaf port-number {
+ type enumeration {
+ enum zero-0;
+ }
+ }
+ leaf ip {
+ type ip-address;
+ }
+ }
+ }
+ }
+
+ augment /get-port/input {
+ leaf port {
+ type int32;
+ }
+ }
+
+}
diff --git a/plugin/maven/src/test/resources/typedefTranslator/wihtout/Onos_Yang_1.yang b/plugin/maven/src/test/resources/typedefTranslator/without/Onos_Yang_1.yang
similarity index 100%
rename from plugin/maven/src/test/resources/typedefTranslator/wihtout/Onos_Yang_1.yang
rename to plugin/maven/src/test/resources/typedefTranslator/without/Onos_Yang_1.yang