Use callbacks while parsing to NormalizedNodes.
[controller.git] / opendaylight / netconf / mdsal-netconf-connector / src / test / resources / yang / mdsal-netconf-mapping-test.yang
1 module config {
2     yang-version 1;
3     namespace "urn:opendaylight:mdsal:mapping:test";
4     prefix "map";
5
6     revision "2015-02-26";
7
8     container mapping-nodes {
9
10         list mapping-node{
11             key "id";
12             leaf id {
13                 type string;
14             }
15
16             leaf content {
17                 type string;
18             }
19         }
20     }
21
22     container top {
23
24         container users {
25
26             list user {
27
28                 key "name";
29
30                 leaf name {
31                     type string;
32                 }
33
34                 leaf type {
35                     type string;
36                 }
37
38                 leaf full-name {
39                     type string;
40                 }
41
42                 container company-info {
43
44                     leaf dept {
45                         type string;
46                     }
47
48                     leaf id {
49                         type string;
50                     }
51                 }
52             }
53         }
54
55         container modules {
56
57             list module {
58
59                 key "id";
60
61                 leaf id {
62                     type string;
63                 }
64
65                 leaf type {
66                     type string;
67                 }
68
69                 leaf desc {
70                     type string;
71                 }
72             }
73         }
74
75         choice choice-node {
76             case a {
77                 leaf text {
78                     type string;
79                 }
80             }
81
82             case b {
83                 container text-cont {
84                     leaf text {
85                         type string;
86                     }
87                 }
88             }
89         }
90
91     } //top
92
93     augment "/map:top/map:choice-node" {
94         case c {
95             leaf augmented-case {
96                 type string;
97             }
98         }
99
100         case d {
101             container choice-wrapper {
102                 choice inner-choice {
103                     case ia {
104                         leaf text {
105                             type string;
106                         }
107                     }
108
109                     case ib {
110                         leaf text2 {
111                             type string;
112                         }
113                     }
114                 }
115             }
116         }
117     }
118
119     augment "/map:top/map:modules/" {
120         container augmented-container{
121             leaf identifier {
122                 type string;
123             }
124         }
125     }
126
127     augment "/map:top" {
128         container mid-level {
129             container low-level {
130                 container lowest-level {
131                     leaf-list note {
132                         type string;
133                     }
134                 }
135             }
136             container low-level2 {
137                 leaf-list note {
138                     type string;
139                 }
140             }
141         }
142     }
143 }