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