summaryrefslogtreecommitdiffstats
path: root/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang
diff options
context:
space:
mode:
Diffstat (limited to 'netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang')
-rw-r--r--netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang125
1 files changed, 125 insertions, 0 deletions
diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang
new file mode 100644
index 0000000..22430b9
--- /dev/null
+++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/choice/choice.yang
@@ -0,0 +1,125 @@
+module choice-case-test {
+ namespace "choice:case:test";
+
+ prefix "chcatst";
+ revision 2013-11-27 {
+ }
+
+ container cont {
+ leaf lf1 {
+ type string;
+ }
+
+ choice choi1 {
+ case a1 {
+ leaf lf1a {
+ type uint16;
+ }
+ choice choi1a {
+ case aa1 {
+ leaf lf1aa {
+ type string;
+ }
+ choice choi1aa {
+ case aaa1 {
+ leaf lf1aaa {
+ type string;
+ }
+ }
+ case aab1 {
+ leaf lf1aab {
+ type string;
+ }
+ }
+ }
+ }
+ case ab1 {
+ leaf lf1ab {
+ type string;
+ }
+ }
+ }
+ }
+ case b1 {
+ list lst1b {
+ leaf lf11b {
+ type string;
+ }
+ }
+ }
+ case c1 {
+ container cont1c {
+ leaf lf11c {
+ type string;
+ }
+ }
+ }
+ case d1 {
+ leaf-list lflst1d {
+ type string;
+ }
+ }
+ leaf e1 {
+ type uint32;
+ }
+ }
+
+ choice choi2 {
+ case a2 {
+ leaf lf2a {
+ type string;
+ }
+ }
+ case b2 {
+ leaf lf2b {
+ type string;
+ }
+ }
+ }
+
+ choice choi4 {
+ case a4 {
+ list lst4a {
+ choice choi4aa {
+ case aa1 {
+ leaf lf4aa {
+ type string;
+ }
+ }
+ case ab2 {
+ leaf lf4ab {
+ type int16;
+ }
+ }
+ }
+ }
+ }
+ case b4 {
+ leaf-list lflst4b {
+ type uint32;
+ }
+ }
+
+ }
+
+/* equal identifiers in various cases are illegal 7.9.2 rfc6020 */
+/*
+ choice choi3 {
+ case 3a {
+ leaf lf3a {
+ type string;
+ }
+ }
+ case 3b {
+ leaf lf3b {
+ type string;
+ }
+ }
+ }
+*/
+
+ }
+
+
+
+} \ No newline at end of file