af0d925629ee6f9d3c1b7839d9e95d254acd8919
[yangtools.git] / yang / yang-parser-impl / src / test / resources / deviation-resolution-test / deviation-add / foo.yang
1 module foo {
2     namespace foo;
3     prefix foo;
4     yang-version 1.1;
5
6     revision 2017-01-20;
7
8     deviation "/my-leaf-list" {
9         deviate add {
10             config false;
11             min-elements 5;
12             max-elements 10;
13             default 100;
14             default 200;
15             units "hours";
16         }
17     }
18
19     deviation "/my-list" {
20         deviate add {
21             unique "my-leaf-a my-leaf-b";
22             unique "my-leaf-c my-leaf-d";
23         }
24     }
25
26     deviation "/my-choice" {
27         deviate add {
28             default c2;
29         }
30     }
31
32     deviation "/my-rpc/input" {
33         deviate add {
34             must "day or night";
35             must "black and white";
36         }
37     }
38
39     deviation "/my-rpc/output" {
40         deviate add {
41             must "day or night";
42             must "black and white";
43         }
44     }
45
46     deviation "/my-notification" {
47         deviate add {
48             must "day or night";
49             must "black and white";
50         }
51     }
52
53     deviation "/my-anyxml" {
54         deviate add {
55             mandatory true;
56             foo:custom-property "arg";
57             foo:custom-property "another arg";
58         }
59     }
60
61     extension custom-property {
62         argument name;
63     }
64
65     leaf-list my-leaf-list {
66         type int32;
67         default 50;
68     }
69
70     list my-list {
71         key key-leaf;
72
73         leaf key-leaf {
74             type string;
75         }
76
77         leaf my-leaf-a {
78             type string;
79         }
80
81         leaf my-leaf-b {
82             type string;
83         }
84
85         leaf my-leaf-c {
86             type string;
87         }
88
89         leaf my-leaf-d {
90             type string;
91         }
92     }
93
94     choice my-choice {
95         case c1 {
96             leaf c1-leaf {
97                 type string;
98                 default "heaven";
99             }
100         }
101
102         case c2 {
103             leaf c2-leaf {
104                 type string;
105                 default "hell";
106             }
107         }
108     }
109
110     rpc my-rpc {
111         input {
112             leaf my-rpc-input-leaf {
113                 type string;
114             }
115         }
116
117         output {
118             leaf my-rpc-output-leaf {
119                 type string;
120             }
121         }
122     }
123
124     notification my-notification {
125
126     }
127
128     anyxml my-anyxml {
129
130     }
131 }