6cadb6956586d67e0f7d53ac14ff65700b36eddd
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-data-impl / src / test / resources / controller-network.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3            xmlns:yin="urn:ietf:params:xml:schema:yang:yin:1"
4            targetNamespace="urn:opendaylight:controller:network"
5            xmlns="urn:opendaylight:controller:network"
6            elementFormDefault="qualified"
7            attributeFormDefault="unqualified"
8            version="2013-05-20"
9            xml:lang="en"
10            xmlns:topos="urn:opendaylight:controller:network"
11            xmlns:inet="urn:ietf:params:xml:ns:yang:ietf-inet-types">
12
13   <xs:import namespace="urn:ietf:params:xml:ns:yang:ietf-inet-types"
14              schemaLocation="ietf-inet-types@2010-09-24.xsd"/>
15
16   <xs:annotation>
17     <xs:documentation>
18       This schema was generated from the YANG module controller-network
19       by pyang version 1.2.
20
21       The schema describes an instance document consisting
22       of the entire configuration data store, operational
23       data, rpc operations, and notifications.
24       This schema can thus NOT be used as-is to
25       validate NETCONF PDUs.
26     </xs:documentation>
27   </xs:annotation>
28
29
30   <!-- YANG typedefs -->
31   <xs:simpleType name="topology-id">
32     <xs:restriction base="xs:string">
33     </xs:restriction>
34   </xs:simpleType>
35   <xs:simpleType name="node-id">
36     <xs:restriction base="xs:string">
37     </xs:restriction>
38   </xs:simpleType>
39   <xs:simpleType name="link-id">
40     <xs:restriction base="xs:string">
41     </xs:restriction>
42   </xs:simpleType>
43   <xs:simpleType name="tp-id">
44     <xs:annotation>
45       <xs:documentation>
46         identifier for termination points on a port
47       </xs:documentation>
48     </xs:annotation>
49
50     <xs:restriction base="xs:string">
51     </xs:restriction>
52   </xs:simpleType>
53   <xs:simpleType name="tp-ref">
54     <xs:restriction base="tp-id">
55     </xs:restriction>
56   </xs:simpleType>
57   <xs:simpleType name="topology-ref">
58     <xs:annotation>
59       <xs:documentation>
60         This type is used for leafs that reference topology identifier instance.
61       </xs:documentation>
62     </xs:annotation>
63
64     <xs:restriction base="topology-id">
65     </xs:restriction>
66   </xs:simpleType>
67   <xs:simpleType name="node-ref">
68     <xs:annotation>
69       <xs:documentation>
70         This type is used for leafs that reference a node instance.
71       </xs:documentation>
72     </xs:annotation>
73
74     <xs:restriction base="node-id">
75     </xs:restriction>
76   </xs:simpleType>
77   <xs:simpleType name="link-ref">
78     <xs:annotation>
79       <xs:documentation>
80         This type is used for leafs that reference a link instance.
81       </xs:documentation>
82     </xs:annotation>
83
84     <xs:restriction base="link-id">
85     </xs:restriction>
86   </xs:simpleType>
87   <xs:simpleType name="network-element-ref">
88     <xs:restriction base="element-id">
89     </xs:restriction>
90   </xs:simpleType>
91   <xs:simpleType name="element-id">
92     <xs:restriction base="xs:string">
93     </xs:restriction>
94   </xs:simpleType>
95
96   <xs:element name="network">
97     <xs:complexType>
98       <xs:sequence>
99         <xs:element name="topologies" minOccurs="0">
100           <xs:complexType>
101             <xs:sequence>
102               <xs:element name="topology" minOccurs="0" maxOccurs="unbounded">
103                 <xs:annotation>
104                   <xs:documentation>
105
106                     This is the model of abstract topology which contains only Network
107                     Nodes and Network Links. Each topology MUST be identified by
108                     unique topology-id for reason that the store could contain many
109                     topologies.
110
111                   </xs:documentation>
112                 </xs:annotation>
113                 <xs:complexType>
114                   <xs:sequence>
115                     <xs:element name="topology-id"  type="topology-id">
116                       <xs:annotation>
117                         <xs:documentation>
118
119                           It is presumed that datastore will contain many topologies. To
120                           distinguish between topologies it is vital to have UNIQUE
121                           topology identifier.
122
123                         </xs:documentation>
124                       </xs:annotation>
125                     </xs:element>
126                     <xs:element name="types" minOccurs="0">
127                       <xs:annotation>
128                         <xs:documentation>
129
130                           The container for definition of topology types.
131                           The augmenting modules should add empty optional leaf 
132                           to this container to signalize topology type.
133
134                         </xs:documentation>
135                       </xs:annotation>
136                       <xs:complexType>
137                         <xs:sequence>
138                           <xs:any minOccurs="0" maxOccurs="unbounded"
139                                   namespace="##other" processContents="lax"/>
140                         </xs:sequence>
141                       </xs:complexType>
142                     </xs:element>
143                     <xs:element name="nodes" minOccurs="0">
144                       <xs:complexType>
145                         <xs:sequence>
146                           <xs:element name="node" minOccurs="0" maxOccurs="unbounded">
147                             <xs:annotation>
148                               <xs:documentation>
149                                 The list of network nodes defined for topology.
150                               </xs:documentation>
151                             </xs:annotation>
152                             <xs:complexType>
153                               <xs:sequence>
154                                 <xs:element name="node-id"  type="node-id">
155                                   <xs:annotation>
156                                     <xs:documentation>
157                                       The Topology identifier of network-node.
158                                     </xs:documentation>
159                                   </xs:annotation>
160                                 </xs:element>
161                                 <xs:element name="supporting-ne" minOccurs="0"  type="network-element-ref">
162                                 </xs:element>
163                                 <xs:element name="termination-points" minOccurs="0">
164                                   <xs:complexType>
165                                     <xs:sequence>
166                                       <xs:element name="termination-point" minOccurs="0" maxOccurs="unbounded">
167                                         <xs:complexType>
168                                           <xs:sequence>
169                                             <xs:element name="tp-id"  type="tp-id">
170                                             </xs:element>
171                                             <xs:any minOccurs="0" maxOccurs="unbounded"
172                                                     namespace="##other" processContents="lax"/>
173                                           </xs:sequence>
174                                         </xs:complexType>
175                                       </xs:element>
176                                       <xs:any minOccurs="0" maxOccurs="unbounded"
177                                               namespace="##other" processContents="lax"/>
178                                     </xs:sequence>
179                                   </xs:complexType>
180                                   <xs:key name="key_termination-points_node_nodes_topology_topologies_network_termination-point">
181                                     <xs:selector xpath="topos:termination-point"/>
182                                     <xs:field xpath="topos:tp-id"/>
183                                   </xs:key>
184                                 </xs:element>
185                                 <xs:any minOccurs="0" maxOccurs="unbounded"
186                                         namespace="##other" processContents="lax"/>
187                               </xs:sequence>
188                             </xs:complexType>
189                           </xs:element>
190                           <xs:any minOccurs="0" maxOccurs="unbounded"
191                                   namespace="##other" processContents="lax"/>
192                         </xs:sequence>
193                       </xs:complexType>
194                       <xs:key name="key_nodes_topology_topologies_network_node">
195                         <xs:selector xpath="topos:node"/>
196                         <xs:field xpath="topos:node-id"/>
197                       </xs:key>
198                     </xs:element>
199                     <xs:element name="links" minOccurs="0">
200                       <xs:complexType>
201                         <xs:sequence>
202                           <xs:element name="link" minOccurs="0" maxOccurs="unbounded">
203                             <xs:annotation>
204                               <xs:documentation>
205
206                                 The Network Link which is defined by Local (Source) and
207                                 Remote (Destination) Network Nodes. Every link MUST be
208                                 defined either by identifier and his local and remote
209                                 Network Nodes (in real applications it is common that many
210                                 links are originated from one node and end up in same
211                                 remote node). To ensure that we would always know to
212                                 distinguish between links, every link SHOULD have
213                                 identifier.
214
215                               </xs:documentation>
216                             </xs:annotation>
217                             <xs:complexType>
218                               <xs:sequence>
219                                 <xs:element name="link-id"  type="link-id">
220                                 </xs:element>
221                                 <xs:element name="source" minOccurs="0">
222                                   <xs:complexType>
223                                     <xs:sequence>
224                                       <xs:element name="source-node" minOccurs="0"  type="node-ref">
225                                         <xs:annotation>
226                                           <xs:documentation>
227                                             Source node identifier.
228                                           </xs:documentation>
229                                         </xs:annotation>
230                                       </xs:element>
231                                       <xs:element name="source-tp" minOccurs="0"  type="tp-ref">
232                                       </xs:element>
233                                       <xs:any minOccurs="0" maxOccurs="unbounded"
234                                               namespace="##other" processContents="lax"/>
235                                     </xs:sequence>
236                                   </xs:complexType>
237                                 </xs:element>
238                                 <xs:element name="destination" minOccurs="0">
239                                   <xs:complexType>
240                                     <xs:sequence>
241                                       <xs:element name="dest-node" minOccurs="0"  type="node-ref">
242                                         <xs:annotation>
243                                           <xs:documentation>
244                                             Destination node identifier.
245                                           </xs:documentation>
246                                         </xs:annotation>
247                                       </xs:element>
248                                       <xs:element name="dest-tp" minOccurs="0"  type="tp-ref">
249                                       </xs:element>
250                                       <xs:any minOccurs="0" maxOccurs="unbounded"
251                                               namespace="##other" processContents="lax"/>
252                                     </xs:sequence>
253                                   </xs:complexType>
254                                 </xs:element>
255                                 <xs:any minOccurs="0" maxOccurs="unbounded"
256                                         namespace="##other" processContents="lax"/>
257                               </xs:sequence>
258                             </xs:complexType>
259                           </xs:element>
260                           <xs:any minOccurs="0" maxOccurs="unbounded"
261                                   namespace="##other" processContents="lax"/>
262                         </xs:sequence>
263                       </xs:complexType>
264                       <xs:key name="key_links_topology_topologies_network_link">
265                         <xs:selector xpath="topos:link"/>
266                         <xs:field xpath="topos:link-id"/>
267                       </xs:key>
268                     </xs:element>
269                     <xs:any minOccurs="0" maxOccurs="unbounded"
270                             namespace="##other" processContents="lax"/>
271                   </xs:sequence>
272                 </xs:complexType>
273               </xs:element>
274               <xs:any minOccurs="0" maxOccurs="unbounded"
275                       namespace="##other" processContents="lax"/>
276             </xs:sequence>
277           </xs:complexType>
278           <xs:key name="key_topologies_network_topology">
279             <xs:selector xpath="topos:topology"/>
280             <xs:field xpath="topos:topology-id"/>
281           </xs:key>
282         </xs:element>
283         <xs:element name="network-elements" minOccurs="0">
284           <xs:complexType>
285             <xs:sequence>
286               <xs:element name="network-element" minOccurs="0" maxOccurs="unbounded">
287                 <xs:complexType>
288                   <xs:sequence>
289                     <xs:element name="element-id"  type="element-id">
290                     </xs:element>
291                     <xs:any minOccurs="0" maxOccurs="unbounded"
292                             namespace="##other" processContents="lax"/>
293                   </xs:sequence>
294                 </xs:complexType>
295               </xs:element>
296               <xs:any minOccurs="0" maxOccurs="unbounded"
297                       namespace="##other" processContents="lax"/>
298             </xs:sequence>
299           </xs:complexType>
300           <xs:key name="key_network-elements_network_network-element">
301             <xs:selector xpath="topos:network-element"/>
302             <xs:field xpath="topos:element-id"/>
303           </xs:key>
304         </xs:element>
305         <xs:any minOccurs="0" maxOccurs="unbounded"
306                 namespace="##other" processContents="lax"/>
307       </xs:sequence>
308     </xs:complexType>
309   </xs:element>
310
311 </xs:schema>