YANGTOOLS-706: Split out yang-parser-rfc7950
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / if-feature-resolution-test / foo.yang
1 module foo {
2     namespace "foo-namespace";
3     prefix "foo-prefix";
4
5     import bar {
6         prefix br;
7     }
8
9     container test-container-a {
10         if-feature foo-feature;
11
12         leaf test-leaf-a {
13             type string;
14         }
15     }
16
17     container test-container-b {
18         if-feature test-feature-1;
19
20         leaf test-leaf-b {
21             type string;
22         }
23     }
24
25     container test-container-c {
26         if-feature test-feature-1;
27         if-feature test-feature-2;
28         if-feature test-feature-3;
29
30         leaf test-leaf-c {
31             type string;
32         }
33     }
34
35     container test-container-d {
36         if-feature test-feature-1;
37         if-feature test-feature-2;
38         if-feature foo-feature;
39         if-feature test-feature-3;
40
41         leaf test-leaf-d {
42             type string;
43         }
44     }
45
46     container test-container-e {
47         container test-subcontainer-e {
48             leaf test-leaf-e {
49                 if-feature foo-feature;
50                 type string;
51             }
52         }
53     }
54
55     container test-container-f {
56         container test-subcontainer-f {
57             if-feature foo-feature;
58             container test-subsubcontainer-f {
59                 leaf test-leaf-f {
60                     type string;
61                 }
62             }
63         }
64     }
65
66     container test-container-g {
67         leaf test-leaf-g {
68             type string;
69         }
70     }
71
72     container test-container-h {
73         uses test-grouping {
74             if-feature "foo-feature";
75         }
76     }
77
78     container test-container-i {
79         uses test-grouping;
80     }
81
82     container test-container-j {
83         if-feature br:imp-feature;
84
85         leaf test-leaf-j {
86             type string;
87         }
88     }
89
90     container test-container-k {
91         uses test-grouping {
92             augment "test-grouping-subcontainer" {
93                 leaf augmenting-test-grouping-leaf {
94                     if-feature test-feature-1;
95                     type string;
96                 }
97
98                 leaf augmenting-test-grouping-leaf-2 {
99                     if-feature foo-feature;
100                     type string;
101                 }
102             }
103         }
104     }
105
106     augment "/test-container-g" {
107         if-feature foo-feature;
108         leaf augmenting-test-leaf-g {
109             type string;
110         }
111     }
112
113     augment "/test-container-g" {
114         anyxml augmenting-test-anyxml-g;
115     }
116
117     grouping test-grouping {
118         container test-grouping-subcontainer {
119             leaf test-grouping-leaf {
120                 if-feature foo-feature;
121                 type string;
122             }
123         }
124     }
125 }