Fixed organization and contact reference in yang test files.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / test-model.yang
1 module test-model {
2         yang-version 1;
3         namespace "urn:cisco:params:xml:ns:yang:controller:network";
4         prefix "topos";
5
6         import ietf-inet-types { prefix "inet"; }
7         import iana-if-type {prefix "if-type";}
8         import mount {prefix "mnt";} 
9
10         organization "OPEN DAYLIGHT";
11     contact "http://www.opendaylight.org/";
12
13         description "module description";
14         reference "module reference";
15         
16         typedef topology-id {
17                 type inet:uri;
18         }
19
20         typedef node-id {
21                 type inet:uri;
22         }
23
24         typedef link-id {
25                 type inet:uri;
26         }
27
28         typedef tp-id {
29                 type inet:uri;
30                 description "identifier for termination points on a port";
31         }
32
33         typedef tp-ref {
34                 type leafref {
35                         path "/network/topologies/topology/nodes/node/termination-points/termination-point/tp-id";
36                 }
37         }
38         typedef topology-ref {
39                 type leafref {
40                         path "/network/topologies/topology/topology-id";
41                 }
42                 description "This type is used for leafs that reference topology identifier instance.";
43                 // currently not used
44         }
45
46         typedef node-ref {
47                 type leafref {
48                         path "/network/topologies/topology/nodes/node/node-id";
49                 }
50                 description "This type is used for leafs that reference a node instance.";
51         }
52
53         typedef link-ref {
54                 type leafref {
55                         path "/network/topologies/topology/links/link/link-id";
56                 }
57                 description "This type is used for leafs that reference a link instance.";
58                 // currently not used
59         }
60         
61         typedef network-element-ref {
62                 type leafref {
63                         path "/network/network-elements/network-element/element-id";
64                 }
65         }
66
67
68         typedef element-id {
69                 type string;
70         }
71         
72         
73         container network {
74                 description "network-description";
75                 reference "network-reference";
76                 status obsolete;
77                 config true;
78                 presence "some presence text";
79                 
80                 mnt:mountpoint point  {
81                 mnt:target-ref target;
82                 }
83                 
84                 leaf-list locked-node {
85                 type instance-identifier;
86                 min-elements 1;
87                 when "a/b/c";
88                 description "List of locked nodes in the running datastore";
89         }
90         
91         leaf locked-test {
92                 mandatory true;
93         }
94         
95                 container topologies {
96                         list topology {
97                                 description "Test description of list 'topology'.";
98                                 key "topology-id";
99                                 leaf topology-id {
100                                         type topology-id; 
101                                         description "Test description of leaf 'topology-id'";
102                                 }
103
104                                 container nodes {
105                                         list node {
106                                                 description "The list of network nodes defined for topology.";
107
108                                                 key "node-id";
109                                                 leaf node-id {
110                                                         type node-id;
111                                                         description "The Topology identifier of network-node.";
112                                                 }
113
114                                                 leaf supporting-ne {
115                                                         type network-element-ref;
116                                                 }
117                                                 
118                                                 container termination-points {
119                                                         list termination-point {
120                                                                 key "tp-id";
121                                                                 leaf tp-id {
122                                                                         type tp-id;
123                                                                 }
124                                                         }
125                                                 }
126                                         }
127                                 }
128                 
129                                 container links {
130                                         list link {
131                                                 description "Test description of list 'link'.";
132                                                 key "link-id";
133                                                 leaf link-id {
134                                                         type link-id;
135                                                         description "";
136                                                 }
137
138                                                 container source { 
139                                                         leaf source-node {
140                                                                 type node-ref;
141                                                                 description "Source node identifier.";
142                                                         }
143                                                         leaf source-tp {
144                                                                 type tp-ref;
145                                                         }
146                                                 }
147                                         
148                                                 container destination { 
149                                                         leaf dest-node {
150                                                                 type node-ref;
151                                                                 description "Destination node identifier.";
152                                                         }
153                                                         leaf dest-tp {
154                                                                 type tp-ref;
155                                                         }
156                                                 }
157                                         }
158                                 }
159                         }
160                 }
161         }
162         
163 }