Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / declared-statements-test / choice-declared-test.yang
1 module choice-declared-test {
2     namespace "choice-declared-test";
3     prefix "chdt";
4
5     feature foo-feature;
6     feature foobar-feature;
7
8     choice test-choice {
9         default case-two;
10         config false;
11         mandatory false;
12         when "bar = 'baz'";
13         if-feature foo-feature;
14         status current;
15         description "choice description";
16         reference "choice reference";
17
18         case case-one {
19             when "foo = 'bar'";
20             if-feature foobar-feature;
21             status current;
22             description "case description";
23             reference "case reference";
24
25             leaf case-one-leaf {
26                 type string;
27             }
28         }
29
30         case case-two {
31             leaf case-two-leaf {
32                 type string;
33             }
34         }
35
36         case case-three {
37             leaf case-three-leaf {
38                 type string;
39             }
40         }
41     }
42 }