[ONOS-3898/4069] Yang Utils Extension to support RPC/Notification/Choice/Case/Union

Change-Id: I405852caff3464719e8e586fa8e9ae9b6ed043ff
diff --git a/utils/yangutils/src/test/resources/CaseChoiceHierarchy.yang b/utils/yangutils/src/test/resources/CaseChoiceHierarchy.yang
new file mode 100644
index 0000000..16b4047
--- /dev/null
+++ b/utils/yangutils/src/test/resources/CaseChoiceHierarchy.yang
@@ -0,0 +1,23 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+           }
+           case late-night {
+               choice dinner {
+                  case late-night {
+                   leaf beer {
+                       type empty;
+                   }
+               }
+           }
+       }
+    }
+  }
+}
diff --git a/utils/yangutils/src/test/resources/CaseStatement.yang b/utils/yangutils/src/test/resources/CaseStatement.yang
new file mode 100644
index 0000000..bb3f6c9
--- /dev/null
+++ b/utils/yangutils/src/test/resources/CaseStatement.yang
@@ -0,0 +1,26 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+               leaf beer {
+                   type empty;
+               }
+           }
+           case late-night {
+               leaf chocolate {
+                   type enumeration {
+                       enum dark;
+                       enum milk;
+                       enum first-available;
+                   }
+               }
+           }
+       }
+    }
+}
diff --git a/utils/yangutils/src/test/resources/CaseStatementSameEntryDifferentChoice.yang b/utils/yangutils/src/test/resources/CaseStatementSameEntryDifferentChoice.yang
new file mode 100644
index 0000000..b42cdf9
--- /dev/null
+++ b/utils/yangutils/src/test/resources/CaseStatementSameEntryDifferentChoice.yang
@@ -0,0 +1,28 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+               leaf beer {
+                   type empty;
+               }
+           }
+       }
+       choice lunch {
+           case sports-arena {
+               leaf chocolate {
+                   type enumeration {
+                       enum dark;
+                       enum milk;
+                       enum first-available;
+                   }
+               }
+           }
+       }
+    }
+}
diff --git a/utils/yangutils/src/test/resources/ChoiceStatementDuplicateEntry.yang b/utils/yangutils/src/test/resources/ChoiceStatementDuplicateEntry.yang
new file mode 100644
index 0000000..d2a6371
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ChoiceStatementDuplicateEntry.yang
@@ -0,0 +1,10 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack;
+       choice lunch;
+       choice snack;
+    }
+}
diff --git a/utils/yangutils/src/test/resources/ChoiceStatementSameEntryDifferentContainer.yang b/utils/yangutils/src/test/resources/ChoiceStatementSameEntryDifferentContainer.yang
new file mode 100644
index 0000000..39ba626
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ChoiceStatementSameEntryDifferentContainer.yang
@@ -0,0 +1,13 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food1 {
+       choice snack;
+       choice lunch;
+    }
+     container food2 {
+       choice snack;
+       choice lunch;
+    }
+}
diff --git a/utils/yangutils/src/test/resources/ChoiceStatementWithStmtend.yang b/utils/yangutils/src/test/resources/ChoiceStatementWithStmtend.yang
new file mode 100644
index 0000000..4b85f59
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ChoiceStatementWithStmtend.yang
@@ -0,0 +1,8 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack;
+    }
+}
diff --git a/utils/yangutils/src/test/resources/ChoiceStatementWithoutBody.yang b/utils/yangutils/src/test/resources/ChoiceStatementWithoutBody.yang
new file mode 100644
index 0000000..2de7787
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ChoiceStatementWithoutBody.yang
@@ -0,0 +1,9 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+       }
+    }
+}
diff --git a/utils/yangutils/src/test/resources/DuplicateCaseInChoice.yang b/utils/yangutils/src/test/resources/DuplicateCaseInChoice.yang
new file mode 100644
index 0000000..a7b6b50
--- /dev/null
+++ b/utils/yangutils/src/test/resources/DuplicateCaseInChoice.yang
@@ -0,0 +1,26 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+               leaf beer {
+                   type empty;
+               }
+           }
+           case sports-arena {
+               leaf chocolate {
+                   type enumeration {
+                       enum dark;
+                       enum milk;
+                       enum first-available;
+                   }
+               }
+           }
+       }
+    }
+}
diff --git a/utils/yangutils/src/test/resources/DuplicateLeafInChoice.yang b/utils/yangutils/src/test/resources/DuplicateLeafInChoice.yang
new file mode 100644
index 0000000..f951c7f
--- /dev/null
+++ b/utils/yangutils/src/test/resources/DuplicateLeafInChoice.yang
@@ -0,0 +1,21 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+               leaf beer {
+                   type empty;
+               }
+           }
+           case late-night {
+               leaf pretzel {
+                   type empty;
+               }
+           }
+    }
+}
diff --git a/utils/yangutils/src/test/resources/DuplicateLeafInHierarchy.yang b/utils/yangutils/src/test/resources/DuplicateLeafInHierarchy.yang
new file mode 100644
index 0000000..c727cb7
--- /dev/null
+++ b/utils/yangutils/src/test/resources/DuplicateLeafInHierarchy.yang
@@ -0,0 +1,23 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           case sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+           }
+           case late-night {
+               choice lunch {
+                  case late {
+                   leaf pretzel {
+                       type empty;
+                   }
+               }
+           }
+       }
+    }
+  }
+}
diff --git a/utils/yangutils/src/test/resources/ShortCaseListenerWithContainer.yang b/utils/yangutils/src/test/resources/ShortCaseListenerWithContainer.yang
new file mode 100644
index 0000000..0e4ff2d
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ShortCaseListenerWithContainer.yang
@@ -0,0 +1,15 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           container sports-arena {
+               leaf pretzel {
+                   type empty;
+               }
+           }
+       }
+    }
+  }
+}
diff --git a/utils/yangutils/src/test/resources/ShortCaseListenerWithList.yang b/utils/yangutils/src/test/resources/ShortCaseListenerWithList.yang
new file mode 100644
index 0000000..2ba25d9
--- /dev/null
+++ b/utils/yangutils/src/test/resources/ShortCaseListenerWithList.yang
@@ -0,0 +1,16 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+     container food {
+       choice snack {
+           list sports-arena {
+               key "pretzel";
+               leaf pretzel {
+                   type int32;
+               }
+           }
+       }
+    }
+  }
+}