1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:sig="http://www.w3.org/2000/09/xmldsig#">
3 <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="sig.xsd"/>
4 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
8 Copyright (c) 2005-2007 University of Utah and the Flux Group.
14 Definition of common data structures used for representing topologies -
15 shared between vtop (virtual topology) and ptop (physical topology)
19 <xs:element name="node_type">
22 <xs:extension base="NodeTypeContents">
23 <xs:attribute name="type_name" use="required">
25 <xs:documentation>Name of the type - will almost certainly not be unique</xs:documentation>
28 <xs:attribute name="type_slots" use="required">
30 <xs:documentation>How many virtual nodes of this type this physical node can
31 handle.</xs:documentation>
36 <xs:restriction base="xs:integer">
37 <xs:minInclusive value="0"/>
41 <xs:restriction base="xs:token">
42 <xs:enumeration value="unlimited"/>
48 <xs:attribute name="static">
50 <xs:documentation>element unlimited { empty }?,
51 A flag that indicates that this physical node *always*
52 has this type - a node is only allowed to have one dynamic
53 (ie. not flagged as static) type at a time, but any number
54 of static types at a time
55 element static { empty }?</xs:documentation>
58 <xs:restriction base="xs:token">
59 <xs:enumeration value="true"/>
67 <xs:complexType name="NodeTypeContents">
69 <xs:element minOccurs="0" maxOccurs="unbounded" ref="field"/>
72 <xs:group name="LinkTypeSpec">
74 <xs:documentation>Link types are currently just a siple string. They will almost certainly
75 have to get more complicated, for two reasons:
76 First, I want to allow virtual links to specify more than one type, so
77 that we can ask for links that are, say, 'ethernet or loopback'
78 Second, I want to have a lot more control over links that get mapped to
80 TODO: MAYBE this should be combined with NodeTypeSpec</xs:documentation>
83 <xs:element name="link_type">
85 <xs:attribute name="type_name" use="required"/>
90 <xs:group name="LinkEndPoints">
92 <xs:documentation>A link has two endpoints. Right now, they are order
93 independent. But they might become order-dependant later.</xs:documentation>
96 <xs:element ref="source_interface"/>
97 <xs:element ref="destination_interface"/>
100 <xs:element name="source_interface" type="InterfaceSpec">
102 <xs:documentation>First interface for this link</xs:documentation>
105 <xs:element name="destination_interface" type="InterfaceSpec">
107 <xs:documentation>Second interface for this link</xs:documentation>
110 <xs:group name="LinkCharacteristics">
112 <xs:documentation>Link characterstics which affect traffic.
113 TODO: In the future, the bandwidth, latency, and packet loss will be
114 moved to features and/or properties</xs:documentation>
117 <xs:element ref="bandwidth"/>
118 <xs:element ref="latency"/>
119 <xs:element ref="packet_loss"/>
122 <xs:element name="bandwidth">
124 <xs:documentation>Bandwidth of the link in kbps</xs:documentation>
127 <xs:restriction base="xs:float">
128 <xs:minExclusive value="0.0"/>
132 <xs:element name="latency">
134 <xs:documentation>Latency of the link in ms</xs:documentation>
137 <xs:restriction base="xs:float">
138 <xs:minInclusive value="0.0"/>
142 <xs:element name="packet_loss">
144 <xs:documentation>Static packet loss probability of the link as a fraction
145 (ie. 0.01 == 1%)</xs:documentation>
148 <xs:restriction base="xs:float">
149 <xs:minInclusive value="0.0"/>
153 <xs:element name="fd">
155 <xs:attribute name="fd_name" use="required">
157 <xs:documentation>Name of this feature or desire
158 element fd_name { text },</xs:documentation>
161 <xs:attribute name="fd_weight" use="required">
163 <xs:documentation>Weight assocated with the feature or desire
164 element fd_weight { xsd:float },</xs:documentation>
167 <xs:attribute name="violatable">
169 <xs:documentation>A flag indicating whether or not a failure to match the desire with a
170 a feature is a constraint violation
171 element violatable { empty }?,</xs:documentation>
174 <xs:restriction base="xs:token">
175 <xs:enumeration value="true"/>
179 <xs:attribute name="global_operator">
181 <xs:restriction base="xs:token">
182 <xs:enumeration value="OnceOnly"/>
183 <xs:enumeration value="FirstFree"/>
187 <xs:attribute name="local_operator">
189 <xs:restriction base="xs:token">
190 <xs:enumeration value="+"/>
196 <xs:attributeGroup name="GlobalSpec">
198 <xs:documentation>GlobalSpec = element global {
199 element operator { "OnceOnly" | "FirstFree" }
202 <xs:attribute name="global_operator" use="required">
204 <xs:restriction base="xs:token">
205 <xs:enumeration value="OnceOnly"/>
206 <xs:enumeration value="FirstFree"/>
211 <xs:attributeGroup name="LocalSpec">
213 <xs:documentation>LocalSpec = element local {
214 element operator { "+" }
215 attribute local_operator { "+" }
218 <xs:attribute name="local_operator" use="required">
220 <xs:restriction base="xs:token">
221 <xs:enumeration value="+"/>
226 <xs:complexType name="InterfaceSpec">
228 <xs:documentation>Interfaces
229 InterfaceSpec = element interface { InterfaceContents }</xs:documentation>
232 <xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
234 <xs:attribute name="node_name" use="required"/>
235 <xs:attribute name="interface_name" use="required"/>
236 <xs:attribute name="physical_node_name"/>
237 <xs:attribute name="physical_interface_name"/>
239 <xs:group name="InterfaceContents">
241 <xs:element ref="node_name"/>
242 <xs:element ref="interface_name"/>
243 <xs:element minOccurs="0" maxOccurs="unbounded" ref="property">
245 <xs:documentation>Properties of the interface</xs:documentation>
250 <xs:element name="node_name" type="xs:string">
252 <xs:documentation>Name of the node, which must match one of the nodes in this topology</xs:documentation>
255 <xs:element name="interface_name" type="xs:string">
257 <xs:documentation>Name of the interface itself</xs:documentation>
260 <xs:element name="property">
263 <xs:element ref="property_name"/>
264 <xs:element ref="property_value"/>
265 <xs:element ref="property_penalty"/>
266 <xs:element minOccurs="0" ref="violatable"/>
268 <xs:attribute name="global_operator">
270 <xs:restriction base="xs:token">
271 <xs:enumeration value="OnceOnly"/>
272 <xs:enumeration value="FirstFree"/>
276 <xs:attribute name="local_operator">
278 <xs:restriction base="xs:token">
279 <xs:enumeration value="+"/>
285 <xs:element name="property_name" type="xs:string">
287 <xs:documentation>Name of this property</xs:documentation>
290 <xs:element name="property_value" type="xs:string">
292 <xs:documentation>Value associated with this property
293 TODO: Add ranges and other types from rspec</xs:documentation>
296 <xs:element name="property_penalty">
298 <xs:documentation>The penalty associated with this property</xs:documentation>
301 <xs:restriction base="xs:float">
302 <xs:minInclusive value="0.0"/>
306 <xs:element name="violatable">
308 <xs:documentation>If this flag is present, not having the property is considered a violation</xs:documentation>