Bug 8237 - BI to BA conversion not resolving nested nodes
[mdsal.git] / binding / mdsal-binding-test-model / src / main / yang / opendaylight-mdsal-binding-test.yang
1 module opendaylight-mdsal-binding-test {
2
3     namespace "urn:opendaylight:params:xml:ns:yang:mdsal:test:binding";
4     prefix list-test;
5
6
7     description
8         "This module contains a collection of YANG definitions used for
9         some test cases.";
10
11     revision 2014-07-01 {
12         description
13         "Test model for testing data broker with nested lists.";
14     }
15
16     typedef int32-string-union {
17         type union {
18             type int32;
19             type string;
20         }
21     }
22
23     identity test-root;
24
25     identity test-one {
26         base test-root;
27     }
28
29     identity test-two {
30         base test-root;
31     }
32
33     typedef test-identityref {
34         type identityref {
35             base test-root;
36         }
37     }
38
39     grouping two-level-list {
40         list top-level-list {
41             description
42                 "Top Level List";
43             key "name";
44             leaf name {
45                 type string;
46             }
47
48             choice choice-in-list {
49                 case simple-case {
50                     leaf simple {
51                         type string;
52                     }
53                 }
54             }
55
56             list nested-list {
57                 key "name";
58                 leaf name {
59                     type string;
60                 }
61                 leaf type {
62                     type string;
63                     mandatory true;
64                     description
65                         "Mandatory type of list.";
66                 }
67                 ordered-by user;
68                 description
69                     "A list of service functions that compose the service chain";
70             }
71         }
72         leaf-list top-level-leaf-list {
73             type string;
74         }
75
76         leaf-list top-level-ordered-leaf-list {
77             type string;
78             ordered-by user;
79         }
80     }
81
82     grouping choice {
83         choice identifier {
84             case simple {
85                 container simple-id {
86                     leaf id {
87                         type int32;
88                     }
89                 }
90             }
91             case extended {
92                 container extended-id {
93                     leaf id {
94                         type string;
95                     }
96                 }
97             }
98         }
99     }
100
101     container top {
102         uses two-level-list;
103     }
104
105     container choice-container {
106         uses choice;
107     }
108
109     rpc put-top {
110         input {
111             uses two-level-list;
112         }
113     }
114
115     notification two-level-list-changed {
116         uses two-level-list;
117     }
118
119     rpc get-top {
120         output {
121             uses two-level-list;
122         }
123     }
124
125     augment "/list-test:top" {
126         leaf augmented-string {
127             type string;
128         }
129     }
130
131     augment "/list-test:top" {
132         leaf augmented-int {
133             type int32;
134         }
135     }
136 }