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