Merge lp:~justin-fathomdb/nova/check-xsd into lp:~hudson-openstack/nova/trunk
- check-xsd
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~justin-fathomdb/nova/check-xsd |
Merge into: | lp:~hudson-openstack/nova/trunk |
Prerequisite: | lp:~justin-fathomdb/nova/add-xsd |
Diff against target: |
4565 lines (+4364/-9) 24 files modified
nova/api/direct.py (+1/-3) nova/api/openstack/common.py (+49/-1) nova/api/openstack/schemas/v1.1/actions.xsd (+370/-0) nova/api/openstack/schemas/v1.1/api-common.xjb (+11/-0) nova/api/openstack/schemas/v1.1/api-common.xsd (+67/-0) nova/api/openstack/schemas/v1.1/api.xjb (+17/-0) nova/api/openstack/schemas/v1.1/api.xsd (+117/-0) nova/api/openstack/schemas/v1.1/atom.xjb (+11/-0) nova/api/openstack/schemas/v1.1/atom/atom.xsd (+115/-0) nova/api/openstack/schemas/v1.1/atom/xml.xsd (+287/-0) nova/api/openstack/schemas/v1.1/backup.xsd (+378/-0) nova/api/openstack/schemas/v1.1/common.xsd (+125/-0) nova/api/openstack/schemas/v1.1/extensions.xsd (+56/-0) nova/api/openstack/schemas/v1.1/faults.xsd (+482/-0) nova/api/openstack/schemas/v1.1/flavor.xsd (+156/-0) nova/api/openstack/schemas/v1.1/image.xsd (+286/-0) nova/api/openstack/schemas/v1.1/ipgroup.xsd (+231/-0) nova/api/openstack/schemas/v1.1/limits.xsd (+282/-0) nova/api/openstack/schemas/v1.1/server.xsd (+1010/-0) nova/api/openstack/schemas/v1.1/version.xsd (+200/-0) nova/api/openstack/validation.py (+85/-0) nova/tests/fake_flags.py (+6/-0) nova/wsgi.py (+21/-5) tools/pip-requires (+1/-0) |
To merge this branch: | bzr merge lp:~justin-fathomdb/nova/check-xsd |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mark Washenberger (community) | Needs Fixing | ||
Dan Prince (community) | Needs Fixing | ||
Todd Willey (community) | Needs Information | ||
Vish Ishaya (community) | Needs Information | ||
Review via email: mp+56658@code.launchpad.net |
Commit message
Validate XML output against schemas
Description of the change
Check XML schemas. By default, we just warn if XML output is invalid according to the schema. By tweaking flags, we can run XML even on JSON output and/or turn warnings into errors. That's in fake_flags.py, but is commented out for now because it just causes too many errors.
This has an additional pre-req branch lp:~justin-fathomdb/nova/bug740576 (XML namespace support)
Also, v1.1 schema checking is FUBAR: Bug #752929
Vish Ishaya (vishvananda) wrote : | # |
Why the change in api/direct.py? I don't think direct api uses a schema.
justinsb (justin-fathomdb) wrote : | # |
Removed the extraneous change to api/direct.py, by ensuring that default_xmlns was optional all the way up the callchain. I think I had it non-optional to "encourage" people to think about whether they should have a namespace :-)
Jay Pipes (jaypipes) wrote : | # |
As mentioned on IRC, I think this branch would be fine if the 1.1 XSD was removed. Let's try to focus on the 1.0 spec for Cactus.
Todd Willey (xtoddx) wrote : | # |
Where is the validate_xml flag actually used, in the case I want to turn off validation in production? Perhaps you're going to put it in the get_validator method in wsgi.py?
Dan Prince (dan-prince) wrote : | # |
This branch fails to merge with lp:nova:
Text conflict in nova/wsgi.py
Text conflict in tools/pip-requires
2 conflicts encountered.
Mark Washenberger (markwash) wrote : | # |
Now up to 3 conflicts:
Text conflict in nova/tests/
Text conflict in nova/wsgi.py
Text conflict in tools/pip-requires
3 conflicts encountered.
Setting to WIP in accordance with the policy Vish proposed.
Unmerged revisions
- 853. By justinsb
-
Made the _serialize default_xmlns argument optional, revert change to direct.py
- 852. By justinsb
-
Merged with lp:~justin-fathomdb/nova/bug740576 and thereby with trunk
- 851. By justinsb
-
For now, tolerate the stuff that's broken and dial back the tests so that we don't have to raise 200 bugs yet
- 850. By justinsb
-
Imported 1.1 schema from http://
bazaar. launchpad. net/~annegentle /openstack- manuals/ trunk/files/ head:/doc/ source/ docbkx/ openstack- compute- api/ - 849. By justinsb
-
Added validation code
- 848. By justinsb
-
Merged with trunk
- 847. By justinsb
-
Moved CloudServers v1.0 under nova/api/
openstack/ schemas - 846. By justinsb
-
Moved rackspace.xsd so that the relative URLs work
- 845. By justinsb
-
Added common.xsd that I had missed
- 844. By justinsb
-
Import of Rackspace CloudServers API v1.0 XSD
Preview Diff
1 | === modified file 'nova/api/direct.py' |
2 | --- nova/api/direct.py 2011-03-30 16:17:46 +0000 |
3 | +++ nova/api/direct.py 2011-04-07 17:22:59 +0000 |
4 | @@ -211,9 +211,7 @@ |
5 | return result |
6 | |
7 | try: |
8 | - content_type = req.best_match_content_type() |
9 | - default_xmlns = self.get_default_xmlns(req) |
10 | - return self._serialize(result, content_type, default_xmlns) |
11 | + return self._serialize(result, req.best_match_content_type()) |
12 | except: |
13 | raise exception.Error("returned non-serializable type: %s" |
14 | % result) |
15 | |
16 | === modified file 'nova/api/openstack/common.py' |
17 | --- nova/api/openstack/common.py 2011-03-30 17:05:06 +0000 |
18 | +++ nova/api/openstack/common.py 2011-04-07 17:22:59 +0000 |
19 | @@ -17,6 +17,8 @@ |
20 | |
21 | from urlparse import urlparse |
22 | |
23 | +from lxml import etree |
24 | +import os |
25 | import webob |
26 | |
27 | from nova import exception |
28 | @@ -136,6 +138,52 @@ |
29 | |
30 | |
31 | class OpenstackController(wsgi.Controller): |
32 | - def get_default_xmlns(self, req): |
33 | + def get_default_xmlns(self, _req): |
34 | # Use V10 by default |
35 | return XML_NS_V10 |
36 | + |
37 | + def get_validator(self, _req): |
38 | + # NOTE(justinsb): Avoid circular dependency. |
39 | + from nova.api.openstack import validation |
40 | + return validation.OutputValidator() |
41 | + |
42 | + |
43 | +def _load_schema_cloudservers_v10(): |
44 | + filename = os.path.join(os.path.dirname(__file__), |
45 | + 'schemas/v1.0/xsd/rackspace.xsd') |
46 | + |
47 | + schema_tree = etree.parse(filename) |
48 | + schema = etree.XMLSchema(etree=schema_tree) |
49 | + return schema |
50 | + |
51 | + |
52 | +def _load_schema_cloudservers_v11(): |
53 | + filename = os.path.join(os.path.dirname(__file__), |
54 | + 'schemas/v1.1/api.xsd') |
55 | + |
56 | + schema_tree = etree.parse(filename) |
57 | + schema = etree.XMLSchema(etree=schema_tree) |
58 | + return schema |
59 | + |
60 | + |
61 | +SCHEMA_CACHE = {} |
62 | + |
63 | + |
64 | +def load_xml_schema(xmlns): |
65 | + schema = SCHEMA_CACHE.get(xmlns, None) |
66 | + if not schema: |
67 | + if xmlns == XML_NS_V10: |
68 | + schema = _load_schema_cloudservers_v10() |
69 | + |
70 | + if xmlns == XML_NS_V11: |
71 | + try: |
72 | + schema = _load_schema_cloudservers_v11() |
73 | + except etree.XMLSchemaParseError as e: |
74 | + # NOTE(justinsb): Bug #752929 |
75 | + # NOTE(justinsb): So we're not doing any 1.1 validation |
76 | + LOG.warning("Ignoring known-error parsing CS 1.1 API: %s" % e) |
77 | + |
78 | + if schema: |
79 | + SCHEMA_CACHE[xmlns] = schema |
80 | + |
81 | + return schema |
82 | |
83 | === added directory 'nova/api/openstack/schemas/v1.1' |
84 | === added file 'nova/api/openstack/schemas/v1.1/actions.xsd' |
85 | --- nova/api/openstack/schemas/v1.1/actions.xsd 1970-01-01 00:00:00 +0000 |
86 | +++ nova/api/openstack/schemas/v1.1/actions.xsd 2011-04-07 17:22:59 +0000 |
87 | @@ -0,0 +1,370 @@ |
88 | +<?xml version="1.0" encoding="UTF-8"?> |
89 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
90 | + |
91 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
92 | + |
93 | + |
94 | +<schema |
95 | + elementFormDefault="qualified" |
96 | + attributeFormDefault="unqualified" |
97 | + xmlns="http://www.w3.org/2001/XMLSchema" |
98 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
99 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
100 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
101 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
102 | +> |
103 | + <annotation> |
104 | + <xsd:appinfo |
105 | + xml:lang="EN" |
106 | + xmlns="http://www.w3.org/1999/xhtml"> |
107 | + <xsdxt:title>Server Actions</xsdxt:title> |
108 | + <xsdxt:link rel="index" href="api.xsd" /> |
109 | + </xsd:appinfo> |
110 | + <xsd:documentation |
111 | + xml:lang="EN" |
112 | + xmlns="http://www.w3.org/1999/xhtml"> |
113 | + <p> |
114 | + This schema file defines actions that can be performed on a |
115 | + cloud server. All cloud server actions are derived from the <a |
116 | + href="#type_Action" title="See definition of |
117 | + Action">Action</a> type. |
118 | + </p> |
119 | + </xsd:documentation> |
120 | + </annotation> |
121 | + |
122 | + <include schemaLocation="server.xsd"> |
123 | + <annotation> |
124 | + <xsd:documentation |
125 | + xml:lang="EN" |
126 | + xmlns="http://www.w3.org/1999/xhtml"> |
127 | + <p> |
128 | + Types related to servers. |
129 | + </p> |
130 | + </xsd:documentation> |
131 | + </annotation> |
132 | + </include> |
133 | + |
134 | + <element name="reboot" type="csapi:Reboot"> |
135 | + <annotation> |
136 | + <xsd:documentation |
137 | + xml:lang="EN" |
138 | + xmlns="http://www.w3.org/1999/xhtml"> |
139 | + <p> |
140 | + Performs a HARD or SOFT reboot. |
141 | + </p> |
142 | + </xsd:documentation> |
143 | + <xsd:appinfo> |
144 | + <xsdxt:samples> |
145 | + <xsdxt:sample> |
146 | + <xsdxt:code type="application/xml" href="../samples/reboot.xml" /> |
147 | + </xsdxt:sample> |
148 | + <xsdxt:sample> |
149 | + <xsdxt:code type="application/json" href="../samples/reboot.json" /> |
150 | + </xsdxt:sample> |
151 | + </xsdxt:samples> |
152 | + </xsd:appinfo> |
153 | + </annotation> |
154 | + </element> |
155 | + <element name="rebuild" type="csapi:Rebuild"> |
156 | + <annotation> |
157 | + <xsd:documentation |
158 | + xml:lang="EN" |
159 | + xmlns="http://www.w3.org/1999/xhtml"> |
160 | + <p> |
161 | + Rebuilds a server. |
162 | + </p> |
163 | + </xsd:documentation> |
164 | + <xsd:appinfo> |
165 | + <xsdxt:samples> |
166 | + <xsdxt:sample> |
167 | + <xsdxt:code type="application/xml" href="../samples/rebuild.xml" /> |
168 | + </xsdxt:sample> |
169 | + <xsdxt:sample> |
170 | + <xsdxt:code type="application/json" href="../samples/rebuild.json" /> |
171 | + </xsdxt:sample> |
172 | + </xsdxt:samples> |
173 | + </xsd:appinfo> |
174 | + </annotation> |
175 | + </element> |
176 | + <element name="resize" type="csapi:Resize"> |
177 | + <annotation> |
178 | + <xsd:documentation |
179 | + xml:lang="EN" |
180 | + xmlns="http://www.w3.org/1999/xhtml"> |
181 | + <p> |
182 | + Resizes a server. |
183 | + </p> |
184 | + </xsd:documentation> |
185 | + <xsd:appinfo> |
186 | + <xsdxt:samples> |
187 | + <xsdxt:sample> |
188 | + <xsdxt:code type="application/xml" href="../samples/resize.xml" /> |
189 | + </xsdxt:sample> |
190 | + <xsdxt:sample> |
191 | + <xsdxt:code type="application/json" href="../samples/resize.json" /> |
192 | + </xsdxt:sample> |
193 | + </xsdxt:samples> |
194 | + </xsd:appinfo> |
195 | + </annotation> |
196 | + </element> |
197 | + <element name="confirmResize" type="csapi:ConfirmResize"> |
198 | + <annotation> |
199 | + <xsd:documentation |
200 | + xml:lang="EN" |
201 | + xmlns="http://www.w3.org/1999/xhtml"> |
202 | + <p> |
203 | + Confirms a resize action. |
204 | + </p> |
205 | + </xsd:documentation> |
206 | + <xsd:appinfo> |
207 | + <xsdxt:samples> |
208 | + <xsdxt:sample> |
209 | + <xsdxt:code type="application/xml" href="../samples/confirmresize.xml" /> |
210 | + </xsdxt:sample> |
211 | + <xsdxt:sample> |
212 | + <xsdxt:code type="application/json" href="../samples/confirmresize.json" /> |
213 | + </xsdxt:sample> |
214 | + </xsdxt:samples> |
215 | + </xsd:appinfo> |
216 | + </annotation> |
217 | + </element> |
218 | + <element name="revertResize" type="csapi:RevertResize"> |
219 | + <annotation> |
220 | + <xsd:documentation |
221 | + xml:lang="EN" |
222 | + xmlns="http://www.w3.org/1999/xhtml"> |
223 | + <p> |
224 | + Reverts a resize action. |
225 | + </p> |
226 | + </xsd:documentation> |
227 | + <xsd:appinfo> |
228 | + <xsdxt:samples> |
229 | + <xsdxt:sample> |
230 | + <xsdxt:code type="application/xml" href="../samples/revertresize.xml" /> |
231 | + </xsdxt:sample> |
232 | + <xsdxt:sample> |
233 | + <xsdxt:code type="application/json" href="../samples/revertresize.json" /> |
234 | + </xsdxt:sample> |
235 | + </xsdxt:samples> |
236 | + </xsd:appinfo> |
237 | + </annotation> |
238 | + </element> |
239 | + <element name="changePassword" type="csapi:ChangePassword"> |
240 | + <annotation> |
241 | + <xsd:documentation |
242 | + xml:lang="EN" |
243 | + xmlns="http://www.w3.org/1999/xhtml"> |
244 | + <p> |
245 | + Changes a server's password. |
246 | + </p> |
247 | + </xsd:documentation> |
248 | + <xsd:appinfo> |
249 | + <xsdxt:samples> |
250 | + <xsdxt:sample> |
251 | + <xsdxt:code type="application/xml" href="../samples/changepassword.xml" /> |
252 | + </xsdxt:sample> |
253 | + <xsdxt:sample> |
254 | + <xsdxt:code type="application/json" href="../samples/changepassword.json" /> |
255 | + </xsdxt:sample> |
256 | + </xsdxt:samples> |
257 | + </xsd:appinfo> |
258 | + </annotation> |
259 | + </element> |
260 | + |
261 | + <!-- Complex Types --> |
262 | + |
263 | + <complexType abstract="true" name="Action"> |
264 | + <annotation> |
265 | + <xsd:documentation |
266 | + xml:lang="EN" |
267 | + xmlns="http://www.w3.org/1999/xhtml"> |
268 | + <p> |
269 | + This is the base type for all server actions. It is simply |
270 | + a marker abstract type used to differentiate an Action |
271 | + element from other elements. |
272 | + </p> |
273 | + </xsd:documentation> |
274 | + </annotation> |
275 | + <anyAttribute namespace="##other" processContents="lax"/> |
276 | + </complexType> |
277 | + |
278 | + <complexType name="Reboot"> |
279 | + <complexContent> |
280 | + <extension base="csapi:Action"> |
281 | + <sequence> |
282 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
283 | + </sequence> |
284 | + <attribute name="type" type="csapi:RebootType" use="required"> |
285 | + <annotation> |
286 | + <xsd:documentation |
287 | + xml:lang="EN" |
288 | + xmlns="http://www.w3.org/1999/xhtml"> |
289 | + <p> |
290 | + The <a href="#type_RebootType" title="See definition |
291 | + of RebootType">type</a> of reboot to perform. |
292 | + </p> |
293 | + </xsd:documentation> |
294 | + </annotation> |
295 | + </attribute> |
296 | + </extension> |
297 | + </complexContent> |
298 | + </complexType> |
299 | + |
300 | + <complexType name="Rebuild"> |
301 | + <complexContent> |
302 | + <extension base="csapi:Action"> |
303 | + <sequence> |
304 | + <element name="metadata" type="csapi:Metadata" minOccurs="0"> |
305 | + <annotation> |
306 | + <xsd:documentation |
307 | + xml:lang="EN" |
308 | + xmlns="http://www.w3.org/1999/xhtml"> |
309 | + <p> |
310 | + A collection of meta data items |
311 | + associated with the server. If not |
312 | + specified the original server metadata |
313 | + will be kept. |
314 | + </p> |
315 | + </xsd:documentation> |
316 | + </annotation> |
317 | + </element> |
318 | + <element name="personality" type="csapi:Personality" minOccurs="0"> |
319 | + <annotation> |
320 | + <xsd:documentation |
321 | + xml:lang="EN" |
322 | + xmlns="http://www.w3.org/1999/xhtml"> |
323 | + <p> |
324 | + A collection of small <a |
325 | + href="#type_File" title="See definition |
326 | + of file">files</a> used to personalize a |
327 | + new server instance. Exisiting server |
328 | + personality files are deleted by the |
329 | + rebuild process. |
330 | + </p> |
331 | + </xsd:documentation> |
332 | + </annotation> |
333 | + </element> |
334 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
335 | + </sequence> |
336 | + <attribute type="xsd:string" name="name" use="optional"> |
337 | + <annotation> |
338 | + <xsd:documentation |
339 | + xml:lang="EN" |
340 | + xmlns="http://www.w3.org/1999/xhtml"> |
341 | + <p> |
342 | + The name of the server. If not specified the |
343 | + original server name will be kept. |
344 | + </p> |
345 | + </xsd:documentation> |
346 | + </annotation> |
347 | + </attribute> |
348 | + <attribute name="imageRef" type="xsd:anyURI" use="required"> |
349 | + <annotation> |
350 | + <xsd:documentation |
351 | + xml:lang="EN" |
352 | + xmlns="http://www.w3.org/1999/xhtml"> |
353 | + <p> |
354 | + A reference to an image to use for the rebuild. |
355 | + </p> |
356 | + </xsd:documentation> |
357 | + </annotation> |
358 | + </attribute> |
359 | + </extension> |
360 | + </complexContent> |
361 | + </complexType> |
362 | + |
363 | + <complexType name="Resize"> |
364 | + <complexContent> |
365 | + <extension base="csapi:Action"> |
366 | + <sequence> |
367 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
368 | + </sequence> |
369 | + <attribute name="flavorRef" type="xsd:anyURI" use="required"> |
370 | + <annotation> |
371 | + <xsd:documentation |
372 | + xml:lang="EN" |
373 | + xmlns="http://www.w3.org/1999/xhtml"> |
374 | + <p> |
375 | + The reference of the flavor to convert to. |
376 | + </p> |
377 | + </xsd:documentation> |
378 | + </annotation> |
379 | + </attribute> |
380 | + </extension> |
381 | + </complexContent> |
382 | + </complexType> |
383 | + |
384 | + <complexType name="ConfirmResize"> |
385 | + <complexContent> |
386 | + <extension base="csapi:Action"> |
387 | + <sequence> |
388 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
389 | + </sequence> |
390 | + </extension> |
391 | + </complexContent> |
392 | + </complexType> |
393 | + |
394 | + <complexType name="RevertResize"> |
395 | + <complexContent> |
396 | + <extension base="csapi:Action" > |
397 | + <sequence> |
398 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
399 | + </sequence> |
400 | + </extension> |
401 | + </complexContent> |
402 | + </complexType> |
403 | + |
404 | + <complexType name="ChangePassword"> |
405 | + <complexContent> |
406 | + <extension base="csapi:Action" > |
407 | + <sequence> |
408 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
409 | + </sequence> |
410 | + <attribute type="xsd:string" name="adminPass" use="required"> |
411 | + <annotation> |
412 | + <xsd:documentation |
413 | + xml:lang="EN" |
414 | + xmlns="http://www.w3.org/1999/xhtml"> |
415 | + <p> |
416 | + The server's administration password. |
417 | + </p> |
418 | + </xsd:documentation> |
419 | + </annotation> |
420 | + </attribute> |
421 | + </extension> |
422 | + </complexContent> |
423 | + </complexType> |
424 | + |
425 | + <!-- Simple Types --> |
426 | + <simpleType name="RebootType"> |
427 | + <restriction base="xsd:string"> |
428 | + <enumeration value="HARD"> |
429 | + <annotation> |
430 | + <xsd:documentation |
431 | + xml:lang="EN" |
432 | + xmlns="http://www.w3.org/1999/xhtml"> |
433 | + <p> |
434 | + A HARD reboot is equivalent to power cycling the server. |
435 | + The operating system is not allowed to gracefully |
436 | + shutdown. |
437 | + </p> |
438 | + </xsd:documentation> |
439 | + </annotation> |
440 | + </enumeration> |
441 | + <enumeration value="SOFT"> |
442 | + <annotation> |
443 | + <xsd:documentation |
444 | + xml:lang="EN" |
445 | + xmlns="http://www.w3.org/1999/xhtml"> |
446 | + <p> |
447 | + With a SOFT reboot, the operating system is signaled to |
448 | + restart. This allows for a graceful shutdown of all |
449 | + processes. |
450 | + </p> |
451 | + </xsd:documentation> |
452 | + </annotation> |
453 | + </enumeration> |
454 | + </restriction> |
455 | + </simpleType> |
456 | +</schema> |
457 | + |
458 | |
459 | === added file 'nova/api/openstack/schemas/v1.1/api-common.xjb' |
460 | --- nova/api/openstack/schemas/v1.1/api-common.xjb 1970-01-01 00:00:00 +0000 |
461 | +++ nova/api/openstack/schemas/v1.1/api-common.xjb 2011-04-07 17:22:59 +0000 |
462 | @@ -0,0 +1,11 @@ |
463 | +<?xml version="1.0" encoding="UTF-8"?> |
464 | + |
465 | +<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
466 | + xmlns:capi="http://docs.openstack.org/common/api/v1.0" version="2.0" |
467 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
468 | + xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" |
469 | + schemaLocation="api-common.xsd"> |
470 | + <schemaBindings> |
471 | + <package name="com.rackspace.cloud.common.api.beans" /> |
472 | + </schemaBindings> |
473 | +</bindings> |
474 | |
475 | === added file 'nova/api/openstack/schemas/v1.1/api-common.xsd' |
476 | --- nova/api/openstack/schemas/v1.1/api-common.xsd 1970-01-01 00:00:00 +0000 |
477 | +++ nova/api/openstack/schemas/v1.1/api-common.xsd 2011-04-07 17:22:59 +0000 |
478 | @@ -0,0 +1,67 @@ |
479 | +<?xml version="1.0" encoding="UTF-8"?> |
480 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
481 | + |
482 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
483 | + |
484 | + |
485 | +<schema |
486 | + elementFormDefault="qualified" |
487 | + attributeFormDefault="unqualified" |
488 | + xmlns="http://www.w3.org/2001/XMLSchema" |
489 | + xmlns:capi="http://docs.openstack.org/common/api/v1.0" |
490 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
491 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
492 | + targetNamespace="http://docs.openstack.org/common/api/v1.0" |
493 | +> |
494 | + <annotation> |
495 | + <xsd:appinfo |
496 | + xml:lang="EN" |
497 | + xmlns="http://www.w3.org/1999/xhtml"> |
498 | + <xsdxt:title>Open Stack Common API Schema Types 1.0</xsdxt:title> |
499 | + <xsdxt:link rev="index" href="extensions.xsd" /> |
500 | + <xsdxt:link rev="index" href="limits.xsd" /> |
501 | + <xsdxt:link rev="index" href="version.xsd" /> |
502 | + </xsd:appinfo> |
503 | + <xsd:documentation |
504 | + xml:lang="EN" |
505 | + xmlns="http://www.w3.org/1999/xhtml"> |
506 | + <p> |
507 | + This is the main index XML Schema document |
508 | + for Common API Schema Types Version 1.0. |
509 | + </p> |
510 | + </xsd:documentation> |
511 | + </annotation> |
512 | + <include schemaLocation="extensions.xsd"> |
513 | + <annotation> |
514 | + <xsd:documentation |
515 | + xml:lang="EN" |
516 | + xmlns="http://www.w3.org/1999/xhtml"> |
517 | + <p> |
518 | + Types related to extensions. |
519 | + </p> |
520 | + </xsd:documentation> |
521 | + </annotation> |
522 | + </include> |
523 | + <include schemaLocation="limits.xsd"> |
524 | + <annotation> |
525 | + <xsd:documentation |
526 | + xml:lang="EN" |
527 | + xmlns="http://www.w3.org/1999/xhtml"> |
528 | + <p> |
529 | + Types related to rate and absolute limits. |
530 | + </p> |
531 | + </xsd:documentation> |
532 | + </annotation> |
533 | + </include> |
534 | + <include schemaLocation="version.xsd"> |
535 | + <annotation> |
536 | + <xsd:documentation |
537 | + xml:lang="EN" |
538 | + xmlns="http://www.w3.org/1999/xhtml"> |
539 | + <p> |
540 | + Types related to API version details. |
541 | + </p> |
542 | + </xsd:documentation> |
543 | + </annotation> |
544 | + </include> |
545 | +</schema> |
546 | |
547 | === added file 'nova/api/openstack/schemas/v1.1/api.xjb' |
548 | --- nova/api/openstack/schemas/v1.1/api.xjb 1970-01-01 00:00:00 +0000 |
549 | +++ nova/api/openstack/schemas/v1.1/api.xjb 2011-04-07 17:22:59 +0000 |
550 | @@ -0,0 +1,17 @@ |
551 | +<?xml version="1.0" encoding="UTF-8"?> |
552 | + |
553 | +<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
554 | + xmlns:csapi="http://docs.openstack.org/servers/api/v1.0" version="2.0" |
555 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
556 | + xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" |
557 | + schemaLocation="api.xsd"> |
558 | + <globalBindings> |
559 | + <serializable /> |
560 | + <javaType name="java.util.Calendar" xmlType="xsd:dateTime" |
561 | + parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime" |
562 | + printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/> |
563 | + </globalBindings> |
564 | + <schemaBindings> |
565 | + <package name="com.rackspace.cloud.servers.api.beans" /> |
566 | + </schemaBindings> |
567 | +</bindings> |
568 | |
569 | === added file 'nova/api/openstack/schemas/v1.1/api.xsd' |
570 | --- nova/api/openstack/schemas/v1.1/api.xsd 1970-01-01 00:00:00 +0000 |
571 | +++ nova/api/openstack/schemas/v1.1/api.xsd 2011-04-07 17:22:59 +0000 |
572 | @@ -0,0 +1,117 @@ |
573 | +<?xml version="1.0" encoding="UTF-8"?> |
574 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
575 | + |
576 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
577 | + |
578 | + |
579 | +<schema |
580 | + elementFormDefault="qualified" |
581 | + attributeFormDefault="unqualified" |
582 | + xmlns="http://www.w3.org/2001/XMLSchema" |
583 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
584 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
585 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
586 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
587 | +> |
588 | + <annotation> |
589 | + <xsd:appinfo |
590 | + xml:lang="EN" |
591 | + xmlns="http://www.w3.org/1999/xhtml"> |
592 | + <xsdxt:title>Open Stack Compute™ API Schema Types 1.1</xsdxt:title> |
593 | + <xsdxt:link rev="index" href="actions.xsd" /> |
594 | + <xsdxt:link rev="index" href="backup.xsd" /> |
595 | + <xsdxt:link rev="index" href="common.xsd" /> |
596 | + <xsdxt:link rev="index" href="faults.xsd" /> |
597 | + <xsdxt:link rev="index" href="flavor.xsd" /> |
598 | + <xsdxt:link rev="index" href="image.xsd" /> |
599 | + <xsdxt:link rev="index" href="ipgroup.xsd" /> |
600 | + <xsdxt:link rev="index" href="server.xsd" /> |
601 | + </xsd:appinfo> |
602 | + <xsd:documentation |
603 | + xml:lang="EN" |
604 | + xmlns="http://www.w3.org/1999/xhtml"> |
605 | + <p> |
606 | + This is the main index XML Schema document |
607 | + for the Open Stack Compute API Version 1.1. |
608 | + </p> |
609 | + </xsd:documentation> |
610 | + </annotation> |
611 | + <include schemaLocation="server.xsd"> |
612 | + <annotation> |
613 | + <xsd:documentation |
614 | + xml:lang="EN" |
615 | + xmlns="http://www.w3.org/1999/xhtml"> |
616 | + <p> |
617 | + Servers and all internal Entities including: Addresses, |
618 | + Files, and MetaData. |
619 | + </p> |
620 | + </xsd:documentation> |
621 | + </annotation> |
622 | + </include> |
623 | + <include schemaLocation="image.xsd"> |
624 | + <annotation> |
625 | + <xsd:documentation |
626 | + xml:lang="EN" |
627 | + xmlns="http://www.w3.org/1999/xhtml"> |
628 | + <p> |
629 | + Types related to images. |
630 | + </p> |
631 | + </xsd:documentation> |
632 | + </annotation> |
633 | + </include> |
634 | + <include schemaLocation="flavor.xsd"> |
635 | + <annotation> |
636 | + <xsd:documentation |
637 | + xml:lang="EN" |
638 | + xmlns="http://www.w3.org/1999/xhtml"> |
639 | + <p> |
640 | + Types related to flavors. |
641 | + </p> |
642 | + </xsd:documentation> |
643 | + </annotation> |
644 | + </include> |
645 | + <include schemaLocation="ipgroup.xsd"> |
646 | + <annotation> |
647 | + <xsd:documentation |
648 | + xml:lang="EN" |
649 | + xmlns="http://www.w3.org/1999/xhtml"> |
650 | + <p> |
651 | + Types related to shared IP groups. |
652 | + </p> |
653 | + </xsd:documentation> |
654 | + </annotation> |
655 | + </include> |
656 | + <include schemaLocation="backup.xsd"> |
657 | + <annotation> |
658 | + <xsd:documentation |
659 | + xml:lang="EN" |
660 | + xmlns="http://www.w3.org/1999/xhtml"> |
661 | + <p> |
662 | + Types related to backup schedules. |
663 | + </p> |
664 | + </xsd:documentation> |
665 | + </annotation> |
666 | + </include> |
667 | + <include schemaLocation="actions.xsd"> |
668 | + <annotation> |
669 | + <xsd:documentation |
670 | + xml:lang="EN" |
671 | + xmlns="http://www.w3.org/1999/xhtml"> |
672 | + <p> |
673 | + Defines server actions: reboot, rebuild, resize... |
674 | + </p> |
675 | + </xsd:documentation> |
676 | + </annotation> |
677 | + </include> |
678 | + <include schemaLocation="faults.xsd"> |
679 | + <annotation> |
680 | + <xsd:documentation |
681 | + xml:lang="EN" |
682 | + xmlns="http://www.w3.org/1999/xhtml"> |
683 | + <p> |
684 | + All fault types. |
685 | + </p> |
686 | + </xsd:documentation> |
687 | + </annotation> |
688 | + </include> |
689 | +</schema> |
690 | |
691 | === added directory 'nova/api/openstack/schemas/v1.1/atom' |
692 | === added file 'nova/api/openstack/schemas/v1.1/atom.xjb' |
693 | --- nova/api/openstack/schemas/v1.1/atom.xjb 1970-01-01 00:00:00 +0000 |
694 | +++ nova/api/openstack/schemas/v1.1/atom.xjb 2011-04-07 17:22:59 +0000 |
695 | @@ -0,0 +1,11 @@ |
696 | +<?xml version="1.0" encoding="UTF-8"?> |
697 | + |
698 | +<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
699 | + version="2.0" |
700 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
701 | + xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" |
702 | + schemaLocation="atom/atom.xsd"> |
703 | + <schemaBindings> |
704 | + <package name="org.w3.www.atom"/> |
705 | + </schemaBindings> |
706 | +</bindings> |
707 | |
708 | === added file 'nova/api/openstack/schemas/v1.1/atom/atom.xsd' |
709 | --- nova/api/openstack/schemas/v1.1/atom/atom.xsd 1970-01-01 00:00:00 +0000 |
710 | +++ nova/api/openstack/schemas/v1.1/atom/atom.xsd 2011-04-07 17:22:59 +0000 |
711 | @@ -0,0 +1,115 @@ |
712 | +<?xml version="1.0" encoding="UTF-8"?> |
713 | + |
714 | +<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" |
715 | + targetNamespace="http://www.w3.org/2005/Atom" |
716 | + xmlns:html="http://www.w3.org/1999/xhtml" |
717 | + xmlns:atom="http://www.w3.org/2005/Atom" |
718 | + xmlns:xml="http://www.w3.org/XML/1998/namespace" |
719 | + xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
720 | + |
721 | + <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> |
722 | + |
723 | + <xs:simpleType name="relation"> |
724 | + <xs:restriction base="xs:string"> |
725 | + <xs:enumeration value="alternate" /> |
726 | + <xs:enumeration value="appendix" /> |
727 | + <xs:enumeration value="archives" /> |
728 | + <xs:enumeration value="author" /> |
729 | + <xs:enumeration value="bookmark" /> |
730 | + <xs:enumeration value="chapter" /> |
731 | + <xs:enumeration value="contents" /> |
732 | + <xs:enumeration value="copyright" /> |
733 | + <xs:enumeration value="current" /> |
734 | + <xs:enumeration value="describedby" /> |
735 | + <xs:enumeration value="edit" /> |
736 | + <xs:enumeration value="edit-media" /> |
737 | + <xs:enumeration value="first" /> |
738 | + <xs:enumeration value="glossary" /> |
739 | + <xs:enumeration value="help" /> |
740 | + <xs:enumeration value="hub" /> |
741 | + <xs:enumeration value="icon" /> |
742 | + <xs:enumeration value="index" /> |
743 | + <xs:enumeration value="last" /> |
744 | + <xs:enumeration value="latest-version" /> |
745 | + <xs:enumeration value="license" /> |
746 | + <xs:enumeration value="monitor" /> |
747 | + <xs:enumeration value="monitor-group" /> |
748 | + <xs:enumeration value="next" /> |
749 | + <xs:enumeration value="next-arvhice" /> |
750 | + <xs:enumeration value="nofollow" /> |
751 | + <xs:enumeration value="payment" /> |
752 | + <xs:enumeration value="predecessor-version" /> |
753 | + <xs:enumeration value="prefetch" /> |
754 | + <xs:enumeration value="prev" /> |
755 | + <xs:enumeration value="previous" /> |
756 | + <xs:enumeration value="prev-archive" /> |
757 | + <xs:enumeration value="replies" /> |
758 | + <xs:enumeration value="search" /> |
759 | + <xs:enumeration value="section" /> |
760 | + <xs:enumeration value="self" /> |
761 | + <xs:enumeration value="service" /> |
762 | + <xs:enumeration value="start" /> |
763 | + <xs:enumeration value="stylesheet" /> |
764 | + <xs:enumeration value="subsection" /> |
765 | + <xs:enumeration value="successor-version" /> |
766 | + <xs:enumeration value="up" /> |
767 | + <xs:enumeration value="version-history" /> |
768 | + <xs:enumeration value="via" /> |
769 | + <xs:enumeration value="working-copy" /> |
770 | + <xs:enumeration value="working-copy-of" /> |
771 | + </xs:restriction> |
772 | + </xs:simpleType> |
773 | + |
774 | + <xs:element name="link" type="atom:link" /> |
775 | + |
776 | + <xs:complexType name="link"> |
777 | + <xs:annotation> |
778 | + <xs:documentation> |
779 | + <html:p>See section 3.4 of the ATOM RFC <html:a href="http://tools.ietf.org/html/rfc4287">RFC4287</html:a></html:p> |
780 | + </xs:documentation> |
781 | + </xs:annotation> |
782 | + |
783 | + <xs:attribute name="rel" use="required" type="atom:relation"> |
784 | + <xs:annotation> |
785 | + <xs:documentation> |
786 | + <html:p>TODO</html:p> |
787 | + </xs:documentation> |
788 | + </xs:annotation> |
789 | + </xs:attribute> |
790 | + |
791 | + <xs:attribute name="type" use="optional" type="xs:string"> |
792 | + <xs:annotation> |
793 | + <xs:documentation> |
794 | + <html:p>TODO</html:p> |
795 | + </xs:documentation> |
796 | + </xs:annotation> |
797 | + </xs:attribute> |
798 | + |
799 | + <xs:attribute name="href" use="required" type="xs:anyURI"> |
800 | + <xs:annotation> |
801 | + <xs:documentation> |
802 | + <html:p>TODO</html:p> |
803 | + </xs:documentation> |
804 | + </xs:annotation> |
805 | + </xs:attribute> |
806 | + |
807 | + <xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN"> |
808 | + <xs:annotation> |
809 | + <xs:documentation> |
810 | + <html:p>TODO</html:p> |
811 | + </xs:documentation> |
812 | + </xs:annotation> |
813 | + </xs:attribute> |
814 | + |
815 | + <xs:attribute name="title" use="optional" type="xs:string"> |
816 | + <xs:annotation> |
817 | + <xs:documentation> |
818 | + <html:p>TODO</html:p> |
819 | + </xs:documentation> |
820 | + </xs:annotation> |
821 | + </xs:attribute> |
822 | + |
823 | + <xs:attribute ref="xml:base" /> |
824 | + <xs:attribute ref="xml:lang" /> |
825 | + </xs:complexType> |
826 | +</xs:schema> |
827 | |
828 | === added file 'nova/api/openstack/schemas/v1.1/atom/xml.xsd' |
829 | --- nova/api/openstack/schemas/v1.1/atom/xml.xsd 1970-01-01 00:00:00 +0000 |
830 | +++ nova/api/openstack/schemas/v1.1/atom/xml.xsd 2011-04-07 17:22:59 +0000 |
831 | @@ -0,0 +1,287 @@ |
832 | +<?xml version='1.0'?> |
833 | +<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?> |
834 | +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" |
835 | + xmlns:xs="http://www.w3.org/2001/XMLSchema" |
836 | + xmlns ="http://www.w3.org/1999/xhtml" |
837 | + xml:lang="en"> |
838 | + |
839 | + <xs:annotation> |
840 | + <xs:documentation> |
841 | + <div> |
842 | + <h1>About the XML namespace</h1> |
843 | + |
844 | + <div class="bodytext"> |
845 | + <p> |
846 | + This schema document describes the XML namespace, in a form |
847 | + suitable for import by other schema documents. |
848 | + </p> |
849 | + <p> |
850 | + See <a href="http://www.w3.org/XML/1998/namespace.html"> |
851 | + http://www.w3.org/XML/1998/namespace.html</a> and |
852 | + <a href="http://www.w3.org/TR/REC-xml"> |
853 | + http://www.w3.org/TR/REC-xml</a> for information |
854 | + about this namespace. |
855 | + </p> |
856 | + <p> |
857 | + Note that local names in this namespace are intended to be |
858 | + defined only by the World Wide Web Consortium or its subgroups. |
859 | + The names currently defined in this namespace are listed below. |
860 | + They should not be used with conflicting semantics by any Working |
861 | + Group, specification, or document instance. |
862 | + </p> |
863 | + <p> |
864 | + See further below in this document for more information about <a |
865 | + href="#usage">how to refer to this schema document from your own |
866 | + XSD schema documents</a> and about <a href="#nsversioning">the |
867 | + namespace-versioning policy governing this schema document</a>. |
868 | + </p> |
869 | + </div> |
870 | + </div> |
871 | + </xs:documentation> |
872 | + </xs:annotation> |
873 | + |
874 | + <xs:attribute name="lang"> |
875 | + <xs:annotation> |
876 | + <xs:documentation> |
877 | + <div> |
878 | + |
879 | + <h3>lang (as an attribute name)</h3> |
880 | + <p> |
881 | + denotes an attribute whose value |
882 | + is a language code for the natural language of the content of |
883 | + any element; its value is inherited. This name is reserved |
884 | + by virtue of its definition in the XML specification.</p> |
885 | + |
886 | + </div> |
887 | + <div> |
888 | + <h4>Notes</h4> |
889 | + <p> |
890 | + Attempting to install the relevant ISO 2- and 3-letter |
891 | + codes as the enumerated possible values is probably never |
892 | + going to be a realistic possibility. |
893 | + </p> |
894 | + <p> |
895 | + See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> |
896 | + http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> |
897 | + and the IANA language subtag registry at |
898 | + <a href="http://www.iana.org/assignments/language-subtag-registry"> |
899 | + http://www.iana.org/assignments/language-subtag-registry</a> |
900 | + for further information. |
901 | + </p> |
902 | + <p> |
903 | + The union allows for the 'un-declaration' of xml:lang with |
904 | + the empty string. |
905 | + </p> |
906 | + </div> |
907 | + </xs:documentation> |
908 | + </xs:annotation> |
909 | + <xs:simpleType> |
910 | + <xs:union memberTypes="xs:language"> |
911 | + <xs:simpleType> |
912 | + <xs:restriction base="xs:string"> |
913 | + <xs:enumeration value=""/> |
914 | + </xs:restriction> |
915 | + </xs:simpleType> |
916 | + </xs:union> |
917 | + </xs:simpleType> |
918 | + </xs:attribute> |
919 | + |
920 | + <xs:attribute name="space"> |
921 | + <xs:annotation> |
922 | + <xs:documentation> |
923 | + <div> |
924 | + |
925 | + <h3>space (as an attribute name)</h3> |
926 | + <p> |
927 | + denotes an attribute whose |
928 | + value is a keyword indicating what whitespace processing |
929 | + discipline is intended for the content of the element; its |
930 | + value is inherited. This name is reserved by virtue of its |
931 | + definition in the XML specification.</p> |
932 | + |
933 | + </div> |
934 | + </xs:documentation> |
935 | + </xs:annotation> |
936 | + <xs:simpleType> |
937 | + <xs:restriction base="xs:NCName"> |
938 | + <xs:enumeration value="default"/> |
939 | + <xs:enumeration value="preserve"/> |
940 | + </xs:restriction> |
941 | + </xs:simpleType> |
942 | + </xs:attribute> |
943 | + |
944 | + <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> |
945 | + <xs:documentation> |
946 | + <div> |
947 | + |
948 | + <h3>base (as an attribute name)</h3> |
949 | + <p> |
950 | + denotes an attribute whose value |
951 | + provides a URI to be used as the base for interpreting any |
952 | + relative URIs in the scope of the element on which it |
953 | + appears; its value is inherited. This name is reserved |
954 | + by virtue of its definition in the XML Base specification.</p> |
955 | + |
956 | + <p> |
957 | + See <a |
958 | + href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> |
959 | + for information about this attribute. |
960 | + </p> |
961 | + </div> |
962 | + </xs:documentation> |
963 | + </xs:annotation> |
964 | + </xs:attribute> |
965 | + |
966 | + <xs:attribute name="id" type="xs:ID"> |
967 | + <xs:annotation> |
968 | + <xs:documentation> |
969 | + <div> |
970 | + |
971 | + <h3>id (as an attribute name)</h3> |
972 | + <p> |
973 | + denotes an attribute whose value |
974 | + should be interpreted as if declared to be of type ID. |
975 | + This name is reserved by virtue of its definition in the |
976 | + xml:id specification.</p> |
977 | + |
978 | + <p> |
979 | + See <a |
980 | + href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> |
981 | + for information about this attribute. |
982 | + </p> |
983 | + </div> |
984 | + </xs:documentation> |
985 | + </xs:annotation> |
986 | + </xs:attribute> |
987 | + |
988 | + <xs:attributeGroup name="specialAttrs"> |
989 | + <xs:attribute ref="xml:base"/> |
990 | + <xs:attribute ref="xml:lang"/> |
991 | + <xs:attribute ref="xml:space"/> |
992 | + <xs:attribute ref="xml:id"/> |
993 | + </xs:attributeGroup> |
994 | + |
995 | + <xs:annotation> |
996 | + <xs:documentation> |
997 | + <div> |
998 | + |
999 | + <h3>Father (in any context at all)</h3> |
1000 | + |
1001 | + <div class="bodytext"> |
1002 | + <p> |
1003 | + denotes Jon Bosak, the chair of |
1004 | + the original XML Working Group. This name is reserved by |
1005 | + the following decision of the W3C XML Plenary and |
1006 | + XML Coordination groups: |
1007 | + </p> |
1008 | + <blockquote> |
1009 | + <p> |
1010 | + In appreciation for his vision, leadership and |
1011 | + dedication the W3C XML Plenary on this 10th day of |
1012 | + February, 2000, reserves for Jon Bosak in perpetuity |
1013 | + the XML name "xml:Father". |
1014 | + </p> |
1015 | + </blockquote> |
1016 | + </div> |
1017 | + </div> |
1018 | + </xs:documentation> |
1019 | + </xs:annotation> |
1020 | + |
1021 | + <xs:annotation> |
1022 | + <xs:documentation> |
1023 | + <div xml:id="usage" id="usage"> |
1024 | + <h2><a name="usage">About this schema document</a></h2> |
1025 | + |
1026 | + <div class="bodytext"> |
1027 | + <p> |
1028 | + This schema defines attributes and an attribute group suitable |
1029 | + for use by schemas wishing to allow <code>xml:base</code>, |
1030 | + <code>xml:lang</code>, <code>xml:space</code> or |
1031 | + <code>xml:id</code> attributes on elements they define. |
1032 | + </p> |
1033 | + <p> |
1034 | + To enable this, such a schema must import this schema for |
1035 | + the XML namespace, e.g. as follows: |
1036 | + </p> |
1037 | + <pre> |
1038 | + <schema . . .> |
1039 | + . . . |
1040 | + <import namespace="http://www.w3.org/XML/1998/namespace" |
1041 | + schemaLocation="http://www.w3.org/2001/xml.xsd"/> |
1042 | + </pre> |
1043 | + <p> |
1044 | + or |
1045 | + </p> |
1046 | + <pre> |
1047 | + <import namespace="http://www.w3.org/XML/1998/namespace" |
1048 | + schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> |
1049 | + </pre> |
1050 | + <p> |
1051 | + Subsequently, qualified reference to any of the attributes or the |
1052 | + group defined below will have the desired effect, e.g. |
1053 | + </p> |
1054 | + <pre> |
1055 | + <type . . .> |
1056 | + . . . |
1057 | + <attributeGroup ref="xml:specialAttrs"/> |
1058 | + </pre> |
1059 | + <p> |
1060 | + will define a type which will schema-validate an instance element |
1061 | + with any of those attributes. |
1062 | + </p> |
1063 | + </div> |
1064 | + </div> |
1065 | + </xs:documentation> |
1066 | + </xs:annotation> |
1067 | + |
1068 | + <xs:annotation> |
1069 | + <xs:documentation> |
1070 | + <div id="nsversioning" xml:id="nsversioning"> |
1071 | + <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> |
1072 | + <div class="bodytext"> |
1073 | + <p> |
1074 | + In keeping with the XML Schema WG's standard versioning |
1075 | + policy, this schema document will persist at |
1076 | + <a href="http://www.w3.org/2009/01/xml.xsd"> |
1077 | + http://www.w3.org/2009/01/xml.xsd</a>. |
1078 | + </p> |
1079 | + <p> |
1080 | + At the date of issue it can also be found at |
1081 | + <a href="http://www.w3.org/2001/xml.xsd"> |
1082 | + http://www.w3.org/2001/xml.xsd</a>. |
1083 | + </p> |
1084 | + <p> |
1085 | + The schema document at that URI may however change in the future, |
1086 | + in order to remain compatible with the latest version of XML |
1087 | + Schema itself, or with the XML namespace itself. In other words, |
1088 | + if the XML Schema or XML namespaces change, the version of this |
1089 | + document at <a href="http://www.w3.org/2001/xml.xsd"> |
1090 | + http://www.w3.org/2001/xml.xsd |
1091 | + </a> |
1092 | + will change accordingly; the version at |
1093 | + <a href="http://www.w3.org/2009/01/xml.xsd"> |
1094 | + http://www.w3.org/2009/01/xml.xsd |
1095 | + </a> |
1096 | + will not change. |
1097 | + </p> |
1098 | + <p> |
1099 | + Previous dated (and unchanging) versions of this schema |
1100 | + document are at: |
1101 | + </p> |
1102 | + <ul> |
1103 | + <li><a href="http://www.w3.org/2009/01/xml.xsd"> |
1104 | + http://www.w3.org/2009/01/xml.xsd</a></li> |
1105 | + <li><a href="http://www.w3.org/2007/08/xml.xsd"> |
1106 | + http://www.w3.org/2007/08/xml.xsd</a></li> |
1107 | + <li><a href="http://www.w3.org/2004/10/xml.xsd"> |
1108 | + http://www.w3.org/2004/10/xml.xsd</a></li> |
1109 | + <li><a href="http://www.w3.org/2001/03/xml.xsd"> |
1110 | + http://www.w3.org/2001/03/xml.xsd</a></li> |
1111 | + </ul> |
1112 | + </div> |
1113 | + </div> |
1114 | + </xs:documentation> |
1115 | + </xs:annotation> |
1116 | + |
1117 | +</xs:schema> |
1118 | + |
1119 | |
1120 | === added file 'nova/api/openstack/schemas/v1.1/backup.xsd' |
1121 | --- nova/api/openstack/schemas/v1.1/backup.xsd 1970-01-01 00:00:00 +0000 |
1122 | +++ nova/api/openstack/schemas/v1.1/backup.xsd 2011-04-07 17:22:59 +0000 |
1123 | @@ -0,0 +1,378 @@ |
1124 | +<?xml version="1.0" encoding="UTF-8"?> |
1125 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
1126 | + |
1127 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
1128 | + |
1129 | +<schema |
1130 | + elementFormDefault="qualified" |
1131 | + attributeFormDefault="unqualified" |
1132 | + xmlns="http://www.w3.org/2001/XMLSchema" |
1133 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
1134 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
1135 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
1136 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
1137 | +> |
1138 | + |
1139 | + <annotation> |
1140 | + <xsd:appinfo |
1141 | + xml:lang="EN" |
1142 | + xmlns="http://www.w3.org/1999/xhtml"> |
1143 | + <xsdxt:title>Backup Schedule</xsdxt:title> |
1144 | + <xsdxt:link rel="index" href="api.xsd" /> |
1145 | + </xsd:appinfo> |
1146 | + <xsd:documentation |
1147 | + xml:lang="EN" |
1148 | + xmlns="http://www.w3.org/1999/xhtml"> |
1149 | + <p> |
1150 | + This schema file defines all entities related to <a |
1151 | + href="#type_BackupSchedule" title="See definition of |
1152 | + BackupSchedule">Backup Schedules</a>. |
1153 | + </p> |
1154 | + </xsd:documentation> |
1155 | + </annotation> |
1156 | + |
1157 | + <element name="backupSchedule" type="csapi:BackupSchedule"> |
1158 | + <annotation> |
1159 | + <xsd:documentation |
1160 | + xml:lang="EN" |
1161 | + xmlns="http://www.w3.org/1999/xhtml"> |
1162 | + <p> |
1163 | + This element is used to create periodic daily and weekly |
1164 | + images automatically. |
1165 | + </p> |
1166 | + </xsd:documentation> |
1167 | + <xsd:appinfo> |
1168 | + <xsdxt:samples> |
1169 | + <xsdxt:sample> |
1170 | + <xsdxt:code type="application/xml" href="../samples/backup.xml" /> |
1171 | + </xsdxt:sample> |
1172 | + <xsdxt:sample> |
1173 | + <xsdxt:code type="application/json" href="../samples/backup.json" /> |
1174 | + </xsdxt:sample> |
1175 | + </xsdxt:samples> |
1176 | + </xsd:appinfo> |
1177 | + </annotation> |
1178 | + </element> |
1179 | + |
1180 | + <!-- Complex Types --> |
1181 | + <complexType name="BackupSchedule"> |
1182 | + <sequence> |
1183 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
1184 | + </sequence> |
1185 | + <attribute type="xsd:boolean" name="enabled" use="required"> |
1186 | + <annotation> |
1187 | + <xsd:documentation |
1188 | + xml:lang="EN" |
1189 | + xmlns="http://www.w3.org/1999/xhtml"> |
1190 | + <p> |
1191 | + If true, both daily and weekly backup schedules are |
1192 | + disabled. |
1193 | + </p> |
1194 | + </xsd:documentation> |
1195 | + </annotation> |
1196 | + </attribute> |
1197 | + <attribute type="csapi:WeeklyBackup" name="weekly" use="required"> |
1198 | + <annotation> |
1199 | + <xsd:documentation |
1200 | + xml:lang="EN" |
1201 | + xmlns="http://www.w3.org/1999/xhtml"> |
1202 | + <p> |
1203 | + A <a href="#type_WeeklyBackup" title="See definition of |
1204 | + WeeklyBackup">WeeklyBackup</a> type that describes the day |
1205 | + of the week in which to perform a weekly backup or |
1206 | + DISABLED if weekly backups are disabled. |
1207 | + </p> |
1208 | + </xsd:documentation> |
1209 | + </annotation> |
1210 | + </attribute> |
1211 | + <attribute type="csapi:DailyBackup" name="daily" use="required"> |
1212 | + <annotation> |
1213 | + <xsd:documentation |
1214 | + xml:lang="EN" |
1215 | + xmlns="http://www.w3.org/1999/xhtml"> |
1216 | + <p> |
1217 | + A <a href="#type_DailyBackup" title="See definition of |
1218 | + DailyBackup">DailyBackup</a> type that describes an hour |
1219 | + range in which to perform a daily backup or DISABLED if |
1220 | + daily backups are disabled. |
1221 | + </p> |
1222 | + </xsd:documentation> |
1223 | + </annotation> |
1224 | + </attribute> |
1225 | + <anyAttribute namespace="##other" processContents="lax"/> |
1226 | + </complexType> |
1227 | + |
1228 | + <!-- Simple Types --> |
1229 | + <simpleType name="DailyBackup"> |
1230 | + <annotation> |
1231 | + <xsd:documentation |
1232 | + xml:lang="EN" |
1233 | + xmlns="http://www.w3.org/1999/xhtml"> |
1234 | + <p> |
1235 | + A target GMT hour range in which to perform a daily backup |
1236 | + or DISABLED if daily backups are disabled. |
1237 | + </p> |
1238 | + </xsd:documentation> |
1239 | + </annotation> |
1240 | + <restriction base="xsd:string"> |
1241 | + <enumeration value="DISABLED"> |
1242 | + <annotation> |
1243 | + <xsd:documentation |
1244 | + xml:lang="EN" |
1245 | + xmlns="http://www.w3.org/1999/xhtml"> |
1246 | + <p> |
1247 | + Daily backups are disabled. |
1248 | + </p> |
1249 | + </xsd:documentation> |
1250 | + </annotation> |
1251 | + </enumeration> |
1252 | + <enumeration value="H_0000_0200"> |
1253 | + <annotation> |
1254 | + <xsd:documentation |
1255 | + xml:lang="EN" |
1256 | + xmlns="http://www.w3.org/1999/xhtml"> |
1257 | + <p> |
1258 | + Daily backup target of 00:00–02:00 GMT. |
1259 | + </p> |
1260 | + </xsd:documentation> |
1261 | + </annotation> |
1262 | + </enumeration> |
1263 | + <enumeration value="H_0200_0400"> |
1264 | + <annotation> |
1265 | + <xsd:documentation |
1266 | + xml:lang="EN" |
1267 | + xmlns="http://www.w3.org/1999/xhtml"> |
1268 | + <p> |
1269 | + Daily backup target of 02:00–04:00 GMT. |
1270 | + </p> |
1271 | + </xsd:documentation> |
1272 | + </annotation> |
1273 | + </enumeration> |
1274 | + <enumeration value="H_0400_0600"> |
1275 | + <annotation> |
1276 | + <xsd:documentation |
1277 | + xml:lang="EN" |
1278 | + xmlns="http://www.w3.org/1999/xhtml"> |
1279 | + <p> |
1280 | + Daily backup target of 04:00–06:00 GMT. |
1281 | + </p> |
1282 | + </xsd:documentation> |
1283 | + </annotation> |
1284 | + </enumeration> |
1285 | + <enumeration value="H_0600_0800"> |
1286 | + <annotation> |
1287 | + <xsd:documentation |
1288 | + xml:lang="EN" |
1289 | + xmlns="http://www.w3.org/1999/xhtml"> |
1290 | + <p> |
1291 | + Daily backup target of 06:00–08:00 GMT. |
1292 | + </p> |
1293 | + </xsd:documentation> |
1294 | + </annotation> |
1295 | + </enumeration> |
1296 | + <enumeration value="H_0800_1000"> |
1297 | + <annotation> |
1298 | + <xsd:documentation |
1299 | + xml:lang="EN" |
1300 | + xmlns="http://www.w3.org/1999/xhtml"> |
1301 | + <p> |
1302 | + Daily backup target of 08:00–10:00 GMT. |
1303 | + </p> |
1304 | + </xsd:documentation> |
1305 | + </annotation> |
1306 | + </enumeration> |
1307 | + <enumeration value="H_1000_1200"> |
1308 | + <annotation> |
1309 | + <xsd:documentation |
1310 | + xml:lang="EN" |
1311 | + xmlns="http://www.w3.org/1999/xhtml"> |
1312 | + <p> |
1313 | + Daily backup target of 10:00–12:00 GMT. |
1314 | + </p> |
1315 | + </xsd:documentation> |
1316 | + </annotation> |
1317 | + </enumeration> |
1318 | + <enumeration value="H_1200_1400"> |
1319 | + <annotation> |
1320 | + <xsd:documentation |
1321 | + xml:lang="EN" |
1322 | + xmlns="http://www.w3.org/1999/xhtml"> |
1323 | + <p> |
1324 | + Daily backup target of 12:00–14:00 GMT. |
1325 | + </p> |
1326 | + </xsd:documentation> |
1327 | + </annotation> |
1328 | + </enumeration> |
1329 | + <enumeration value="H_1400_1600"> |
1330 | + <annotation> |
1331 | + <xsd:documentation |
1332 | + xml:lang="EN" |
1333 | + xmlns="http://www.w3.org/1999/xhtml"> |
1334 | + <p> |
1335 | + Daily backup target of 14:00–16:00 GMT. |
1336 | + </p> |
1337 | + </xsd:documentation> |
1338 | + </annotation> |
1339 | + </enumeration> |
1340 | + <enumeration value="H_1600_1800"> |
1341 | + <annotation> |
1342 | + <xsd:documentation |
1343 | + xml:lang="EN" |
1344 | + xmlns="http://www.w3.org/1999/xhtml"> |
1345 | + <p> |
1346 | + Daily backup target of 16:00–18:00 GMT. |
1347 | + </p> |
1348 | + </xsd:documentation> |
1349 | + </annotation> |
1350 | + </enumeration> |
1351 | + <enumeration value="H_1800_2000"> |
1352 | + <annotation> |
1353 | + <xsd:documentation |
1354 | + xml:lang="EN" |
1355 | + xmlns="http://www.w3.org/1999/xhtml"> |
1356 | + <p> |
1357 | + Daily backup target of 18:00–20:00 GMT. |
1358 | + </p> |
1359 | + </xsd:documentation> |
1360 | + </annotation> |
1361 | + </enumeration> |
1362 | + <enumeration value="H_2000_2200"> |
1363 | + <annotation> |
1364 | + <xsd:documentation |
1365 | + xml:lang="EN" |
1366 | + xmlns="http://www.w3.org/1999/xhtml"> |
1367 | + <p> |
1368 | + Daily backup target of 20:00–22:00 GMT. |
1369 | + </p> |
1370 | + </xsd:documentation> |
1371 | + </annotation> |
1372 | + </enumeration> |
1373 | + <enumeration value="H_2200_0000"> |
1374 | + <annotation> |
1375 | + <xsd:documentation |
1376 | + xml:lang="EN" |
1377 | + xmlns="http://www.w3.org/1999/xhtml"> |
1378 | + <p> |
1379 | + Daily backup target of 22:00–00:00 GMT. |
1380 | + </p> |
1381 | + </xsd:documentation> |
1382 | + </annotation> |
1383 | + </enumeration> |
1384 | + </restriction> |
1385 | + </simpleType> |
1386 | + |
1387 | + <simpleType name="WeeklyBackup"> |
1388 | + <annotation> |
1389 | + <xsd:documentation |
1390 | + xml:lang="EN" |
1391 | + xmlns="http://www.w3.org/1999/xhtml"> |
1392 | + <p> |
1393 | + A target day of the week in which to perform a weekly backup |
1394 | + or DISABLED if daily backups are disabled. |
1395 | + </p> |
1396 | + </xsd:documentation> |
1397 | + </annotation> |
1398 | + <restriction base="xsd:string"> |
1399 | + <enumeration value="DISABLED"> |
1400 | + <annotation> |
1401 | + <xsd:documentation |
1402 | + xml:lang="EN" |
1403 | + xmlns="http://www.w3.org/1999/xhtml"> |
1404 | + <p> |
1405 | + Weekly backups are disabled. |
1406 | + </p> |
1407 | + </xsd:documentation> |
1408 | + </annotation> |
1409 | + </enumeration> |
1410 | + <enumeration value="SUNDAY"> |
1411 | + <annotation> |
1412 | + <xsd:documentation |
1413 | + xml:lang="EN" |
1414 | + xmlns="http://www.w3.org/1999/xhtml"> |
1415 | + <p> |
1416 | + A weekly backup target of Sunday. |
1417 | + </p> |
1418 | + </xsd:documentation> |
1419 | + </annotation> |
1420 | + </enumeration> |
1421 | + <enumeration value="MONDAY"> |
1422 | + <annotation> |
1423 | + <xsd:documentation |
1424 | + xml:lang="EN" |
1425 | + xmlns="http://www.w3.org/1999/xhtml"> |
1426 | + <p> |
1427 | + A weekly backup target of Monday. |
1428 | + </p> |
1429 | + </xsd:documentation> |
1430 | + </annotation> |
1431 | + </enumeration> |
1432 | + <enumeration value="TUESDAY"> |
1433 | + <annotation> |
1434 | + <xsd:documentation |
1435 | + xml:lang="EN" |
1436 | + xmlns="http://www.w3.org/1999/xhtml"> |
1437 | + <p> |
1438 | + A weekly backup target of Tuesday. |
1439 | + </p> |
1440 | + </xsd:documentation> |
1441 | + </annotation> |
1442 | + </enumeration> |
1443 | + <enumeration value="WEDNESDAY"> |
1444 | + <annotation> |
1445 | + <xsd:documentation |
1446 | + xml:lang="EN" |
1447 | + xmlns="http://www.w3.org/1999/xhtml"> |
1448 | + <p> |
1449 | + A weekly backup target of Wednesday. |
1450 | + </p> |
1451 | + </xsd:documentation> |
1452 | + </annotation> |
1453 | + </enumeration> |
1454 | + <enumeration value="THURSDAY"> |
1455 | + <annotation> |
1456 | + <xsd:documentation |
1457 | + xml:lang="EN" |
1458 | + xmlns="http://www.w3.org/1999/xhtml"> |
1459 | + <p> |
1460 | + A weekly backup target of Thursday. |
1461 | + </p> |
1462 | + </xsd:documentation> |
1463 | + </annotation> |
1464 | + </enumeration> |
1465 | + <enumeration value="FRIDAY"> |
1466 | + <annotation> |
1467 | + <xsd:documentation |
1468 | + xml:lang="EN" |
1469 | + xmlns="http://www.w3.org/1999/xhtml"> |
1470 | + <p> |
1471 | + A weekly backup target of Friday. |
1472 | + </p> |
1473 | + </xsd:documentation> |
1474 | + </annotation> |
1475 | + </enumeration> |
1476 | + <enumeration value="SATURDAY"> |
1477 | + <annotation> |
1478 | + <xsd:documentation |
1479 | + xml:lang="EN" |
1480 | + xmlns="http://www.w3.org/1999/xhtml"> |
1481 | + <p> |
1482 | + A weekly backup target of Saturday. |
1483 | + </p> |
1484 | + </xsd:documentation> |
1485 | + </annotation> |
1486 | + </enumeration> |
1487 | + <enumeration value="SUNDAY"> |
1488 | + <annotation> |
1489 | + <xsd:documentation |
1490 | + xml:lang="EN" |
1491 | + xmlns="http://www.w3.org/1999/xhtml"> |
1492 | + <p> |
1493 | + A weekly backup target of Sunday. |
1494 | + </p> |
1495 | + </xsd:documentation> |
1496 | + </annotation> |
1497 | + </enumeration> |
1498 | + </restriction> |
1499 | + </simpleType> |
1500 | +</schema> |
1501 | + |
1502 | |
1503 | === added file 'nova/api/openstack/schemas/v1.1/common.xsd' |
1504 | --- nova/api/openstack/schemas/v1.1/common.xsd 1970-01-01 00:00:00 +0000 |
1505 | +++ nova/api/openstack/schemas/v1.1/common.xsd 2011-04-07 17:22:59 +0000 |
1506 | @@ -0,0 +1,125 @@ |
1507 | +<?xml version="1.0" encoding="UTF-8"?> |
1508 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
1509 | + |
1510 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
1511 | + |
1512 | +<schema |
1513 | + elementFormDefault="qualified" |
1514 | + attributeFormDefault="unqualified" |
1515 | + xmlns="http://www.w3.org/2001/XMLSchema" |
1516 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
1517 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
1518 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
1519 | + xmlns:atom="http://www.w3.org/2005/Atom" |
1520 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
1521 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
1522 | +> |
1523 | + |
1524 | + <annotation> |
1525 | + <xsd:appinfo |
1526 | + xml:lang="EN" |
1527 | + xmlns="http://www.w3.org/1999/xhtml"> |
1528 | + <xsdxt:title>Common Types</xsdxt:title> |
1529 | + <xsdxt:link rel="index" href="api.xsd" /> |
1530 | + </xsd:appinfo> |
1531 | + <xsd:documentation |
1532 | + xml:lang="EN" |
1533 | + xmlns="http://www.w3.org/1999/xhtml"> |
1534 | + <p> |
1535 | + This schema file defines common types used by multiple |
1536 | + entities and possibly spanning several types of requests. |
1537 | + </p> |
1538 | + </xsd:documentation> |
1539 | + </annotation> |
1540 | + |
1541 | + <!-- Import ATOM specific schema definitions --> |
1542 | + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
1543 | + |
1544 | + <complexType name="Metadata"> |
1545 | + <sequence> |
1546 | + <element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="1000"> |
1547 | + <annotation> |
1548 | + <xsd:documentation |
1549 | + xml:lang="EN" |
1550 | + xmlns="http://www.w3.org/1999/xhtml"> |
1551 | + <p> |
1552 | + A collection of metadata items. There may be an |
1553 | + absolute limit that imposes additional constraints on |
1554 | + the number of metadata items. |
1555 | + </p> |
1556 | + </xsd:documentation> |
1557 | + </annotation> |
1558 | + </element> |
1559 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
1560 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
1561 | + </sequence> |
1562 | + <anyAttribute namespace="##other" processContents="lax"/> |
1563 | + </complexType> |
1564 | + <complexType name="MetadataItem"> |
1565 | + <annotation> |
1566 | + <xsd:documentation |
1567 | + xml:lang="EN" |
1568 | + xmlns="http://www.w3.org/1999/xhtml"> |
1569 | + <p> |
1570 | + A MetadataItem is simply a name-value pair. The name is |
1571 | + specified in the key attribute and the <a |
1572 | + href="#type_MetadataValue" title="See definition of |
1573 | + MetadataValue">value</a> is included inline. |
1574 | + </p> |
1575 | + <xsdxt:code type="application/xml"> |
1576 | + <![CDATA[ |
1577 | + <meta xmlns="http://docs.openstack.org/compute/api/v1.0" |
1578 | + key="Server Label">Web Head 1</meta> |
1579 | + ]]> |
1580 | + </xsdxt:code> |
1581 | + </xsd:documentation> |
1582 | + </annotation> |
1583 | + <simpleContent> |
1584 | + <extension base="csapi:MetadataValue"> |
1585 | + <attribute name="key" type="csapi:MetadataKey" use="required"> |
1586 | + <annotation> |
1587 | + <xsd:documentation |
1588 | + xml:lang="EN" |
1589 | + xmlns="http://www.w3.org/1999/xhtml"> |
1590 | + <p> |
1591 | + A meta data name-value pair. |
1592 | + </p> |
1593 | + </xsd:documentation> |
1594 | + </annotation> |
1595 | + </attribute> |
1596 | + <anyAttribute namespace="##other" processContents="lax"/> |
1597 | + </extension> |
1598 | + </simpleContent> |
1599 | + </complexType> |
1600 | + |
1601 | + <!-- Simple types that span multiple requests --> |
1602 | + <simpleType name="Progress"> |
1603 | + <annotation> |
1604 | + <xsd:documentation |
1605 | + xml:lang="EN" |
1606 | + xmlns="http://www.w3.org/1999/xhtml"> |
1607 | + <p> |
1608 | + An integer between 0 and 100 that denotes the progress of an |
1609 | + operation. |
1610 | + </p> |
1611 | + </xsd:documentation> |
1612 | + </annotation> |
1613 | + <restriction base="xsd:int"> |
1614 | + <minInclusive value="0"/> |
1615 | + <maxInclusive value="100" /> |
1616 | + </restriction> |
1617 | + </simpleType> |
1618 | + |
1619 | + <simpleType name="MetadataKey"> |
1620 | + <restriction base="xsd:string"> |
1621 | + <maxLength value="255" /> |
1622 | + </restriction> |
1623 | + </simpleType> |
1624 | + |
1625 | + <simpleType name="MetadataValue"> |
1626 | + <restriction base="xsd:string"> |
1627 | + <maxLength value="255" /> |
1628 | + </restriction> |
1629 | + </simpleType> |
1630 | +</schema> |
1631 | + |
1632 | |
1633 | === added file 'nova/api/openstack/schemas/v1.1/extensions.xsd' |
1634 | --- nova/api/openstack/schemas/v1.1/extensions.xsd 1970-01-01 00:00:00 +0000 |
1635 | +++ nova/api/openstack/schemas/v1.1/extensions.xsd 2011-04-07 17:22:59 +0000 |
1636 | @@ -0,0 +1,56 @@ |
1637 | +<?xml version="1.0" encoding="UTF-8"?> |
1638 | + |
1639 | +<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" |
1640 | + targetNamespace="http://docs.openstack.org/common/api/v1.0" |
1641 | + xmlns:ext="http://docs.openstack.org/common/api/v1.0" |
1642 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
1643 | + xmlns:html="http://www.w3.org/1999/xhtml" |
1644 | + xmlns:atom="http://www.w3.org/2005/Atom" |
1645 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
1646 | + |
1647 | + <!-- Import ATOM specific schema definitions --> |
1648 | + <xsd:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
1649 | + |
1650 | + <xsd:element name="extensions" type="ext:Extensions"/> |
1651 | + <xsd:element name="extension" type="ext:Extension"/> |
1652 | + |
1653 | + <xsd:complexType name="Extensions"> |
1654 | + <xsd:sequence> |
1655 | + <xsd:element name="extension" type="ext:Extension" minOccurs="0" maxOccurs="unbounded" /> |
1656 | + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
1657 | + </xsd:sequence> |
1658 | + <xsd:anyAttribute namespace="##other" processContents="lax"/> |
1659 | + </xsd:complexType> |
1660 | + |
1661 | + <xsd:complexType name="Extension"> |
1662 | + <xsd:sequence> |
1663 | + <xsd:element name="description" type="xsd:string" minOccurs="1" /> |
1664 | + <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
1665 | + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
1666 | + </xsd:sequence> |
1667 | + <xsd:attribute name="name" type="xsd:string" use="required"/> |
1668 | + <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/> |
1669 | + <xsd:attribute name="alias" type="ext:Alias" use="required"/> |
1670 | + <xsd:attribute name="updated" type="xsd:dateTime" use="optional"/> |
1671 | + <xsd:anyAttribute namespace="##other" processContents="lax"/> |
1672 | + <xsd:assert vc:minVersion="1.1" test="atom:link[@rel='describedby']"> |
1673 | + <xsd:annotation> |
1674 | + <xsd:documentation |
1675 | + xml:lang="EN" |
1676 | + xmlns="http://www.w3.org/1999/xhtml"> |
1677 | + <p> |
1678 | + There should be at least one atom link |
1679 | + with a describedby relation. |
1680 | + </p> |
1681 | + </xsd:documentation> |
1682 | + </xsd:annotation> |
1683 | + </xsd:assert> |
1684 | + </xsd:complexType> |
1685 | + |
1686 | + <xsd:simpleType name="Alias"> |
1687 | + <xsd:restriction base="xsd:string"> |
1688 | + <xsd:pattern value="\w+\-\w+" /> |
1689 | + </xsd:restriction> |
1690 | + </xsd:simpleType> |
1691 | + |
1692 | +</xsd:schema> |
1693 | |
1694 | === added file 'nova/api/openstack/schemas/v1.1/faults.xsd' |
1695 | --- nova/api/openstack/schemas/v1.1/faults.xsd 1970-01-01 00:00:00 +0000 |
1696 | +++ nova/api/openstack/schemas/v1.1/faults.xsd 2011-04-07 17:22:59 +0000 |
1697 | @@ -0,0 +1,482 @@ |
1698 | +<?xml version="1.0" encoding="UTF-8"?> |
1699 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
1700 | + |
1701 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
1702 | + |
1703 | + |
1704 | +<schema |
1705 | + elementFormDefault="qualified" |
1706 | + attributeFormDefault="unqualified" |
1707 | + xmlns="http://www.w3.org/2001/XMLSchema" |
1708 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
1709 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
1710 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
1711 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1"> |
1712 | + |
1713 | + <annotation> |
1714 | + <xsd:appinfo |
1715 | + xml:lang="EN" |
1716 | + xmlns="http://www.w3.org/1999/xhtml"> |
1717 | + <xsdxt:title>Faults</xsdxt:title> |
1718 | + <xsdxt:link rel="index" href="api.xsd" /> |
1719 | + </xsd:appinfo> |
1720 | + <xsd:documentation |
1721 | + xml:lang="EN" |
1722 | + xmlns="http://www.w3.org/1999/xhtml"> |
1723 | + <p> |
1724 | + This schema file defines faults that may be raised by the |
1725 | + Cloud Servers API. These faults are derived from the <a |
1726 | + href="#type_ComputeAPIFault" title="See definition of |
1727 | + ComputeAPIFault">ComputeAPIFault</a>. Most faults |
1728 | + extend this type without adding any additional attributes or |
1729 | + elements. The only exception is the <a |
1730 | + href="#type_OverLimitAPIFault" title="See definition of |
1731 | + OverLimitAPIFault">OverLimitAPIFault</a> which adds a |
1732 | + <strong>retryAt</strong> attribute. Because all faults |
1733 | + extend a standard base type, it should be possible to capture |
1734 | + all API faults with a single <code>catch</code> statement. |
1735 | + </p> |
1736 | + <p> |
1737 | + Faults are associated with a default HTTP status code that |
1738 | + corresponds to the particular fault type. For example an <a |
1739 | + href="#element_itemNotFound" title="see definition of |
1740 | + itemNotFound"><itemNotFound></a> element is associated |
1741 | + with the HTTP status code 404. Some elements, the <a |
1742 | + href="#element_computeFault" title="see definition of |
1743 | + computeFault"><computeFault></a> element for |
1744 | + example, may be associated with multiple status codes. It is |
1745 | + also possible for multiple fault elements to be associated |
1746 | + with the same default code. The examples below showcase the |
1747 | + default status codes for each element type. Note that these |
1748 | + default codes are not part of the formal schema. In practice, |
1749 | + however, an element type will likely be associated with its |
1750 | + corresponding default status code. |
1751 | + </p> |
1752 | + </xsd:documentation> |
1753 | + </annotation> |
1754 | + |
1755 | + <!-- Faults --> |
1756 | + <element name="computeFault" type="csapi:ComputeAPIFault"> |
1757 | + <annotation> |
1758 | + <xsd:documentation |
1759 | + xml:lang="EN" |
1760 | + xmlns="http://www.w3.org/1999/xhtml"> |
1761 | + <p> |
1762 | + A generic Cloud Servers API fault. |
1763 | + </p> |
1764 | + </xsd:documentation> |
1765 | + <xsd:appinfo> |
1766 | + <xsdxt:samples> |
1767 | + <xsdxt:sample> |
1768 | + <xsdxt:code type="application/xml" href="../samples/fault.xml" /> |
1769 | + </xsdxt:sample> |
1770 | + <xsdxt:sample> |
1771 | + <xsdxt:code type="application/json" href="../samples/fault.json" /> |
1772 | + </xsdxt:sample> |
1773 | + </xsdxt:samples> |
1774 | + </xsd:appinfo> |
1775 | + </annotation> |
1776 | + </element> |
1777 | + <element name="itemNotFound" type="csapi:ItemNotFoundAPIFault"> |
1778 | + <annotation> |
1779 | + <xsd:documentation |
1780 | + xml:lang="EN" |
1781 | + xmlns="http://www.w3.org/1999/xhtml"> |
1782 | + <p> |
1783 | + The item or resource could not be found. |
1784 | + </p> |
1785 | + </xsd:documentation> |
1786 | + <xsd:appinfo> |
1787 | + <xsdxt:samples> |
1788 | + <xsdxt:sample> |
1789 | + <xsdxt:code type="application/xml" href="../samples/notfound.xml" /> |
1790 | + </xsdxt:sample> |
1791 | + <xsdxt:sample> |
1792 | + <xsdxt:code type="application/json" href="../samples/notfound.json" /> |
1793 | + </xsdxt:sample> |
1794 | + </xsdxt:samples> |
1795 | + </xsd:appinfo> |
1796 | + </annotation> |
1797 | + </element> |
1798 | + <element name="buildInProgress" type="csapi:BuildInProgressAPIFault"> |
1799 | + <annotation> |
1800 | + <xsd:documentation |
1801 | + xml:lang="EN" |
1802 | + xmlns="http://www.w3.org/1999/xhtml"> |
1803 | + <p> |
1804 | + The operation is not allowed because the corresponding |
1805 | + server is in a build state. |
1806 | + </p> |
1807 | + </xsd:documentation> |
1808 | + <xsd:appinfo> |
1809 | + <xsdxt:samples> |
1810 | + <xsdxt:sample> |
1811 | + <xsdxt:code type="application/xml" href="../samples/build.xml" /> |
1812 | + </xsdxt:sample> |
1813 | + <xsdxt:sample> |
1814 | + <xsdxt:code type="application/json" href="../samples/build.json" /> |
1815 | + </xsdxt:sample> |
1816 | + </xsdxt:samples> |
1817 | + </xsd:appinfo> |
1818 | + </annotation> |
1819 | + </element> |
1820 | + <element name="serverCapacityUnavailable" type="csapi:ServerCapacityUnavailableAPIFault"> |
1821 | + <annotation> |
1822 | + <xsd:documentation |
1823 | + xml:lang="EN" |
1824 | + xmlns="http://www.w3.org/1999/xhtml"> |
1825 | + <p> |
1826 | + There is not enough capacity to honor the request. |
1827 | + </p> |
1828 | + </xsd:documentation> |
1829 | + <xsd:appinfo> |
1830 | + <xsdxt:samples> |
1831 | + <xsdxt:sample> |
1832 | + <xsdxt:code type="application/xml" href="../samples/serverCap.xml" /> |
1833 | + </xsdxt:sample> |
1834 | + <xsdxt:sample> |
1835 | + <xsdxt:code type="application/json" href="../samples/serverCap.json" /> |
1836 | + </xsdxt:sample> |
1837 | + </xsdxt:samples> |
1838 | + </xsd:appinfo> |
1839 | + </annotation> |
1840 | + </element> |
1841 | + <element name="backupOrResizeInProgress" type="csapi:BackupOrResizeInProgressAPIFault"> |
1842 | + <annotation> |
1843 | + <xsd:documentation |
1844 | + xml:lang="EN" |
1845 | + xmlns="http://www.w3.org/1999/xhtml"> |
1846 | + <p> |
1847 | + The operation is not allowed because the corresponding |
1848 | + server is being re-sized or backed up. |
1849 | + </p> |
1850 | + </xsd:documentation> |
1851 | + <xsd:appinfo> |
1852 | + <xsdxt:samples> |
1853 | + <xsdxt:sample> |
1854 | + <xsdxt:code type="application/xml" href="../samples/backupInProgress.xml" /> |
1855 | + </xsdxt:sample> |
1856 | + <xsdxt:sample> |
1857 | + <xsdxt:code type="application/json" href="../samples/backupInProgress.json" /> |
1858 | + </xsdxt:sample> |
1859 | + </xsdxt:samples> |
1860 | + </xsd:appinfo> |
1861 | + </annotation> |
1862 | + </element> |
1863 | + <element name="resizeNotAllowed" type="csapi:ResizeNotAllowedAPIFault"> |
1864 | + <annotation> |
1865 | + <xsd:documentation |
1866 | + xml:lang="EN" |
1867 | + xmlns="http://www.w3.org/1999/xhtml"> |
1868 | + <p> |
1869 | + The re-size operation is not permitted. |
1870 | + </p> |
1871 | + </xsd:documentation> |
1872 | + <xsd:appinfo> |
1873 | + <xsdxt:samples> |
1874 | + <xsdxt:sample> |
1875 | + <xsdxt:code type="application/xml" href="../samples/resizeNotAllowed.xml" /> |
1876 | + </xsdxt:sample> |
1877 | + <xsdxt:sample> |
1878 | + <xsdxt:code type="application/json" href="../samples/resizeNotAllowed.json" /> |
1879 | + </xsdxt:sample> |
1880 | + </xsdxt:samples> |
1881 | + </xsd:appinfo> |
1882 | + </annotation> |
1883 | + </element> |
1884 | + <element name="serviceUnavailable" type="csapi:ServiceUnavailableAPIFault"> |
1885 | + <annotation> |
1886 | + <xsd:documentation |
1887 | + xml:lang="EN" |
1888 | + xmlns="http://www.w3.org/1999/xhtml"> |
1889 | + <p> |
1890 | + The API service is currently unavailable. |
1891 | + </p> |
1892 | + </xsd:documentation> |
1893 | + <xsd:appinfo> |
1894 | + <xsdxt:samples> |
1895 | + <xsdxt:sample> |
1896 | + <xsdxt:code type="application/xml" href="../samples/serviceNotAvailable.xml" /> |
1897 | + </xsdxt:sample> |
1898 | + <xsdxt:sample> |
1899 | + <xsdxt:code type="application/json" href="../samples/serviceNotAvailable.json" /> |
1900 | + </xsdxt:sample> |
1901 | + </xsdxt:samples> |
1902 | + </xsd:appinfo> |
1903 | + </annotation> |
1904 | + </element> |
1905 | + <element name="unauthorized" type="csapi:UnauthorizedAPIFault"> |
1906 | + <annotation> |
1907 | + <xsd:documentation |
1908 | + xml:lang="EN" |
1909 | + xmlns="http://www.w3.org/1999/xhtml"> |
1910 | + <p> |
1911 | + Insufficient privileges to honor the request, perhaps an |
1912 | + authentication token needs to be obtained or renewed. |
1913 | + </p> |
1914 | + </xsd:documentation> |
1915 | + <xsd:appinfo> |
1916 | + <xsdxt:samples> |
1917 | + <xsdxt:sample> |
1918 | + <xsdxt:code type="application/xml" href="../samples/unauth.xml" /> |
1919 | + </xsdxt:sample> |
1920 | + <xsdxt:sample> |
1921 | + <xsdxt:code type="application/json" href="../samples/unauth.json" /> |
1922 | + </xsdxt:sample> |
1923 | + </xsdxt:samples> |
1924 | + </xsd:appinfo> |
1925 | + </annotation> |
1926 | + </element> |
1927 | + <element name="overLimit" type="csapi:OverLimitAPIFault"> |
1928 | + <annotation> |
1929 | + <xsd:documentation |
1930 | + xml:lang="EN" |
1931 | + xmlns="http://www.w3.org/1999/xhtml"> |
1932 | + <p> |
1933 | + An <a href="limits.xsd#type_AbsoluteLimit" title="See |
1934 | + definition of AbsoluteLimit">absolute</a> or <a |
1935 | + href="limits.xsd#type_RateLimit" title="See definition of |
1936 | + RateLimit">rate</a> limit has been exceeded. |
1937 | + </p> |
1938 | + </xsd:documentation> |
1939 | + <xsd:appinfo> |
1940 | + <xsdxt:samples> |
1941 | + <xsdxt:sample> |
1942 | + <xsdxt:code type="application/xml" href="../samples/overlimit.xml" /> |
1943 | + </xsdxt:sample> |
1944 | + <xsdxt:sample> |
1945 | + <xsdxt:code type="application/json" href="../samples/overlimit.json" /> |
1946 | + </xsdxt:sample> |
1947 | + </xsdxt:samples> |
1948 | + </xsd:appinfo> |
1949 | + </annotation> |
1950 | + </element> |
1951 | + <element name="badRequest" type="csapi:BadRequestAPIFault"> |
1952 | + <annotation> |
1953 | + <xsd:documentation |
1954 | + xml:lang="EN" |
1955 | + xmlns="http://www.w3.org/1999/xhtml"> |
1956 | + <p> |
1957 | + The request is malformed. |
1958 | + </p> |
1959 | + </xsd:documentation> |
1960 | + <xsd:appinfo> |
1961 | + <xsdxt:samples> |
1962 | + <xsdxt:sample> |
1963 | + <xsdxt:code type="application/xml" href="../samples/badrequest.xml" /> |
1964 | + </xsdxt:sample> |
1965 | + <xsdxt:sample> |
1966 | + <xsdxt:code type="application/json" href="../samples/badrequest.json" /> |
1967 | + </xsdxt:sample> |
1968 | + </xsdxt:samples> |
1969 | + </xsd:appinfo> |
1970 | + </annotation> |
1971 | + </element> |
1972 | + <element name="badMediaType" type="csapi:BadMediaTypeAPIFault"> |
1973 | + <annotation> |
1974 | + <xsd:documentation |
1975 | + xml:lang="EN" |
1976 | + xmlns="http://www.w3.org/1999/xhtml"> |
1977 | + <p> |
1978 | + The Content Type of the request is not supported. |
1979 | + </p> |
1980 | + </xsd:documentation> |
1981 | + <xsd:appinfo> |
1982 | + <xsdxt:samples> |
1983 | + <xsdxt:sample> |
1984 | + <xsdxt:code type="application/xml" href="../samples/badmediatype.xml" /> |
1985 | + </xsdxt:sample> |
1986 | + <xsdxt:sample> |
1987 | + <xsdxt:code type="application/json" href="../samples/badmediatype.json" /> |
1988 | + </xsdxt:sample> |
1989 | + </xsdxt:samples> |
1990 | + </xsd:appinfo> |
1991 | + </annotation> |
1992 | + </element> |
1993 | + <element name="badMethod" type="csapi:BadMethodAPIFault"> |
1994 | + <annotation> |
1995 | + <xsd:documentation |
1996 | + xml:lang="EN" |
1997 | + xmlns="http://www.w3.org/1999/xhtml"> |
1998 | + <p> |
1999 | + The HTTP method (or <a href="limits.xsd#type_HTTPVerb" |
2000 | + title="See definition of HTTPVerb">verb</a>) is not |
2001 | + supported by the corresponding resource. |
2002 | + </p> |
2003 | + </xsd:documentation> |
2004 | + <xsd:appinfo> |
2005 | + <xsdxt:samples> |
2006 | + <xsdxt:sample> |
2007 | + <xsdxt:code type="application/xml" href="../samples/badmethod.xml" /> |
2008 | + </xsdxt:sample> |
2009 | + <xsdxt:sample> |
2010 | + <xsdxt:code type="application/json" href="../samples/badmethod.json" /> |
2011 | + </xsdxt:sample> |
2012 | + </xsdxt:samples> |
2013 | + </xsd:appinfo> |
2014 | + </annotation> |
2015 | + </element> |
2016 | + <element name="notImplemented" type="csapi:NotImplementedAPIFault"> |
2017 | + <annotation> |
2018 | + <xsd:documentation |
2019 | + xml:lang="EN" |
2020 | + xmlns="http://www.w3.org/1999/xhtml"> |
2021 | + <p> |
2022 | + The operation is currently not implemented. |
2023 | + </p> |
2024 | + </xsd:documentation> |
2025 | + <xsd:appinfo> |
2026 | + <xsdxt:samples> |
2027 | + <xsdxt:sample> |
2028 | + <xsdxt:code type="application/xml" href="../samples/notimplemented.xml" /> |
2029 | + </xsdxt:sample> |
2030 | + <xsdxt:sample> |
2031 | + <xsdxt:code type="application/json" href="../samples/notimplemented.json" /> |
2032 | + </xsdxt:sample> |
2033 | + </xsdxt:samples> |
2034 | + </xsd:appinfo> |
2035 | + </annotation> |
2036 | + </element> |
2037 | + |
2038 | + <!-- Complex Types --> |
2039 | + <complexType name="ComputeAPIFault"> |
2040 | + <sequence> |
2041 | + <element name="message" type="xsd:string"> |
2042 | + <annotation> |
2043 | + <xsd:documentation |
2044 | + xml:lang="EN" |
2045 | + xmlns="http://www.w3.org/1999/xhtml"> |
2046 | + <p> |
2047 | + A human readable message that is appropriate for display |
2048 | + to the end user. |
2049 | + </p> |
2050 | + </xsd:documentation> |
2051 | + </annotation> |
2052 | + </element> |
2053 | + <element name="details" type="xsd:string" minOccurs="0"> |
2054 | + <annotation> |
2055 | + <xsd:documentation |
2056 | + xml:lang="EN" |
2057 | + xmlns="http://www.w3.org/1999/xhtml"> |
2058 | + <p> |
2059 | + The optional <details> element may contain useful |
2060 | + information for tracking down errors (e.g a stack |
2061 | + trace). This information may or may not be appropriate |
2062 | + for display to an end user. |
2063 | + </p> |
2064 | + </xsd:documentation> |
2065 | + </annotation> |
2066 | + </element> |
2067 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2068 | + </sequence> |
2069 | + <attribute name="code" type="xsd:int" use="required"> |
2070 | + <annotation> |
2071 | + <xsd:documentation |
2072 | + xml:lang="EN" |
2073 | + xmlns="http://www.w3.org/1999/xhtml"> |
2074 | + <p> |
2075 | + The HTTP status code associated with the current fault. |
2076 | + </p> |
2077 | + </xsd:documentation> |
2078 | + </annotation> |
2079 | + </attribute> |
2080 | + <anyAttribute namespace="##other" processContents="lax"/> |
2081 | + </complexType> |
2082 | + |
2083 | + <complexType name="ItemNotFoundAPIFault"> |
2084 | + <complexContent> |
2085 | + <extension base="csapi:ComputeAPIFault"> |
2086 | + </extension> |
2087 | + </complexContent> |
2088 | + </complexType> |
2089 | + |
2090 | + <complexType name="BuildInProgressAPIFault"> |
2091 | + <complexContent> |
2092 | + <extension base="csapi:ComputeAPIFault"> |
2093 | + </extension> |
2094 | + </complexContent> |
2095 | + </complexType> |
2096 | + |
2097 | + <complexType name="ServerCapacityUnavailableAPIFault"> |
2098 | + <complexContent> |
2099 | + <extension base="csapi:ComputeAPIFault"> |
2100 | + </extension> |
2101 | + </complexContent> |
2102 | + </complexType> |
2103 | + |
2104 | + <complexType name="BackupOrResizeInProgressAPIFault"> |
2105 | + <complexContent> |
2106 | + <extension base="csapi:ComputeAPIFault"> |
2107 | + </extension> |
2108 | + </complexContent> |
2109 | + </complexType> |
2110 | + |
2111 | + <complexType name="ResizeNotAllowedAPIFault"> |
2112 | + <complexContent> |
2113 | + <extension base="csapi:ComputeAPIFault"> |
2114 | + </extension> |
2115 | + </complexContent> |
2116 | + </complexType> |
2117 | + |
2118 | + <complexType name="ServiceUnavailableAPIFault"> |
2119 | + <complexContent> |
2120 | + <extension base="csapi:ComputeAPIFault"> |
2121 | + </extension> |
2122 | + </complexContent> |
2123 | + </complexType> |
2124 | + |
2125 | + <complexType name="UnauthorizedAPIFault"> |
2126 | + <complexContent> |
2127 | + <extension base="csapi:ComputeAPIFault"> |
2128 | + </extension> |
2129 | + </complexContent> |
2130 | + </complexType> |
2131 | + |
2132 | + <complexType name="OverLimitAPIFault"> |
2133 | + <complexContent> |
2134 | + <extension base="csapi:ComputeAPIFault"> |
2135 | + <attribute name="retryAt" type="xsd:dateTime" use="optional"> |
2136 | + <annotation> |
2137 | + <xsd:documentation |
2138 | + xml:lang="EN" |
2139 | + xmlns="http://www.w3.org/1999/xhtml"> |
2140 | + <p> |
2141 | + An optional dateTime denoting when an operation should |
2142 | + be retried. |
2143 | + </p> |
2144 | + </xsd:documentation> |
2145 | + </annotation> |
2146 | + </attribute> |
2147 | + </extension> |
2148 | + </complexContent> |
2149 | + </complexType> |
2150 | + |
2151 | + <complexType name="BadRequestAPIFault"> |
2152 | + <complexContent> |
2153 | + <extension base="csapi:ComputeAPIFault"> |
2154 | + </extension> |
2155 | + </complexContent> |
2156 | + </complexType> |
2157 | + |
2158 | + <complexType name="BadMediaTypeAPIFault"> |
2159 | + <complexContent> |
2160 | + <extension base="csapi:ComputeAPIFault"> |
2161 | + </extension> |
2162 | + </complexContent> |
2163 | + </complexType> |
2164 | + |
2165 | + <complexType name="BadMethodAPIFault"> |
2166 | + <complexContent> |
2167 | + <extension base="csapi:ComputeAPIFault"> |
2168 | + </extension> |
2169 | + </complexContent> |
2170 | + </complexType> |
2171 | + |
2172 | + <complexType name="NotImplementedAPIFault"> |
2173 | + <complexContent> |
2174 | + <extension base="csapi:ComputeAPIFault"> |
2175 | + </extension> |
2176 | + </complexContent> |
2177 | + </complexType> |
2178 | + |
2179 | +</schema> |
2180 | |
2181 | === added file 'nova/api/openstack/schemas/v1.1/flavor.xsd' |
2182 | --- nova/api/openstack/schemas/v1.1/flavor.xsd 1970-01-01 00:00:00 +0000 |
2183 | +++ nova/api/openstack/schemas/v1.1/flavor.xsd 2011-04-07 17:22:59 +0000 |
2184 | @@ -0,0 +1,156 @@ |
2185 | +<?xml version="1.0" encoding="UTF-8"?> |
2186 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
2187 | + |
2188 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
2189 | + |
2190 | + |
2191 | +<schema |
2192 | + elementFormDefault="qualified" |
2193 | + attributeFormDefault="unqualified" |
2194 | + xmlns="http://www.w3.org/2001/XMLSchema" |
2195 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
2196 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
2197 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
2198 | + xmlns:atom="http://www.w3.org/2005/Atom" |
2199 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
2200 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
2201 | +> |
2202 | + <annotation> |
2203 | + <xsd:appinfo |
2204 | + xml:lang="EN" |
2205 | + xmlns="http://www.w3.org/1999/xhtml"> |
2206 | + <xsdxt:title>Flavors</xsdxt:title> |
2207 | + <xsdxt:link rel="index" href="api.xsd" /> |
2208 | + </xsd:appinfo> |
2209 | + <xsd:documentation |
2210 | + xml:lang="EN" |
2211 | + xmlns="http://www.w3.org/1999/xhtml"> |
2212 | + <p> |
2213 | + This schema file defines all entities related to <a |
2214 | + href="#type_Flavor" title="See definition of |
2215 | + Flavor">Flavors</a>. |
2216 | + </p> |
2217 | + </xsd:documentation> |
2218 | + </annotation> |
2219 | + |
2220 | + <!-- Import ATOM specific schema definitions --> |
2221 | + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
2222 | + |
2223 | + <element name="flavor" type="csapi:Flavor"> |
2224 | + <annotation> |
2225 | + <xsd:documentation |
2226 | + xml:lang="EN" |
2227 | + xmlns="http://www.w3.org/1999/xhtml"> |
2228 | + <p> |
2229 | + The element defines an available hardware configuration for |
2230 | + a server. |
2231 | + </p> |
2232 | + </xsd:documentation> |
2233 | + <xsd:appinfo> |
2234 | + <xsdxt:samples> |
2235 | + <xsdxt:sample> |
2236 | + <xsdxt:code type="application/xml" href="../samples/flavor.xml" /> |
2237 | + </xsdxt:sample> |
2238 | + <xsdxt:sample> |
2239 | + <xsdxt:code type="application/json" href="../samples/flavor.json" /> |
2240 | + </xsdxt:sample> |
2241 | + </xsdxt:samples> |
2242 | + </xsd:appinfo> |
2243 | + </annotation> |
2244 | + </element> |
2245 | + |
2246 | + <element name="flavors" type="csapi:Flavors"> |
2247 | + <annotation> |
2248 | + <xsd:documentation |
2249 | + xml:lang="EN" |
2250 | + xmlns="http://www.w3.org/1999/xhtml"> |
2251 | + <p> |
2252 | + A collection of flavors. |
2253 | + </p> |
2254 | + </xsd:documentation> |
2255 | + <xsd:appinfo> |
2256 | + <xsdxt:samples> |
2257 | + <xsdxt:sample> |
2258 | + <xsdxt:code type="application/xml" href="../samples/flavors.xml" /> |
2259 | + </xsdxt:sample> |
2260 | + <xsdxt:sample> |
2261 | + <xsdxt:code type="application/json" href="../samples/flavors.json" /> |
2262 | + </xsdxt:sample> |
2263 | + </xsdxt:samples> |
2264 | + </xsd:appinfo> |
2265 | + </annotation> |
2266 | + </element> |
2267 | + |
2268 | + <!-- Complex Types --> |
2269 | + <complexType name="Flavor"> |
2270 | + <sequence> |
2271 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2272 | + </sequence> |
2273 | + <attribute type="xsd:int" name="id" use="required"> |
2274 | + <annotation> |
2275 | + <xsd:documentation |
2276 | + xml:lang="EN" |
2277 | + xmlns="http://www.w3.org/1999/xhtml"> |
2278 | + <p> |
2279 | + The ID of the flavor. |
2280 | + </p> |
2281 | + </xsd:documentation> |
2282 | + </annotation> |
2283 | + </attribute> |
2284 | + <attribute type="xsd:string" name="name" use="required"> |
2285 | + <annotation> |
2286 | + <xsd:documentation |
2287 | + xml:lang="EN" |
2288 | + xmlns="http://www.w3.org/1999/xhtml"> |
2289 | + <p> |
2290 | + The name of the flavor. |
2291 | + </p> |
2292 | + </xsd:documentation> |
2293 | + </annotation> |
2294 | + </attribute> |
2295 | + <attribute type="xsd:int" name="ram" use="optional"> |
2296 | + <annotation> |
2297 | + <xsd:documentation |
2298 | + xml:lang="EN" |
2299 | + xmlns="http://www.w3.org/1999/xhtml"> |
2300 | + <p> |
2301 | + The amount of RAM in the flavor in megabytes. |
2302 | + </p> |
2303 | + </xsd:documentation> |
2304 | + </annotation> |
2305 | + </attribute> |
2306 | + <attribute type="xsd:int" name="disk" use="optional"> |
2307 | + <annotation> |
2308 | + <xsd:documentation |
2309 | + xml:lang="EN" |
2310 | + xmlns="http://www.w3.org/1999/xhtml"> |
2311 | + <p> |
2312 | + The amount of disk space in the flavor in gigabytes. |
2313 | + </p> |
2314 | + </xsd:documentation> |
2315 | + </annotation> |
2316 | + </attribute> |
2317 | + <anyAttribute namespace="##other" processContents="lax"/> |
2318 | + </complexType> |
2319 | + |
2320 | + <complexType name="Flavors"> |
2321 | + <sequence> |
2322 | + <element name="flavor" type="csapi:Flavor" minOccurs="0" maxOccurs="1000"> |
2323 | + <annotation> |
2324 | + <xsd:documentation |
2325 | + xml:lang="EN" |
2326 | + xmlns="http://www.w3.org/1999/xhtml"> |
2327 | + <p> |
2328 | + A collection of flavors. |
2329 | + </p> |
2330 | + </xsd:documentation> |
2331 | + </annotation> |
2332 | + </element> |
2333 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
2334 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2335 | + </sequence> |
2336 | + <anyAttribute namespace="##other" processContents="lax"/> |
2337 | + </complexType> |
2338 | + |
2339 | +</schema> |
2340 | + |
2341 | |
2342 | === added file 'nova/api/openstack/schemas/v1.1/image.xsd' |
2343 | --- nova/api/openstack/schemas/v1.1/image.xsd 1970-01-01 00:00:00 +0000 |
2344 | +++ nova/api/openstack/schemas/v1.1/image.xsd 2011-04-07 17:22:59 +0000 |
2345 | @@ -0,0 +1,286 @@ |
2346 | +<?xml version="1.0" encoding="UTF-8"?> |
2347 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
2348 | + |
2349 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
2350 | + |
2351 | +<schema |
2352 | + elementFormDefault="qualified" |
2353 | + attributeFormDefault="unqualified" |
2354 | + xmlns="http://www.w3.org/2001/XMLSchema" |
2355 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
2356 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
2357 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
2358 | + xmlns:atom="http://www.w3.org/2005/Atom" |
2359 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
2360 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
2361 | +> |
2362 | + <annotation> |
2363 | + <xsd:appinfo |
2364 | + xml:lang="EN" |
2365 | + xmlns="http://www.w3.org/1999/xhtml"> |
2366 | + <xsdxt:title>Images</xsdxt:title> |
2367 | + <xsdxt:link rel="index" href="api.xsd" /> |
2368 | + </xsd:appinfo> |
2369 | + <xsd:documentation |
2370 | + xml:lang="EN" |
2371 | + xmlns="http://www.w3.org/1999/xhtml"> |
2372 | + <p> |
2373 | + This schema file defines all entity related to <a |
2374 | + href="#type_Image" title="See definition of Image">Images</a>. |
2375 | + </p> |
2376 | + </xsd:documentation> |
2377 | + </annotation> |
2378 | + |
2379 | + <!-- Import ATOM specific schema definitions --> |
2380 | + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
2381 | + |
2382 | + <include schemaLocation="common.xsd"> |
2383 | + <annotation> |
2384 | + <xsd:documentation |
2385 | + xml:lang="EN" |
2386 | + xmlns="http://www.w3.org/1999/xhtml"> |
2387 | + <p> |
2388 | + Common types used by multiple entities and possibly spanning |
2389 | + several types of requests. |
2390 | + </p> |
2391 | + </xsd:documentation> |
2392 | + </annotation> |
2393 | + </include> |
2394 | + |
2395 | + <element name="image" type="csapi:Image"> |
2396 | + <annotation> |
2397 | + <xsd:documentation |
2398 | + xml:lang="EN" |
2399 | + xmlns="http://www.w3.org/1999/xhtml"> |
2400 | + <p> |
2401 | + The element defines a collection of files used to create or |
2402 | + rebuild a server. |
2403 | + </p> |
2404 | + </xsd:documentation> |
2405 | + <xsd:appinfo> |
2406 | + <xsdxt:samples> |
2407 | + <xsdxt:sample> |
2408 | + <xsdxt:code type="application/xml" href="../samples/image.xml" /> |
2409 | + </xsdxt:sample> |
2410 | + <xsdxt:sample> |
2411 | + <xsdxt:code type="application/json" href="../samples/image.json" /> |
2412 | + </xsdxt:sample> |
2413 | + </xsdxt:samples> |
2414 | + </xsd:appinfo> |
2415 | + </annotation> |
2416 | + </element> |
2417 | + <element name="images" type="csapi:Images"> |
2418 | + <annotation> |
2419 | + <xsd:documentation |
2420 | + xml:lang="EN" |
2421 | + xmlns="http://www.w3.org/1999/xhtml"> |
2422 | + <p> |
2423 | + A collection of images. |
2424 | + </p> |
2425 | + </xsd:documentation> |
2426 | + <xsd:appinfo> |
2427 | + <xsdxt:samples> |
2428 | + <xsdxt:sample> |
2429 | + <xsdxt:code type="application/xml" href="../samples/images.xml" /> |
2430 | + </xsdxt:sample> |
2431 | + <xsdxt:sample> |
2432 | + <xsdxt:code type="application/json" href="../samples/images.json" /> |
2433 | + </xsdxt:sample> |
2434 | + </xsdxt:samples> |
2435 | + </xsd:appinfo> |
2436 | + </annotation> |
2437 | + </element> |
2438 | + |
2439 | + <!-- Complex Types --> |
2440 | + <complexType name="Image"> |
2441 | + <sequence> |
2442 | + <element name="metadata" type="csapi:Metadata" minOccurs="0"> |
2443 | + <annotation> |
2444 | + <xsd:documentation |
2445 | + xml:lang="EN" |
2446 | + xmlns="http://www.w3.org/1999/xhtml"> |
2447 | + <p> |
2448 | + A collection of meta data items associated with the image. |
2449 | + </p> |
2450 | + </xsd:documentation> |
2451 | + </annotation> |
2452 | + </element> |
2453 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2454 | + </sequence> |
2455 | + <attribute type="xsd:int" name="id" use="optional"> |
2456 | + <annotation> |
2457 | + <xsd:documentation |
2458 | + xml:lang="EN" |
2459 | + xmlns="http://www.w3.org/1999/xhtml"> |
2460 | + <p> |
2461 | + The ID of the image. |
2462 | + </p> |
2463 | + </xsd:documentation> |
2464 | + </annotation> |
2465 | + </attribute> |
2466 | + <attribute type="xsd:string" name="name" use="required"> |
2467 | + <annotation> |
2468 | + <xsd:documentation |
2469 | + xml:lang="EN" |
2470 | + xmlns="http://www.w3.org/1999/xhtml"> |
2471 | + <p> |
2472 | + The name of the image. |
2473 | + </p> |
2474 | + </xsd:documentation> |
2475 | + </annotation> |
2476 | + </attribute> |
2477 | + <attribute type="xsd:anyURI" name="serverRef" use="optional"> |
2478 | + <annotation> |
2479 | + <xsd:documentation |
2480 | + xml:lang="EN" |
2481 | + xmlns="http://www.w3.org/1999/xhtml"> |
2482 | + <p> |
2483 | + An optional reference of the server associated with the image. |
2484 | + </p> |
2485 | + </xsd:documentation> |
2486 | + </annotation> |
2487 | + </attribute> |
2488 | + <attribute type="xsd:dateTime" name="updated" use="optional"> |
2489 | + <annotation> |
2490 | + <xsd:documentation |
2491 | + xml:lang="EN" |
2492 | + xmlns="http://www.w3.org/1999/xhtml"> |
2493 | + <p> |
2494 | + A time-stamp identifying the modification time of the |
2495 | + image. |
2496 | + </p> |
2497 | + </xsd:documentation> |
2498 | + </annotation> |
2499 | + </attribute> |
2500 | + <attribute type="xsd:dateTime" name="created" use="optional"> |
2501 | + <annotation> |
2502 | + <xsd:documentation |
2503 | + xml:lang="EN" |
2504 | + xmlns="http://www.w3.org/1999/xhtml"> |
2505 | + <p> |
2506 | + A creation time-stamp for the image. |
2507 | + </p> |
2508 | + </xsd:documentation> |
2509 | + </annotation> |
2510 | + </attribute> |
2511 | + <attribute type="csapi:Progress" name="progress" use="optional"> |
2512 | + <annotation> |
2513 | + <xsd:documentation |
2514 | + xml:lang="EN" |
2515 | + xmlns="http://www.w3.org/1999/xhtml"> |
2516 | + <p> |
2517 | + The progress of the current image operation. |
2518 | + </p> |
2519 | + </xsd:documentation> |
2520 | + </annotation> |
2521 | + </attribute> |
2522 | + <attribute type="csapi:ImageStatus" name="status" use="optional"> |
2523 | + <annotation> |
2524 | + <xsd:documentation |
2525 | + xml:lang="EN" |
2526 | + xmlns="http://www.w3.org/1999/xhtml"> |
2527 | + <p> |
2528 | + The current state (or <a href="#type_ImageStatus" |
2529 | + title="See definition of ImageStatus">status</a>) of the |
2530 | + image. |
2531 | + </p> |
2532 | + </xsd:documentation> |
2533 | + </annotation> |
2534 | + </attribute> |
2535 | + <anyAttribute namespace="##other" processContents="lax"/> |
2536 | + </complexType> |
2537 | + |
2538 | + <complexType name="Images"> |
2539 | + <sequence> |
2540 | + <element name="image" type="csapi:Image" minOccurs="0" maxOccurs="1000"> |
2541 | + <annotation> |
2542 | + <xsd:documentation |
2543 | + xml:lang="EN" |
2544 | + xmlns="http://www.w3.org/1999/xhtml"> |
2545 | + <p> |
2546 | + A collection of images. |
2547 | + </p> |
2548 | + </xsd:documentation> |
2549 | + </annotation> |
2550 | + </element> |
2551 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
2552 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2553 | + </sequence> |
2554 | + <anyAttribute namespace="##other" processContents="lax"/> |
2555 | + </complexType> |
2556 | + |
2557 | + <!-- Simple Types --> |
2558 | + <simpleType name="ImageStatus"> |
2559 | + <restriction base="xsd:string"> |
2560 | + <enumeration value="UNKNOWN"> |
2561 | + <annotation> |
2562 | + <xsd:documentation |
2563 | + xml:lang="EN" |
2564 | + xmlns="http://www.w3.org/1999/xhtml"> |
2565 | + <p> |
2566 | + The image is in an unknown state. |
2567 | + </p> |
2568 | + </xsd:documentation> |
2569 | + </annotation> |
2570 | + </enumeration> |
2571 | + <enumeration value="ACTIVE"> |
2572 | + <annotation> |
2573 | + <xsd:documentation |
2574 | + xml:lang="EN" |
2575 | + xmlns="http://www.w3.org/1999/xhtml"> |
2576 | + <p> |
2577 | + All operations have completed successfully, the image is |
2578 | + available for install. |
2579 | + </p> |
2580 | + </xsd:documentation> |
2581 | + </annotation> |
2582 | + </enumeration> |
2583 | + <enumeration value="SAVING"> |
2584 | + <annotation> |
2585 | + <xsd:documentation |
2586 | + xml:lang="EN" |
2587 | + xmlns="http://www.w3.org/1999/xhtml"> |
2588 | + <p> |
2589 | + The image is being created (or saved). |
2590 | + </p> |
2591 | + </xsd:documentation> |
2592 | + </annotation> |
2593 | + </enumeration> |
2594 | + <enumeration value="PREPARING"> |
2595 | + <annotation> |
2596 | + <xsd:documentation |
2597 | + xml:lang="EN" |
2598 | + xmlns="http://www.w3.org/1999/xhtml"> |
2599 | + <p> |
2600 | + The image is being prepared to perform an operation. |
2601 | + </p> |
2602 | + </xsd:documentation> |
2603 | + </annotation> |
2604 | + </enumeration> |
2605 | + <enumeration value="QUEUED"> |
2606 | + <annotation> |
2607 | + <xsd:documentation |
2608 | + xml:lang="EN" |
2609 | + xmlns="http://www.w3.org/1999/xhtml"> |
2610 | + <p> |
2611 | + A request to perform an operation on the specified image |
2612 | + has been received. The operation is pending. |
2613 | + </p> |
2614 | + </xsd:documentation> |
2615 | + </annotation> |
2616 | + </enumeration> |
2617 | + <enumeration value="FAILED"> |
2618 | + <annotation> |
2619 | + <xsd:documentation |
2620 | + xml:lang="EN" |
2621 | + xmlns="http://www.w3.org/1999/xhtml"> |
2622 | + <p> |
2623 | + The requested operation has failed. |
2624 | + </p> |
2625 | + </xsd:documentation> |
2626 | + </annotation> |
2627 | + </enumeration> |
2628 | + </restriction> |
2629 | + </simpleType> |
2630 | +</schema> |
2631 | + |
2632 | |
2633 | === added file 'nova/api/openstack/schemas/v1.1/ipgroup.xsd' |
2634 | --- nova/api/openstack/schemas/v1.1/ipgroup.xsd 1970-01-01 00:00:00 +0000 |
2635 | +++ nova/api/openstack/schemas/v1.1/ipgroup.xsd 2011-04-07 17:22:59 +0000 |
2636 | @@ -0,0 +1,231 @@ |
2637 | +<?xml version="1.0" encoding="UTF-8"?> |
2638 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
2639 | + |
2640 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
2641 | + |
2642 | +<schema |
2643 | + elementFormDefault="qualified" |
2644 | + attributeFormDefault="unqualified" |
2645 | + xmlns="http://www.w3.org/2001/XMLSchema" |
2646 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
2647 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
2648 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
2649 | + xmlns:atom="http://www.w3.org/2005/Atom" |
2650 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
2651 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
2652 | +> |
2653 | + <annotation> |
2654 | + <xsd:appinfo |
2655 | + xml:lang="EN" |
2656 | + xmlns="http://www.w3.org/1999/xhtml"> |
2657 | + <xsdxt:title>Shared IP Groups</xsdxt:title> |
2658 | + <xsdxt:link rel="index" href="api.xsd" /> |
2659 | + </xsd:appinfo> |
2660 | + <xsd:documentation |
2661 | + xml:lang="EN" |
2662 | + xmlns="http://www.w3.org/1999/xhtml"> |
2663 | + <p> |
2664 | + This schema file defines all entities related to <a |
2665 | + href="#type_SharedIpGroup" title="See definition of |
2666 | + SharedIPGroup">Shared IP Groups</a>. |
2667 | + </p> |
2668 | + </xsd:documentation> |
2669 | + </annotation> |
2670 | + |
2671 | + <!-- Import ATOM specific schema definitions --> |
2672 | + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
2673 | + |
2674 | + <element name="sharedIpGroup" type="csapi:SharedIpGroup"> |
2675 | + <annotation> |
2676 | + <xsd:documentation |
2677 | + xml:lang="EN" |
2678 | + xmlns="http://www.w3.org/1999/xhtml"> |
2679 | + <p> |
2680 | + The element defines a group of servers that can share one or |
2681 | + more public IPs with each other. |
2682 | + </p> |
2683 | + </xsd:documentation> |
2684 | + <xsd:appinfo> |
2685 | + <xsdxt:samples> |
2686 | + <xsdxt:sample> |
2687 | + <xsdxt:code type="application/xml" href="../samples/ipgroup.xml" /> |
2688 | + </xsdxt:sample> |
2689 | + <xsdxt:sample> |
2690 | + <xsdxt:code type="application/json" href="../samples/ipgroup.json" /> |
2691 | + </xsdxt:sample> |
2692 | + </xsdxt:samples> |
2693 | + </xsd:appinfo> |
2694 | + </annotation> |
2695 | + </element> |
2696 | + <element name="sharedIpGroups" type="csapi:SharedIpGroups"> |
2697 | + <annotation> |
2698 | + <xsd:documentation |
2699 | + xml:lang="EN" |
2700 | + xmlns="http://www.w3.org/1999/xhtml"> |
2701 | + <p> |
2702 | + A collection of shared IP groups. |
2703 | + </p> |
2704 | + </xsd:documentation> |
2705 | + <xsd:appinfo> |
2706 | + <xsdxt:samples> |
2707 | + <xsdxt:sample> |
2708 | + <xsdxt:code type="application/xml" href="../samples/ipgroups.xml" /> |
2709 | + </xsdxt:sample> |
2710 | + <xsdxt:sample> |
2711 | + <xsdxt:code type="application/json" href="../samples/ipgroups.json" /> |
2712 | + </xsdxt:sample> |
2713 | + </xsdxt:samples> |
2714 | + </xsd:appinfo> |
2715 | + </annotation> |
2716 | + </element> |
2717 | + |
2718 | + <!-- Complex Types --> |
2719 | + <complexType name="SharedIpGroup"> |
2720 | + <sequence> |
2721 | + <choice> |
2722 | + <annotation> |
2723 | + <xsd:documentation |
2724 | + xml:lang="EN" |
2725 | + xmlns="http://www.w3.org/1999/xhtml"> |
2726 | + <p> |
2727 | + An IP group type can take two basic forms. On a request |
2728 | + a single, optional, server ID may be specified… |
2729 | + </p> |
2730 | + <xsdxt:samples> |
2731 | + <xsdxt:sample> |
2732 | + <xsdxt:code type="application/xml" href="../samples/ipgroup2.xml" /> |
2733 | + </xsdxt:sample> |
2734 | + <xsdxt:sample> |
2735 | + <xsdxt:code type="application/json" href="../samples/ipgroup2.json" /> |
2736 | + </xsdxt:sample> |
2737 | + </xsdxt:samples> |
2738 | + <p> |
2739 | + …on a response a server ID list is always returned. This |
2740 | + server list may be empty… |
2741 | + </p> |
2742 | + <xsdxt:samples> |
2743 | + <xsdxt:sample> |
2744 | + <xsdxt:code type="application/xml" href="../samples/ipgroup.xml" /> |
2745 | + </xsdxt:sample> |
2746 | + <xsdxt:sample> |
2747 | + <xsdxt:code type="application/json" href="../samples/ipgroup.json" /> |
2748 | + </xsdxt:sample> |
2749 | + </xsdxt:samples> |
2750 | + <p> |
2751 | + …note that is a mutually exclusive choice: either |
2752 | + a <server> or <servers> element must be |
2753 | + specified, but not both. |
2754 | + </p> |
2755 | + </xsd:documentation> |
2756 | + </annotation> |
2757 | + <element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="1"> |
2758 | + <annotation> |
2759 | + <xsd:documentation |
2760 | + xml:lang="EN" |
2761 | + xmlns="http://www.w3.org/1999/xhtml"> |
2762 | + <p> |
2763 | + A single, optional, server ID. This form is used when |
2764 | + creating an IP group. |
2765 | + </p> |
2766 | + </xsd:documentation> |
2767 | + </annotation> |
2768 | + </element> |
2769 | + <element name="servers" type="csapi:ServerIDList"> |
2770 | + <annotation> |
2771 | + <xsd:documentation |
2772 | + xml:lang="EN" |
2773 | + xmlns="http://www.w3.org/1999/xhtml"> |
2774 | + <p> |
2775 | + A collection of server IDs. This form is used when |
2776 | + querying an IP group. |
2777 | + </p> |
2778 | + </xsd:documentation> |
2779 | + </annotation> |
2780 | + </element> |
2781 | + </choice> |
2782 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2783 | + </sequence> |
2784 | + <attribute type="xsd:int" name="id" use="optional"> |
2785 | + <annotation> |
2786 | + <xsd:documentation |
2787 | + xml:lang="EN" |
2788 | + xmlns="http://www.w3.org/1999/xhtml"> |
2789 | + <p> |
2790 | + The ID of the shared IP group. The attribute should not |
2791 | + be specified when creating a new shared IP group. |
2792 | + </p> |
2793 | + </xsd:documentation> |
2794 | + </annotation> |
2795 | + </attribute> |
2796 | + <attribute type="xsd:string" name="name" use="required"> |
2797 | + <annotation> |
2798 | + <xsd:documentation |
2799 | + xml:lang="EN" |
2800 | + xmlns="http://www.w3.org/1999/xhtml"> |
2801 | + <p> |
2802 | + The name of the shared IP group. |
2803 | + </p> |
2804 | + </xsd:documentation> |
2805 | + </annotation> |
2806 | + </attribute> |
2807 | + <anyAttribute namespace="##other" processContents="lax"/> |
2808 | + </complexType> |
2809 | + |
2810 | + <complexType name="SharedIpGroups"> |
2811 | + <sequence> |
2812 | + <element name="sharedIpGroup" type="csapi:SharedIpGroup" minOccurs="0" maxOccurs="1000"> |
2813 | + <annotation> |
2814 | + <xsd:documentation |
2815 | + xml:lang="EN" |
2816 | + xmlns="http://www.w3.org/1999/xhtml"> |
2817 | + <p> |
2818 | + A collection of shared IP groups. |
2819 | + </p> |
2820 | + </xsd:documentation> |
2821 | + </annotation> |
2822 | + </element> |
2823 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
2824 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2825 | + </sequence> |
2826 | + <anyAttribute namespace="##other" processContents="lax"/> |
2827 | + </complexType> |
2828 | + |
2829 | + <complexType name="ServerIDList"> |
2830 | + <sequence> |
2831 | + <element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="25"> |
2832 | + <annotation> |
2833 | + <xsd:documentation |
2834 | + xml:lang="EN" |
2835 | + xmlns="http://www.w3.org/1999/xhtml"> |
2836 | + <p> |
2837 | + A collection of servers within a shared IP group. |
2838 | + </p> |
2839 | + </xsd:documentation> |
2840 | + </annotation> |
2841 | + </element> |
2842 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2843 | + </sequence> |
2844 | + <anyAttribute namespace="##other" processContents="lax"/> |
2845 | + </complexType> |
2846 | + |
2847 | + <complexType name="ServerID"> |
2848 | + <sequence> |
2849 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2850 | + </sequence> |
2851 | + <attribute name="id" type="xsd:int" use="required"> |
2852 | + <annotation> |
2853 | + <xsd:documentation |
2854 | + xml:lang="EN" |
2855 | + xmlns="http://www.w3.org/1999/xhtml"> |
2856 | + <p> |
2857 | + The ID of a server within a shared IP group. |
2858 | + </p> |
2859 | + </xsd:documentation> |
2860 | + </annotation> |
2861 | + </attribute> |
2862 | + <anyAttribute namespace="##other" processContents="lax"/> |
2863 | + </complexType> |
2864 | +</schema> |
2865 | + |
2866 | + |
2867 | + |
2868 | |
2869 | === added file 'nova/api/openstack/schemas/v1.1/limits.xsd' |
2870 | --- nova/api/openstack/schemas/v1.1/limits.xsd 1970-01-01 00:00:00 +0000 |
2871 | +++ nova/api/openstack/schemas/v1.1/limits.xsd 2011-04-07 17:22:59 +0000 |
2872 | @@ -0,0 +1,282 @@ |
2873 | +<?xml version="1.0" encoding="UTF-8"?> |
2874 | + |
2875 | +<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" |
2876 | + targetNamespace="http://docs.openstack.org/common/api/v1.0" |
2877 | + xmlns:limits="http://docs.openstack.org/common/api/v1.0" |
2878 | + xmlns:html="http://www.w3.org/1999/xhtml" |
2879 | + xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
2880 | + |
2881 | + <!-- Enumeration and SimpleType definitions --> |
2882 | + <xs:simpleType name="HttpMethod"> |
2883 | + <xs:annotation> |
2884 | + <xs:documentation> |
2885 | + <html:p> |
2886 | + The HttpMethod simple type defines a string |
2887 | + enumeration of HTTP method verbs as outlined in <a |
2888 | + href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a> |
2889 | + section 9. |
2890 | + </html:p> |
2891 | + </xs:documentation> |
2892 | + </xs:annotation> |
2893 | + |
2894 | + <xs:restriction base="xs:string"> |
2895 | + <xs:enumeration value="GET" /> |
2896 | + <xs:enumeration value="DELETE" /> |
2897 | + <xs:enumeration value="POST" /> |
2898 | + <xs:enumeration value="PUT" /> |
2899 | + <xs:enumeration value="HEAD" /> |
2900 | + <xs:enumeration value="OPTIONS" /> |
2901 | + <xs:enumeration value="CONNECT" /> |
2902 | + <xs:enumeration value="TRACE" /> |
2903 | + |
2904 | + <xs:enumeration value="ALL" /> |
2905 | + </xs:restriction> |
2906 | + </xs:simpleType> |
2907 | + |
2908 | + <xs:simpleType name="TimeUnit"> |
2909 | + <xs:annotation> |
2910 | + <xs:documentation> |
2911 | + <html:p> |
2912 | + The TimeUnit simple type defines a string |
2913 | + enumeration of coarse time units that are be used |
2914 | + to define the duration of time that a limited |
2915 | + request will be unavailable for. |
2916 | + </html:p> |
2917 | + </xs:documentation> |
2918 | + </xs:annotation> |
2919 | + |
2920 | + <xs:restriction base="xs:string"> |
2921 | + <xs:enumeration value="SECOND" /> |
2922 | + <xs:enumeration value="MINUTE" /> |
2923 | + <xs:enumeration value="HOUR" /> |
2924 | + <xs:enumeration value="DAY" /> |
2925 | + </xs:restriction> |
2926 | + </xs:simpleType> |
2927 | + |
2928 | + |
2929 | + <!-- Live limit definitions --> |
2930 | + <xs:element name="limits" type="limits:Limits" /> |
2931 | + |
2932 | + <xs:complexType name="Limits"> |
2933 | + <xs:annotation> |
2934 | + <xs:documentation> |
2935 | + <html:p> |
2936 | + A Limits type defines a collection of limits |
2937 | + </html:p> |
2938 | + </xs:documentation> |
2939 | + </xs:annotation> |
2940 | + |
2941 | + <xs:sequence> |
2942 | + <xs:element name="rates" type="limits:RateLimitList" minOccurs="0" maxOccurs="1" /> |
2943 | + <xs:element name="absolute" type="limits:AbsoluteLimitList" minOccurs="0" maxOccurs="1" /> |
2944 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2945 | + </xs:sequence> |
2946 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
2947 | + </xs:complexType> |
2948 | + |
2949 | + <xs:complexType name="AbsoluteLimitList"> |
2950 | + <xs:annotation> |
2951 | + <xs:documentation> |
2952 | + <html:p> |
2953 | + An AbsoluteLimitList type defines a list of absolute limits |
2954 | + </html:p> |
2955 | + </xs:documentation> |
2956 | + </xs:annotation> |
2957 | + |
2958 | + <xs:sequence> |
2959 | + <xs:element name="limit" type="limits:AbsoluteLimit" minOccurs="1" maxOccurs="unbounded" /> |
2960 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2961 | + </xs:sequence> |
2962 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
2963 | + </xs:complexType> |
2964 | + |
2965 | + <xs:complexType name="RateLimitList"> |
2966 | + <xs:annotation> |
2967 | + <xs:documentation> |
2968 | + <html:p> |
2969 | + A RateLimitList type defines a list of resource |
2970 | + scoped limit collections. |
2971 | + </html:p> |
2972 | + </xs:documentation> |
2973 | + </xs:annotation> |
2974 | + |
2975 | + <xs:sequence> |
2976 | + <xs:element name="rate" type="limits:ResourceRateLimits" minOccurs="1" maxOccurs="unbounded" /> |
2977 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2978 | + </xs:sequence> |
2979 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
2980 | + </xs:complexType> |
2981 | + |
2982 | + <xs:complexType name="ResourceRateLimits"> |
2983 | + <xs:annotation> |
2984 | + <xs:documentation> |
2985 | + <html:p> |
2986 | + A ResourceLimitCollection type represents a |
2987 | + collection of limits that are scoped to a single |
2988 | + resource variant. |
2989 | + </html:p> |
2990 | + </xs:documentation> |
2991 | + </xs:annotation> |
2992 | + |
2993 | + <xs:sequence> |
2994 | + <xs:element name="limit" type="limits:RateLimit" minOccurs="1" maxOccurs="unbounded" /> |
2995 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
2996 | + </xs:sequence> |
2997 | + |
2998 | + <xs:attribute name="uri" type="xs:string" use="required"> |
2999 | + <xs:annotation> |
3000 | + <xs:documentation> |
3001 | + <html:p> |
3002 | + The uri of a limit collection is a human |
3003 | + readable string version of the regular |
3004 | + expression matcher that is used to define the |
3005 | + limit collection resource scope. |
3006 | + </html:p> |
3007 | + </xs:documentation> |
3008 | + </xs:annotation> |
3009 | + </xs:attribute> |
3010 | + |
3011 | + <xs:attribute name="regex" type="xs:string" use="required"> |
3012 | + <xs:annotation> |
3013 | + <xs:documentation> |
3014 | + <html:p> |
3015 | + A collection of limits are scoped to a |
3016 | + resource by a regular expression. |
3017 | + |
3018 | + <html:div class="note"> |
3019 | + <html:strong>Note:</html:strong> the |
3020 | + regular expressions are only guaranteed to |
3021 | + work with the Java Standard Edition 6 |
3022 | + Regular Expression Engine. Please see the |
3023 | + <html:a |
3024 | + href="http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html">JAPI |
3025 | + documentation</html:a> for more |
3026 | + information. |
3027 | + </html:div> |
3028 | + </html:p> |
3029 | + </xs:documentation> |
3030 | + </xs:annotation> |
3031 | + </xs:attribute> |
3032 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
3033 | + </xs:complexType> |
3034 | + |
3035 | + <xs:complexType name="AbsoluteLimit"> |
3036 | + <xs:annotation> |
3037 | + <xs:documentation> |
3038 | + <html:p> |
3039 | + Absolute limits are predefined fixed limits. We |
3040 | + define each of these limits as a key/value |
3041 | + pair. Please consult the API Specification for a |
3042 | + list of absolute limits used by the system. |
3043 | + </html:p> |
3044 | + </xs:documentation> |
3045 | + </xs:annotation> |
3046 | + |
3047 | + <xs:sequence> |
3048 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3049 | + </xs:sequence> |
3050 | + <xs:attribute name="name" type="xs:string" use="required"> |
3051 | + <xs:annotation> |
3052 | + <xs:documentation> |
3053 | + <html:p> |
3054 | + The name (or key) of the absolute limit. |
3055 | + </html:p> |
3056 | + </xs:documentation> |
3057 | + </xs:annotation> |
3058 | + </xs:attribute> |
3059 | + |
3060 | + <xs:attribute name="value" type="xs:int" use="required"> |
3061 | + <xs:annotation> |
3062 | + <xs:documentation> |
3063 | + <html:p> |
3064 | + A value specifying the absolute limit.The name |
3065 | + of the absolute limit determines the unit |
3066 | + type. For example, the key maxIPGroups implies |
3067 | + that the value is in terms of IPGroups. |
3068 | + </html:p> |
3069 | + </xs:documentation> |
3070 | + </xs:annotation> |
3071 | + </xs:attribute> |
3072 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
3073 | + </xs:complexType> |
3074 | + |
3075 | + <xs:complexType name="RateLimit"> |
3076 | + <xs:annotation> |
3077 | + <xs:documentation> |
3078 | + <html:p> |
3079 | + A Rate Limit type defines the maximum number of |
3080 | + requests that can be performed, the time interval |
3081 | + that each limited request will be unavailable for, |
3082 | + and, for convience, the remaining number of |
3083 | + requests remaining. This is done for every |
3084 | + HttpMethod that is rate limited. |
3085 | + </html:p> |
3086 | + </xs:documentation> |
3087 | + </xs:annotation> |
3088 | + <xs:sequence> |
3089 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3090 | + </xs:sequence> |
3091 | + <xs:attribute name="verb" type="limits:HttpMethod" use="required"> |
3092 | + <xs:annotation> |
3093 | + <xs:documentation> |
3094 | + <html:p> |
3095 | + The verb of a Limit represents the HttpMethod |
3096 | + that the Limit is scoped to. |
3097 | + </html:p> |
3098 | + </xs:documentation> |
3099 | + </xs:annotation> |
3100 | + </xs:attribute> |
3101 | + |
3102 | + <xs:attribute name="value" type="xs:int" use="required"> |
3103 | + <xs:annotation> |
3104 | + <xs:documentation> |
3105 | + <html:p> |
3106 | + The value of a Limit represents maximum Number |
3107 | + of requests that the rate limit will allow. |
3108 | + </html:p> |
3109 | + </xs:documentation> |
3110 | + </xs:annotation> |
3111 | + </xs:attribute> |
3112 | + |
3113 | + <xs:attribute name="remaining" type="xs:int" use="required"> |
3114 | + <xs:annotation> |
3115 | + <xs:documentation> |
3116 | + <html:p> |
3117 | + The remaining number of requests that a user |
3118 | + can make against the limited resource before |
3119 | + being denied access. |
3120 | + </html:p> |
3121 | + </xs:documentation> |
3122 | + </xs:annotation> |
3123 | + </xs:attribute> |
3124 | + |
3125 | + <xs:attribute name="unit" type="limits:TimeUnit" use="required"> |
3126 | + <xs:annotation> |
3127 | + <xs:documentation> |
3128 | + <html:p> |
3129 | + The unit of a Limit defines the duration of a |
3130 | + limited request's unavailability. |
3131 | + </html:p> |
3132 | + </xs:documentation> |
3133 | + </xs:annotation> |
3134 | + </xs:attribute> |
3135 | + |
3136 | + <xs:attribute name="next-available" type="xs:dateTime" use="required"> |
3137 | + <xs:annotation> |
3138 | + <xs:documentation> |
3139 | + <html:p> |
3140 | + The next-available attribute of a Limit tells |
3141 | + the user when a limited request will become |
3142 | + available for consumption. |
3143 | + |
3144 | + <html:div class="note"> |
3145 | + <html:strong>Note:</html:strong> this attribute uses the |
3146 | + <html:a href="http://www.iso.org/iso/date_and_time_format">ISO 8601</html:a> date standard. |
3147 | + </html:div> |
3148 | + </html:p> |
3149 | + </xs:documentation> |
3150 | + </xs:annotation> |
3151 | + </xs:attribute> |
3152 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
3153 | + </xs:complexType> |
3154 | +</xs:schema> |
3155 | |
3156 | === added file 'nova/api/openstack/schemas/v1.1/server.xsd' |
3157 | --- nova/api/openstack/schemas/v1.1/server.xsd 1970-01-01 00:00:00 +0000 |
3158 | +++ nova/api/openstack/schemas/v1.1/server.xsd 2011-04-07 17:22:59 +0000 |
3159 | @@ -0,0 +1,1010 @@ |
3160 | +<?xml version="1.0" encoding="UTF-8"?> |
3161 | +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> |
3162 | + |
3163 | +<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved --> |
3164 | + |
3165 | +<schema |
3166 | + elementFormDefault="qualified" |
3167 | + attributeFormDefault="unqualified" |
3168 | + xmlns="http://www.w3.org/2001/XMLSchema" |
3169 | + xmlns:csapi="http://docs.openstack.org/compute/api/v1.1" |
3170 | + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" |
3171 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
3172 | + xmlns:atom="http://www.w3.org/2005/Atom" |
3173 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
3174 | + targetNamespace="http://docs.openstack.org/compute/api/v1.1" |
3175 | +> |
3176 | + <annotation> |
3177 | + <xsd:appinfo |
3178 | + xml:lang="EN" |
3179 | + xmlns="http://www.w3.org/1999/xhtml"> |
3180 | + <xsdxt:title>Servers and Related Types</xsdxt:title> |
3181 | + <xsdxt:link rel="index" href="api.xsd" /> |
3182 | + </xsd:appinfo> |
3183 | + <xsd:documentation |
3184 | + xml:lang="EN" |
3185 | + xmlns="http://www.w3.org/1999/xhtml"> |
3186 | + <p> |
3187 | + This schema file defines a <a href="#type_Server" title="Server Type Definition"> |
3188 | + Server</a> and all internal entities |
3189 | + related to servers including: |
3190 | + <a href="#type_Addresses" title="Addresses type definition">Addresses</a>, |
3191 | + <a href="#type_ShareIp" title="ShareIp type definition">ShareIPs</a>, |
3192 | + <a href="#type_File" title="File type definition">Files</a>, and |
3193 | + <a href="#type_Metadata" title="Metadata type definition">MetaData</a>. |
3194 | + </p> |
3195 | + </xsd:documentation> |
3196 | + </annotation> |
3197 | + |
3198 | + <!-- Import ATOM specific schema definitions --> |
3199 | + <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
3200 | + |
3201 | + <include schemaLocation="common.xsd"> |
3202 | + <annotation> |
3203 | + <xsd:documentation |
3204 | + xml:lang="EN" |
3205 | + xmlns="http://www.w3.org/1999/xhtml"> |
3206 | + <p> |
3207 | + Common types used by multiple entities and possibly spanning |
3208 | + several types of requests. |
3209 | + </p> |
3210 | + </xsd:documentation> |
3211 | + </annotation> |
3212 | + </include> |
3213 | + |
3214 | + <element name="server" type="csapi:Server"> |
3215 | + <annotation> |
3216 | + <xsd:documentation |
3217 | + xml:lang="EN" |
3218 | + xmlns="http://www.w3.org/1999/xhtml"> |
3219 | + <p> |
3220 | + The element defines a server. |
3221 | + </p> |
3222 | + </xsd:documentation> |
3223 | + <xsd:appinfo> |
3224 | + <xsdxt:samples> |
3225 | + <xsdxt:sample> |
3226 | + <xsdxt:code type="application/xml" href="../samples/server.xml" /> |
3227 | + </xsdxt:sample> |
3228 | + <xsdxt:sample> |
3229 | + <xsdxt:code type="application/json" href="../samples/server.json" /> |
3230 | + </xsdxt:sample> |
3231 | + </xsdxt:samples> |
3232 | + </xsd:appinfo> |
3233 | + </annotation> |
3234 | + </element> |
3235 | + |
3236 | + <element name="servers" type="csapi:Servers"> |
3237 | + <annotation> |
3238 | + <xsd:documentation |
3239 | + xml:lang="EN" |
3240 | + xmlns="http://www.w3.org/1999/xhtml"> |
3241 | + <p> |
3242 | + A collection of servers. |
3243 | + </p> |
3244 | + </xsd:documentation> |
3245 | + <xsd:appinfo> |
3246 | + <xsdxt:samples> |
3247 | + <xsdxt:sample> |
3248 | + <xsdxt:code type="application/xml" href="../samples/servers.xml" /> |
3249 | + </xsdxt:sample> |
3250 | + <xsdxt:sample> |
3251 | + <xsdxt:code type="application/json" href="../samples/servers.json" /> |
3252 | + </xsdxt:sample> |
3253 | + </xsdxt:samples> |
3254 | + </xsd:appinfo> |
3255 | + </annotation> |
3256 | + </element> |
3257 | + |
3258 | + <element name="addresses" type="csapi:Addresses"> |
3259 | + <annotation> |
3260 | + <xsd:documentation |
3261 | + xml:lang="EN" |
3262 | + xmlns="http://www.w3.org/1999/xhtml"> |
3263 | + <p> |
3264 | + The element defines list of addresses by network: (public, |
3265 | + private, ...). |
3266 | + </p> |
3267 | + </xsd:documentation> |
3268 | + <xsd:appinfo> |
3269 | + <xsdxt:samples> |
3270 | + <xsdxt:sample> |
3271 | + <xsdxt:code type="application/xml" href="../samples/addresses.xml" /> |
3272 | + </xsdxt:sample> |
3273 | + <xsdxt:sample> |
3274 | + <xsdxt:code type="application/json" href="../samples/addresses.json" /> |
3275 | + </xsdxt:sample> |
3276 | + </xsdxt:samples> |
3277 | + </xsd:appinfo> |
3278 | + </annotation> |
3279 | + </element> |
3280 | + |
3281 | + <element name="shareIp" type="csapi:ShareIp"> |
3282 | + <annotation> |
3283 | + <xsd:documentation |
3284 | + xml:lang="EN" |
3285 | + xmlns="http://www.w3.org/1999/xhtml"> |
3286 | + <p> |
3287 | + The element defines request to share a public IP address. |
3288 | + </p> |
3289 | + </xsd:documentation> |
3290 | + <xsd:appinfo> |
3291 | + <xsdxt:samples> |
3292 | + <xsdxt:sample> |
3293 | + <xsdxt:code type="application/xml" href="../samples/shareip.xml" /> |
3294 | + </xsdxt:sample> |
3295 | + <xsdxt:sample> |
3296 | + <xsdxt:code type="application/json" href="../samples/shareip.json" /> |
3297 | + </xsdxt:sample> |
3298 | + </xsdxt:samples> |
3299 | + </xsd:appinfo> |
3300 | + </annotation> |
3301 | + </element> |
3302 | + |
3303 | + <element name="addIp" type="csapi:AddIp"> |
3304 | + <annotation> |
3305 | + <xsd:documentation |
3306 | + xml:lang="EN" |
3307 | + xmlns="http://www.w3.org/1999/xhtml"> |
3308 | + <p> |
3309 | + The element defines request to add an IP address. |
3310 | + </p> |
3311 | + </xsd:documentation> |
3312 | + <xsd:appinfo> |
3313 | + <xsdxt:samples> |
3314 | + <xsdxt:sample> |
3315 | + <xsdxt:code type="application/xml" href="../samples/addip.xml" /> |
3316 | + </xsdxt:sample> |
3317 | + <xsdxt:sample> |
3318 | + <xsdxt:code type="application/json" href="../samples/addip.json" /> |
3319 | + </xsdxt:sample> |
3320 | + </xsdxt:samples> |
3321 | + </xsd:appinfo> |
3322 | + </annotation> |
3323 | + </element> |
3324 | + |
3325 | + <element name="network" type="csapi:AddressList" /> |
3326 | + |
3327 | + <element name="ip" type="csapi:Address"> |
3328 | + <annotation> |
3329 | + <xsd:documentation |
3330 | + xml:lang="EN" |
3331 | + xmlns="http://www.w3.org/1999/xhtml"> |
3332 | + <p> |
3333 | + The element defines response that returns an added IP address. |
3334 | + </p> |
3335 | + </xsd:documentation> |
3336 | + <xsd:appinfo> |
3337 | + <xsdxt:samples> |
3338 | + <xsdxt:sample> |
3339 | + <xsdxt:code type="application/xml" href="../samples/address.xml" /> |
3340 | + </xsdxt:sample> |
3341 | + <xsdxt:sample> |
3342 | + <xsdxt:code type="application/json" href="../samples/addip.json" /> |
3343 | + </xsdxt:sample> |
3344 | + </xsdxt:samples> |
3345 | + </xsd:appinfo> |
3346 | + </annotation> |
3347 | + </element> |
3348 | + |
3349 | + |
3350 | + <!-- Complex Types --> |
3351 | + <complexType name="Server"> |
3352 | + <annotation> |
3353 | + <xsd:documentation |
3354 | + xml:lang="EN" |
3355 | + xmlns="http://www.w3.org/1999/xhtml"> |
3356 | + <p> |
3357 | + A server is a virtual machine instance in the Cloud Servers |
3358 | + system. Note that this complex type defines all elements |
3359 | + and attributes as optional because a server instance may |
3360 | + take many different forms depending on the operation. When |
3361 | + creating a server, for example, the name, imageRef, and |
3362 | + flavorRef attributes are required. In addition, optional |
3363 | + metadata and personality file elements may be specified: |
3364 | + </p> |
3365 | + <xsdxt:samples> |
3366 | + <xsdxt:sample> |
3367 | + <xsdxt:code type="application/xml" href="../samples/server-post-req.xml" /> |
3368 | + </xsdxt:sample> |
3369 | + <xsdxt:sample> |
3370 | + <xsdxt:code type="application/json" href="../samples/server-post-req.json" /> |
3371 | + </xsdxt:sample> |
3372 | + </xsdxt:samples> |
3373 | + <p> |
3374 | + The response to such a crate operation will include the |
3375 | + administration password, host ID, and addresses associated |
3376 | + with the server: |
3377 | + </p> |
3378 | + <xsdxt:samples> |
3379 | + <xsdxt:sample> |
3380 | + <xsdxt:code type="application/xml" href="../samples/server-post-resp.xml" /> |
3381 | + </xsdxt:sample> |
3382 | + <xsdxt:sample> |
3383 | + <xsdxt:code type="application/json" href="../samples/server-post-resp.json" /> |
3384 | + </xsdxt:sample> |
3385 | + </xsdxt:samples> |
3386 | + <p> |
3387 | + When modifying a server only the name and administration |
3388 | + password should be specified as these are the only |
3389 | + attributes that are modifiable. |
3390 | + </p> |
3391 | + <xsdxt:samples> |
3392 | + <xsdxt:sample> |
3393 | + <xsdxt:code type="application/xml" href="../samples/server-put-req.xml" /> |
3394 | + </xsdxt:sample> |
3395 | + <xsdxt:sample> |
3396 | + <xsdxt:code type="application/json" href="../samples/server-put-req.json" /> |
3397 | + </xsdxt:sample> |
3398 | + </xsdxt:samples> |
3399 | + </xsd:documentation> |
3400 | + </annotation> |
3401 | + <sequence> |
3402 | + <element name="metadata" type="csapi:Metadata" minOccurs="0"> |
3403 | + <annotation> |
3404 | + <xsd:documentation |
3405 | + xml:lang="EN" |
3406 | + xmlns="http://www.w3.org/1999/xhtml"> |
3407 | + <p> |
3408 | + A collection of meta data items associated with the server. |
3409 | + </p> |
3410 | + </xsd:documentation> |
3411 | + </annotation> |
3412 | + </element> |
3413 | + <element ref="csapi:addresses" minOccurs="0"> |
3414 | + <annotation> |
3415 | + <xsd:documentation |
3416 | + xml:lang="EN" |
3417 | + xmlns="http://www.w3.org/1999/xhtml"> |
3418 | + <p> |
3419 | + A server's public and private address. |
3420 | + </p> |
3421 | + </xsd:documentation> |
3422 | + </annotation> |
3423 | + </element> |
3424 | + <element name="personality" type="csapi:Personality" minOccurs="0"> |
3425 | + <annotation> |
3426 | + <xsd:documentation |
3427 | + xml:lang="EN" |
3428 | + xmlns="http://www.w3.org/1999/xhtml"> |
3429 | + <p> |
3430 | + A collection of small <a href="#type_File" title="See |
3431 | + definition of file">files</a> used to personalize a new |
3432 | + server instance. |
3433 | + </p> |
3434 | + </xsd:documentation> |
3435 | + </annotation> |
3436 | + </element> |
3437 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3438 | + </sequence> |
3439 | + <attribute type="xsd:string" name="name" use="optional"> |
3440 | + <annotation> |
3441 | + <xsd:documentation |
3442 | + xml:lang="EN" |
3443 | + xmlns="http://www.w3.org/1999/xhtml"> |
3444 | + <p> |
3445 | + The name of the server. |
3446 | + </p> |
3447 | + </xsd:documentation> |
3448 | + </annotation> |
3449 | + </attribute> |
3450 | + <attribute type="xsd:int" name="id" use="optional"> |
3451 | + <annotation> |
3452 | + <xsd:documentation |
3453 | + xml:lang="EN" |
3454 | + xmlns="http://www.w3.org/1999/xhtml"> |
3455 | + <p> |
3456 | + The ID of the server. |
3457 | + </p> |
3458 | + </xsd:documentation> |
3459 | + </annotation> |
3460 | + </attribute> |
3461 | + <attribute type="xsd:string" name="adminPass" use="optional"> |
3462 | + <annotation> |
3463 | + <xsd:documentation |
3464 | + xml:lang="EN" |
3465 | + xmlns="http://www.w3.org/1999/xhtml"> |
3466 | + <p> |
3467 | + The server's administration password. |
3468 | + </p> |
3469 | + </xsd:documentation> |
3470 | + </annotation> |
3471 | + </attribute> |
3472 | + <attribute type="xsd:anyURI" name="imageRef" use="optional"> |
3473 | + <annotation> |
3474 | + <xsd:documentation |
3475 | + xml:lang="EN" |
3476 | + xmlns="http://www.w3.org/1999/xhtml"> |
3477 | + <p> |
3478 | + A reference to an image used to create the server. The |
3479 | + refrence may be an image ID, or it may be a full path to |
3480 | + an image resource. |
3481 | + </p> |
3482 | + </xsd:documentation> |
3483 | + </annotation> |
3484 | + </attribute> |
3485 | + <attribute type="xsd:anyURI" name="flavorRef" use="optional"> |
3486 | + <annotation> |
3487 | + <xsd:documentation |
3488 | + xml:lang="EN" |
3489 | + xmlns="http://www.w3.org/1999/xhtml"> |
3490 | + <p> |
3491 | + The current server flavor. |
3492 | + </p> |
3493 | + </xsd:documentation> |
3494 | + </annotation> |
3495 | + </attribute> |
3496 | + <attribute type="xsd:string" name="hostId" use="optional"> |
3497 | + <annotation> |
3498 | + <xsd:documentation |
3499 | + xml:lang="EN" |
3500 | + xmlns="http://www.w3.org/1999/xhtml"> |
3501 | + <p> |
3502 | + A unique ID that identifies the physical host that the VM |
3503 | + is running on. This ID is unique <strong>per |
3504 | + account</strong> and not globally unique. |
3505 | + </p> |
3506 | + </xsd:documentation> |
3507 | + </annotation> |
3508 | + </attribute> |
3509 | + <attribute type="csapi:Progress" name="progress" use="optional"> |
3510 | + <annotation> |
3511 | + <xsd:documentation |
3512 | + xml:lang="EN" |
3513 | + xmlns="http://www.w3.org/1999/xhtml"> |
3514 | + <p> |
3515 | + The progress of the current server operation. |
3516 | + </p> |
3517 | + </xsd:documentation> |
3518 | + </annotation> |
3519 | + </attribute> |
3520 | + <attribute type="csapi:ServerStatus" name="status" use="optional"> |
3521 | + <annotation> |
3522 | + <xsd:documentation |
3523 | + xml:lang="EN" |
3524 | + xmlns="http://www.w3.org/1999/xhtml"> |
3525 | + <p> |
3526 | + The current state (or <a href="#type_ServerStatus" |
3527 | + title="See definition of ServerStatus">status</a>) of the |
3528 | + server. |
3529 | + </p> |
3530 | + </xsd:documentation> |
3531 | + </annotation> |
3532 | + </attribute> |
3533 | + <attribute type="xsd:int" name="sharedIpGroupId" use="optional"> |
3534 | + <annotation> |
3535 | + <xsd:documentation |
3536 | + xml:lang="EN" |
3537 | + xmlns="http://www.w3.org/1999/xhtml"> |
3538 | + <p> |
3539 | + An ID of the <a href="ipgroup.xsd#type_SharedIpGroup" |
3540 | + title="See definition of SharedIPGroup">shared IP |
3541 | + group</a> that the server belongs to. |
3542 | + </p> |
3543 | + </xsd:documentation> |
3544 | + </annotation> |
3545 | + </attribute> |
3546 | + <attribute type="xsd:string" name="affinityId" use="optional"> |
3547 | + <annotation> |
3548 | + <xsd:documentation |
3549 | + xml:lang="EN" |
3550 | + xmlns="http://www.w3.org/1999/xhtml"> |
3551 | + <p> |
3552 | + Servers with the same affinity ID are located in the |
3553 | + same low level zone. The affinity ID is an identifier |
3554 | + for a lowest level zone that will allow customers to |
3555 | + specify placement of VM. This can be used for a varity |
3556 | + of things including IPv6 sharing. |
3557 | + </p> |
3558 | + </xsd:documentation> |
3559 | + </annotation> |
3560 | + </attribute> |
3561 | + <attribute type="xsd:dateTime" name="updated" use="optional"> |
3562 | + <annotation> |
3563 | + <xsd:documentation |
3564 | + xml:lang="EN" |
3565 | + xmlns="http://www.w3.org/1999/xhtml"> |
3566 | + <p> |
3567 | + The time the server was updated. |
3568 | + </p> |
3569 | + </xsd:documentation> |
3570 | + </annotation> |
3571 | + </attribute> |
3572 | + <attribute type="xsd:dateTime" name="created" use="optional"> |
3573 | + <annotation> |
3574 | + <xsd:documentation |
3575 | + xml:lang="EN" |
3576 | + xmlns="http://www.w3.org/1999/xhtml"> |
3577 | + <p> |
3578 | + The time the server was created. |
3579 | + </p> |
3580 | + </xsd:documentation> |
3581 | + </annotation> |
3582 | + </attribute> |
3583 | + <anyAttribute namespace="##other" processContents="lax"/> |
3584 | + </complexType> |
3585 | + |
3586 | + <complexType name="Servers"> |
3587 | + <sequence> |
3588 | + <element name="server" type="csapi:Server" minOccurs="0" maxOccurs="1000"> |
3589 | + <annotation> |
3590 | + <xsd:documentation |
3591 | + xml:lang="EN" |
3592 | + xmlns="http://www.w3.org/1999/xhtml"> |
3593 | + <p> |
3594 | + A collection of servers. |
3595 | + </p> |
3596 | + </xsd:documentation> |
3597 | + </annotation> |
3598 | + </element> |
3599 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
3600 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3601 | + </sequence> |
3602 | + <anyAttribute namespace="##other" processContents="lax"/> |
3603 | + </complexType> |
3604 | + |
3605 | + <complexType name="Personality"> |
3606 | + <annotation> |
3607 | + <xsd:documentation |
3608 | + xml:lang="EN" |
3609 | + xmlns="http://www.w3.org/1999/xhtml"> |
3610 | + A collection of small <a href="#type_File" title="See |
3611 | + definition of file">files</a> used to personalize a server |
3612 | + instance. |
3613 | + </xsd:documentation> |
3614 | + </annotation> |
3615 | + <sequence> |
3616 | + <element name="file" type="csapi:File" minOccurs="0" maxOccurs="5"> |
3617 | + <annotation> |
3618 | + <xsd:documentation |
3619 | + xml:lang="EN" |
3620 | + xmlns="http://www.w3.org/1999/xhtml"> |
3621 | + <p> |
3622 | + A collection of files. |
3623 | + </p> |
3624 | + </xsd:documentation> |
3625 | + </annotation> |
3626 | + </element> |
3627 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3628 | + </sequence> |
3629 | + <anyAttribute namespace="##other" processContents="lax"/> |
3630 | + </complexType> |
3631 | + |
3632 | + <complexType name="File"> |
3633 | + <annotation> |
3634 | + <xsd:documentation |
3635 | + xml:lang="EN" |
3636 | + xmlns="http://www.w3.org/1999/xhtml"> |
3637 | + <p> |
3638 | + A file is simply a full path along with base64 file |
3639 | + content. The name of the file is specified in the path |
3640 | + attribute and the <a href="#type_FileContent" title="See |
3641 | + definition of FileContent">file content</a> is included |
3642 | + inline. |
3643 | + </p> |
3644 | + <xsdxt:code type="application/xml"> |
3645 | + <![CDATA[ |
3646 | + <file xmlns="http://docs.openstack.org/compute/api/v1.0" |
3647 | + path="/etc/banner.txt"> |
3648 | + ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2gg |
3649 | + YSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4u |
3650 | + LnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNv |
3651 | + bnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3cs |
3652 | + IHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhv |
3653 | + cml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA== |
3654 | + </file> |
3655 | + ]]> |
3656 | + </xsdxt:code> |
3657 | + </xsd:documentation> |
3658 | + </annotation> |
3659 | + <simpleContent> |
3660 | + <extension base="csapi:FileContent"> |
3661 | + <attribute name="path" type="csapi:FileName" use="required"> |
3662 | + <annotation> |
3663 | + <xsd:documentation |
3664 | + xml:lang="EN" |
3665 | + xmlns="http://www.w3.org/1999/xhtml"> |
3666 | + <p> |
3667 | + Full file path. |
3668 | + </p> |
3669 | + </xsd:documentation> |
3670 | + </annotation> |
3671 | + </attribute> |
3672 | + <anyAttribute namespace="##other" processContents="lax"/> |
3673 | + </extension> |
3674 | + </simpleContent> |
3675 | + </complexType> |
3676 | + |
3677 | + <complexType name="Addresses"> |
3678 | + <sequence> |
3679 | + <element name="network" type="csapi:AddressList" minOccurs="0" maxOccurs="1000"/> |
3680 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
3681 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3682 | + </sequence> |
3683 | + <anyAttribute namespace="##other" processContents="lax"/> |
3684 | + </complexType> |
3685 | + |
3686 | + <complexType name="AddressList"> |
3687 | + <sequence> |
3688 | + <element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="1000"> |
3689 | + <annotation> |
3690 | + <xsd:documentation |
3691 | + xml:lang="EN" |
3692 | + xmlns="http://www.w3.org/1999/xhtml"> |
3693 | + <p> |
3694 | + A collection of addresses. |
3695 | + </p> |
3696 | + </xsd:documentation> |
3697 | + </annotation> |
3698 | + </element> |
3699 | + <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
3700 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3701 | + </sequence> |
3702 | + <attribute type="xsd:string" name="id" use="optional"> |
3703 | + <annotation> |
3704 | + <xsd:documentation |
3705 | + xml:lang="EN" |
3706 | + xmlns="http://www.w3.org/1999/xhtml"> |
3707 | + <p> |
3708 | + A id of an address list. This is typically a name |
3709 | + used to identify a network. |
3710 | + </p> |
3711 | + </xsd:documentation> |
3712 | + </annotation> |
3713 | + </attribute> |
3714 | + <anyAttribute namespace="##other" processContents="lax"/> |
3715 | + </complexType> |
3716 | + |
3717 | + <complexType name="Address"> |
3718 | + <sequence> |
3719 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3720 | + </sequence> |
3721 | + <attribute name="addr" type="xsd:string" use="required"> |
3722 | + <annotation> |
3723 | + <xsd:documentation |
3724 | + xml:lang="EN" |
3725 | + xmlns="http://www.w3.org/1999/xhtml"> |
3726 | + <p> |
3727 | + An IP address. |
3728 | + </p> |
3729 | + </xsd:documentation> |
3730 | + </annotation> |
3731 | + </attribute> |
3732 | + <attribute name="version" type="csapi:AddressVersion" use="optional"> |
3733 | + <annotation> |
3734 | + <xsd:documentation |
3735 | + xml:lang="EN" |
3736 | + xmlns="http://www.w3.org/1999/xhtml"> |
3737 | + <p> |
3738 | + The IP Address version can be 4 or 6. The version |
3739 | + attribute is optional if it is left off, the type of |
3740 | + address will be determined by from its address |
3741 | + format. If it is specified it <strong>should</strong> |
3742 | + match the address format. |
3743 | + </p> |
3744 | + <p> |
3745 | + The OpenStack compute API will always fill in the |
3746 | + version number as a convinence to the client. |
3747 | + </p> |
3748 | + </xsd:documentation> |
3749 | + </annotation> |
3750 | + </attribute> |
3751 | + <anyAttribute namespace="##other" processContents="lax"/> |
3752 | + </complexType> |
3753 | + |
3754 | + <complexType name="ShareIp"> |
3755 | + <annotation> |
3756 | + <xsd:documentation |
3757 | + xml:lang="EN" |
3758 | + xmlns="http://www.w3.org/1999/xhtml"> |
3759 | + <p> |
3760 | + This type is used to represent a request to share an IP |
3761 | + address. |
3762 | + </p> |
3763 | + </xsd:documentation> |
3764 | + </annotation> |
3765 | + <sequence> |
3766 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3767 | + </sequence> |
3768 | + <attribute name="sharedIpGroupId" type="xsd:int" use="required"> |
3769 | + <annotation> |
3770 | + <xsd:documentation |
3771 | + xml:lang="EN" |
3772 | + xmlns="http://www.w3.org/1999/xhtml"> |
3773 | + <p> |
3774 | + The <a href="ipgroup.xsd#type_SharedIpGroup" title="See |
3775 | + definition of SharedIPGroup">shared IP group</a> use to |
3776 | + share the address. |
3777 | + </p> |
3778 | + </xsd:documentation> |
3779 | + </annotation> |
3780 | + </attribute> |
3781 | + <attribute name="configureServer" type="xsd:boolean" default="false"> |
3782 | + <annotation> |
3783 | + <xsd:documentation |
3784 | + xml:lang="EN" |
3785 | + xmlns="http://www.w3.org/1999/xhtml"> |
3786 | + <p> |
3787 | + If true, the server is configured with the new address |
3788 | + though the address may not be enabled. |
3789 | + </p> |
3790 | + </xsd:documentation> |
3791 | + </annotation> |
3792 | + </attribute> |
3793 | + <anyAttribute namespace="##other" processContents="lax"/> |
3794 | + </complexType> |
3795 | + |
3796 | + <complexType name="AddIp"> |
3797 | + <annotation> |
3798 | + <xsd:documentation |
3799 | + xml:lang="EN" |
3800 | + xmlns="http://www.w3.org/1999/xhtml"> |
3801 | + <p> |
3802 | + This type is used to represent a request to add an IP |
3803 | + address. |
3804 | + </p> |
3805 | + </xsd:documentation> |
3806 | + </annotation> |
3807 | + <sequence> |
3808 | + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
3809 | + </sequence> |
3810 | + <attribute name="configureServer" type="xsd:boolean" default="false"> |
3811 | + <annotation> |
3812 | + <xsd:documentation |
3813 | + xml:lang="EN" |
3814 | + xmlns="http://www.w3.org/1999/xhtml"> |
3815 | + <p> |
3816 | + If true, the server is added and configured with the new address |
3817 | + though the address may not be enabled. |
3818 | + </p> |
3819 | + </xsd:documentation> |
3820 | + </annotation> |
3821 | + </attribute> |
3822 | + <anyAttribute namespace="##other" processContents="lax"/> |
3823 | + </complexType> |
3824 | + |
3825 | + |
3826 | + <!-- Simple Types --> |
3827 | + <simpleType name="ServerStatus"> |
3828 | + <restriction base="xsd:string"> |
3829 | + <enumeration value="ACTIVE"> |
3830 | + <annotation> |
3831 | + <xsd:documentation |
3832 | + xml:lang="EN" |
3833 | + xmlns="http://www.w3.org/1999/xhtml"> |
3834 | + <p> |
3835 | + The server is ready to use. |
3836 | + </p> |
3837 | + </xsd:documentation> |
3838 | + </annotation> |
3839 | + </enumeration> |
3840 | + <enumeration value="SUSPENDED"> |
3841 | + <annotation> |
3842 | + <xsd:documentation |
3843 | + xml:lang="EN" |
3844 | + xmlns="http://www.w3.org/1999/xhtml"> |
3845 | + <p> |
3846 | + The server is in an inactive (suspended) state. |
3847 | + </p> |
3848 | + </xsd:documentation> |
3849 | + </annotation> |
3850 | + </enumeration> |
3851 | + <enumeration value="DELETED"> |
3852 | + <annotation> |
3853 | + <xsd:documentation |
3854 | + xml:lang="EN" |
3855 | + xmlns="http://www.w3.org/1999/xhtml"> |
3856 | + <p> |
3857 | + The server has been deleted. |
3858 | + </p> |
3859 | + </xsd:documentation> |
3860 | + </annotation> |
3861 | + </enumeration> |
3862 | + <enumeration value="QUEUE_RESIZE"> |
3863 | + <annotation> |
3864 | + <xsd:documentation |
3865 | + xml:lang="EN" |
3866 | + xmlns="http://www.w3.org/1999/xhtml"> |
3867 | + <p> |
3868 | + A request to perform a <a |
3869 | + href="actions.xsd#element_resize" title="See definition |
3870 | + of resize">resize action</a> has been received. The |
3871 | + operation is pending. |
3872 | + </p> |
3873 | + </xsd:documentation> |
3874 | + </annotation> |
3875 | + </enumeration> |
3876 | + <enumeration value="PREP_RESIZE"> |
3877 | + <annotation> |
3878 | + <xsd:documentation |
3879 | + xml:lang="EN" |
3880 | + xmlns="http://www.w3.org/1999/xhtml"> |
3881 | + <p> |
3882 | + The server is being prepared to perform the resize |
3883 | + operation. |
3884 | + </p> |
3885 | + </xsd:documentation> |
3886 | + </annotation> |
3887 | + </enumeration> |
3888 | + <enumeration value="RESIZE"> |
3889 | + <annotation> |
3890 | + <xsd:documentation |
3891 | + xml:lang="EN" |
3892 | + xmlns="http://www.w3.org/1999/xhtml"> |
3893 | + <p> |
3894 | + The server is being resized. |
3895 | + </p> |
3896 | + </xsd:documentation> |
3897 | + </annotation> |
3898 | + </enumeration> |
3899 | + <enumeration value="VERIFY_RESIZE"> |
3900 | + <annotation> |
3901 | + <xsd:documentation |
3902 | + xml:lang="EN" |
3903 | + xmlns="http://www.w3.org/1999/xhtml"> |
3904 | + <p> |
3905 | + The server is waiting for the resize operation to be |
3906 | + confirmed so that the original server may be removed. |
3907 | + </p> |
3908 | + </xsd:documentation> |
3909 | + </annotation> |
3910 | + </enumeration> |
3911 | + <enumeration value="RESCUE"> |
3912 | + <annotation> |
3913 | + <xsd:documentation |
3914 | + xml:lang="EN" |
3915 | + xmlns="http://www.w3.org/1999/xhtml"> |
3916 | + <p> |
3917 | + The server is in rescue mode. |
3918 | + </p> |
3919 | + </xsd:documentation> |
3920 | + </annotation> |
3921 | + </enumeration> |
3922 | + <enumeration value="ERROR"> |
3923 | + <annotation> |
3924 | + <xsd:documentation |
3925 | + xml:lang="EN" |
3926 | + xmlns="http://www.w3.org/1999/xhtml"> |
3927 | + <p> |
3928 | + The requested operation failed, the server is in an |
3929 | + error state. |
3930 | + </p> |
3931 | + </xsd:documentation> |
3932 | + </annotation> |
3933 | + </enumeration> |
3934 | + <enumeration value="BUILD"> |
3935 | + <annotation> |
3936 | + <xsd:documentation |
3937 | + xml:lang="EN" |
3938 | + xmlns="http://www.w3.org/1999/xhtml"> |
3939 | + <p> |
3940 | + The server is being built. |
3941 | + </p> |
3942 | + </xsd:documentation> |
3943 | + </annotation> |
3944 | + </enumeration> |
3945 | + <enumeration value="RESTORING"> |
3946 | + <annotation> |
3947 | + <xsd:documentation |
3948 | + xml:lang="EN" |
3949 | + xmlns="http://www.w3.org/1999/xhtml"> |
3950 | + <p> |
3951 | + The server is being restored. |
3952 | + </p> |
3953 | + </xsd:documentation> |
3954 | + </annotation> |
3955 | + </enumeration> |
3956 | + <enumeration value="PASSWORD"> |
3957 | + <annotation> |
3958 | + <xsd:documentation |
3959 | + xml:lang="EN" |
3960 | + xmlns="http://www.w3.org/1999/xhtml"> |
3961 | + <p> |
3962 | + The server password is being changed. |
3963 | + </p> |
3964 | + </xsd:documentation> |
3965 | + </annotation> |
3966 | + </enumeration> |
3967 | + <enumeration value="REBUILD"> |
3968 | + <annotation> |
3969 | + <xsd:documentation |
3970 | + xml:lang="EN" |
3971 | + xmlns="http://www.w3.org/1999/xhtml"> |
3972 | + <p> |
3973 | + The server is being rebuilt. |
3974 | + </p> |
3975 | + </xsd:documentation> |
3976 | + </annotation> |
3977 | + </enumeration> |
3978 | + <enumeration value="DELETE_IP"> |
3979 | + <annotation> |
3980 | + <xsd:documentation |
3981 | + xml:lang="EN" |
3982 | + xmlns="http://www.w3.org/1999/xhtml"> |
3983 | + <p> |
3984 | + A shared IP address is being removed. |
3985 | + </p> |
3986 | + </xsd:documentation> |
3987 | + </annotation> |
3988 | + </enumeration> |
3989 | + <enumeration value="SHARE_IP_NO_CONFIG"> |
3990 | + <annotation> |
3991 | + <xsd:documentation |
3992 | + xml:lang="EN" |
3993 | + xmlns="http://www.w3.org/1999/xhtml"> |
3994 | + <p> |
3995 | + An IP address is being shared, but not configured. |
3996 | + </p> |
3997 | + </xsd:documentation> |
3998 | + </annotation> |
3999 | + </enumeration> |
4000 | + <enumeration value="SHARE_IP"> |
4001 | + <annotation> |
4002 | + <xsd:documentation |
4003 | + xml:lang="EN" |
4004 | + xmlns="http://www.w3.org/1999/xhtml"> |
4005 | + <p> |
4006 | + An IP address is being shared, and the server is being |
4007 | + configured with the new address. |
4008 | + </p> |
4009 | + </xsd:documentation> |
4010 | + </annotation> |
4011 | + </enumeration> |
4012 | + <enumeration value="ADD_IP_NO_CONFIG"> |
4013 | + <annotation> |
4014 | + <xsd:documentation |
4015 | + xml:lang="EN" |
4016 | + xmlns="http://www.w3.org/1999/xhtml"> |
4017 | + <p> |
4018 | + An IP address is being added, but not configured. |
4019 | + </p> |
4020 | + </xsd:documentation> |
4021 | + </annotation> |
4022 | + </enumeration> |
4023 | + <enumeration value="ADD_IP"> |
4024 | + <annotation> |
4025 | + <xsd:documentation |
4026 | + xml:lang="EN" |
4027 | + xmlns="http://www.w3.org/1999/xhtml"> |
4028 | + <p> |
4029 | + An IP address is being added, and the server is being |
4030 | + configured with the new address. |
4031 | + </p> |
4032 | + </xsd:documentation> |
4033 | + </annotation> |
4034 | + </enumeration> |
4035 | + |
4036 | + <enumeration value="REBOOT"> |
4037 | + <annotation> |
4038 | + <xsd:documentation |
4039 | + xml:lang="EN" |
4040 | + xmlns="http://www.w3.org/1999/xhtml"> |
4041 | + <p> |
4042 | + The server is going through a <a |
4043 | + href="actions.xsd#type_RebootType" title="See definition |
4044 | + of RebootType">SOFT</a> reboot. |
4045 | + </p> |
4046 | + </xsd:documentation> |
4047 | + </annotation> |
4048 | + </enumeration> |
4049 | + <enumeration value="HARD_REBOOT"> |
4050 | + <annotation> |
4051 | + <xsd:documentation |
4052 | + xml:lang="EN" |
4053 | + xmlns="http://www.w3.org/1999/xhtml"> |
4054 | + <p> |
4055 | + The server is going through a <a |
4056 | + href="actions.xsd#type_RebootType" title="See definition |
4057 | + of RebootType">HARD</a> reboot. |
4058 | + </p> |
4059 | + </xsd:documentation> |
4060 | + </annotation> |
4061 | + </enumeration> |
4062 | + <enumeration value="UNKNOWN"> |
4063 | + <annotation> |
4064 | + <xsd:documentation |
4065 | + xml:lang="EN" |
4066 | + xmlns="http://www.w3.org/1999/xhtml"> |
4067 | + <p> |
4068 | + The server is in an unknown state. |
4069 | + </p> |
4070 | + </xsd:documentation> |
4071 | + </annotation> |
4072 | + </enumeration> |
4073 | + <enumeration value="QUEUE_MOVE"> |
4074 | + <annotation> |
4075 | + <xsd:documentation |
4076 | + xml:lang="EN" |
4077 | + xmlns="http://www.w3.org/1999/xhtml"> |
4078 | + <p> |
4079 | + Reserved for future use. |
4080 | + </p> |
4081 | + </xsd:documentation> |
4082 | + </annotation> |
4083 | + </enumeration> |
4084 | + <enumeration value="PREP_MOVE"> |
4085 | + <annotation> |
4086 | + <xsd:documentation |
4087 | + xml:lang="EN" |
4088 | + xmlns="http://www.w3.org/1999/xhtml"> |
4089 | + <p> |
4090 | + Reserved for future use. |
4091 | + </p> |
4092 | + </xsd:documentation> |
4093 | + </annotation> |
4094 | + </enumeration> |
4095 | + <enumeration value="MOVE"> |
4096 | + <annotation> |
4097 | + <xsd:documentation |
4098 | + xml:lang="EN" |
4099 | + xmlns="http://www.w3.org/1999/xhtml"> |
4100 | + <p> |
4101 | + Reserved for future use. |
4102 | + </p> |
4103 | + </xsd:documentation> |
4104 | + </annotation> |
4105 | + </enumeration> |
4106 | + <enumeration value="VERIFY_MOVE"> |
4107 | + <annotation> |
4108 | + <xsd:documentation |
4109 | + xml:lang="EN" |
4110 | + xmlns="http://www.w3.org/1999/xhtml"> |
4111 | + <p> |
4112 | + Reserved for future use. |
4113 | + </p> |
4114 | + </xsd:documentation> |
4115 | + </annotation> |
4116 | + </enumeration> |
4117 | + <enumeration value="PENDING"> |
4118 | + <annotation> |
4119 | + <xsd:documentation |
4120 | + xml:lang="EN" |
4121 | + xmlns="http://www.w3.org/1999/xhtml"> |
4122 | + <p> |
4123 | + Reserved for future use. |
4124 | + </p> |
4125 | + </xsd:documentation> |
4126 | + </annotation> |
4127 | + </enumeration> |
4128 | + </restriction> |
4129 | + </simpleType> |
4130 | + |
4131 | + <simpleType name="FileName"> |
4132 | + <restriction base="xsd:string"> |
4133 | + <maxLength value="255" /> |
4134 | + </restriction> |
4135 | + </simpleType> |
4136 | + |
4137 | + <simpleType name="FileContent"> |
4138 | + <restriction base="xsd:base64Binary"> |
4139 | + <maxLength value="10240" /> |
4140 | + </restriction> |
4141 | + </simpleType> |
4142 | + |
4143 | + <simpleType name="AddressVersion"> |
4144 | + <restriction base="xsd:int"> |
4145 | + <enumeration value="4"> |
4146 | + <annotation> |
4147 | + <xsd:documentation |
4148 | + xml:lang="EN" |
4149 | + xmlns="http://www.w3.org/1999/xhtml"> |
4150 | + <p> |
4151 | + Denotes IPv4. |
4152 | + </p> |
4153 | + </xsd:documentation> |
4154 | + </annotation> |
4155 | + </enumeration> |
4156 | + <enumeration value="6"> |
4157 | + <annotation> |
4158 | + <xsd:documentation |
4159 | + xml:lang="EN" |
4160 | + xmlns="http://www.w3.org/1999/xhtml"> |
4161 | + <p> |
4162 | + Denotes IPv6. |
4163 | + </p> |
4164 | + </xsd:documentation> |
4165 | + </annotation> |
4166 | + </enumeration> |
4167 | + </restriction> |
4168 | + </simpleType> |
4169 | +</schema> |
4170 | |
4171 | === added file 'nova/api/openstack/schemas/v1.1/version.xsd' |
4172 | --- nova/api/openstack/schemas/v1.1/version.xsd 1970-01-01 00:00:00 +0000 |
4173 | +++ nova/api/openstack/schemas/v1.1/version.xsd 2011-04-07 17:22:59 +0000 |
4174 | @@ -0,0 +1,200 @@ |
4175 | +<?xml version="1.0" encoding="UTF-8"?> |
4176 | + |
4177 | +<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" |
4178 | + targetNamespace="http://docs.openstack.org/common/api/v1.0" |
4179 | + xmlns:vers="http://docs.openstack.org/common/api/v1.0" |
4180 | + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" |
4181 | + xmlns:html="http://www.w3.org/1999/xhtml" |
4182 | + xmlns:atom="http://www.w3.org/2005/Atom" |
4183 | + xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
4184 | + |
4185 | + <!-- Import ATOM specific schema definitions --> |
4186 | + <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" /> |
4187 | + |
4188 | + <!-- Multiple choices --> |
4189 | + <xs:element name="choices" type="vers:VersionChoiceList" /> |
4190 | + |
4191 | + <!-- Versioning --> |
4192 | + <xs:element name="versions" type="vers:VersionChoiceList" /> |
4193 | + <xs:element name="version" type="vers:VersionChoice" vc:minVersion="1.0" vc:maxVersion="1.1"/> |
4194 | + <xs:element name="version" type="vers:VersionChoiceRoot" vc:minVersion="1.1"/> |
4195 | + |
4196 | + <!-- Types --> |
4197 | + <xs:simpleType name="VersionStatus"> |
4198 | + <xs:annotation> |
4199 | + <xs:documentation> |
4200 | + <html:p> |
4201 | + The VersionStatus type describes a service's operational status. |
4202 | + </html:p> |
4203 | + </xs:documentation> |
4204 | + </xs:annotation> |
4205 | + |
4206 | + <xs:restriction base="xs:string"> |
4207 | + <xs:enumeration value="DEPRECATED" /> |
4208 | + <xs:enumeration value="ALPHA" /> |
4209 | + <xs:enumeration value="BETA" /> |
4210 | + <xs:enumeration value="CURRENT" /> |
4211 | + </xs:restriction> |
4212 | + </xs:simpleType> |
4213 | + |
4214 | + <xs:complexType name="VersionChoiceList"> |
4215 | + <xs:annotation> |
4216 | + <xs:documentation> |
4217 | + <html:p> |
4218 | + A version choice list outlines a collection of service version choices. |
4219 | + </html:p> |
4220 | + </xs:documentation> |
4221 | + </xs:annotation> |
4222 | + |
4223 | + <xs:sequence> |
4224 | + <xs:element name="version" type="vers:VersionChoice" minOccurs="1" maxOccurs="unbounded" /> |
4225 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
4226 | + </xs:sequence> |
4227 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
4228 | + <xs:assert vc:minVersion="1.1" test="every $v in vers:version satisfies $v/atom:link[@rel='self']"> |
4229 | + <xs:annotation> |
4230 | + <xs:documentation> |
4231 | + <html:p> |
4232 | + In version lists, every single version must |
4233 | + contain at least one self link. |
4234 | + </html:p> |
4235 | + </xs:documentation> |
4236 | + </xs:annotation> |
4237 | + </xs:assert> |
4238 | + </xs:complexType> |
4239 | + |
4240 | + <xs:complexType name="VersionChoiceRoot" vc:minVersion="1.1"> |
4241 | + <xs:complexContent> |
4242 | + <xs:extension base="vers:VersionChoice"> |
4243 | + <xs:assert test="atom:link[@rel='describedby']"> |
4244 | + <xs:annotation> |
4245 | + <xs:documentation> |
4246 | + <html:p> |
4247 | + When used as a root element, a version choice |
4248 | + must contain at least one describedby link. |
4249 | + </html:p> |
4250 | + </xs:documentation> |
4251 | + </xs:annotation> |
4252 | + </xs:assert> |
4253 | + </xs:extension> |
4254 | + </xs:complexContent> |
4255 | + </xs:complexType> |
4256 | + |
4257 | + <xs:complexType name="VersionChoice"> |
4258 | + <xs:annotation> |
4259 | + <xs:documentation> |
4260 | + <html:p> |
4261 | + A version choice contains relevant information about an available service |
4262 | + that a user can then use to target a specific version of the service. Note |
4263 | + that both the descriptive media types and the atom link references are |
4264 | + not manditory and are offered as message enrichment elements rather |
4265 | + than message requirements. |
4266 | + </html:p> |
4267 | + </xs:documentation> |
4268 | + </xs:annotation> |
4269 | + |
4270 | + <xs:sequence> |
4271 | + <xs:element name="media-types" type="vers:MediaTypeList" minOccurs="0" maxOccurs="1" /> |
4272 | + <xs:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" /> |
4273 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
4274 | + </xs:sequence> |
4275 | + |
4276 | + <xs:attribute name="id" type="xs:string" use="required"> |
4277 | + <xs:annotation> |
4278 | + <xs:documentation> |
4279 | + <html:p> |
4280 | + The ID of a version choice represents the service version's unique |
4281 | + identifier. This ID is guaranteed to be unique only among the |
4282 | + service version choices outlined in the VersionChoiceList. |
4283 | + </html:p> |
4284 | + </xs:documentation> |
4285 | + </xs:annotation> |
4286 | + </xs:attribute> |
4287 | + |
4288 | + <xs:attribute name="status" type="vers:VersionStatus" use="required"> |
4289 | + <xs:annotation> |
4290 | + <xs:documentation> |
4291 | + <html:p> |
4292 | + A version choice's status describes the current operational state of |
4293 | + the given service version. The operational status is captured in a |
4294 | + simple type enumeration called VersionStatus. |
4295 | + </html:p> |
4296 | + </xs:documentation> |
4297 | + </xs:annotation> |
4298 | + </xs:attribute> |
4299 | + |
4300 | + <xs:attribute name="updated" type="xs:dateTime" use="optional"> |
4301 | + <xs:annotation> |
4302 | + <xs:documentation> |
4303 | + <html:p> |
4304 | + A version choice's updated attribute describes |
4305 | + the time when the version was updated. The |
4306 | + time should be updated anytime |
4307 | + <html:strong>anything</html:strong> in the |
4308 | + version has changed: documentation, |
4309 | + extensions, bug fixes. |
4310 | + </html:p> |
4311 | + </xs:documentation> |
4312 | + </xs:annotation> |
4313 | + </xs:attribute> |
4314 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
4315 | + </xs:complexType> |
4316 | + |
4317 | + <xs:complexType name="MediaTypeList"> |
4318 | + <xs:annotation> |
4319 | + <xs:documentation> |
4320 | + <html:p> |
4321 | + A MediaTypeList outlines a collection of valid media types for a given |
4322 | + service version. |
4323 | + </html:p> |
4324 | + </xs:documentation> |
4325 | + </xs:annotation> |
4326 | + |
4327 | + <xs:sequence> |
4328 | + <xs:element name="media-type" type="vers:MediaType" minOccurs="1" maxOccurs="unbounded" /> |
4329 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
4330 | + </xs:sequence> |
4331 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
4332 | + </xs:complexType> |
4333 | + |
4334 | + <xs:complexType name="MediaType"> |
4335 | + <xs:annotation> |
4336 | + <xs:documentation> |
4337 | + <html:p> |
4338 | + A MediaType describes what content types the service version understands. |
4339 | + </html:p> |
4340 | + </xs:documentation> |
4341 | + </xs:annotation> |
4342 | + <xs:sequence> |
4343 | + <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> |
4344 | + </xs:sequence> |
4345 | + <xs:attribute name="base" type="xs:string" use="optional" default=""> |
4346 | + <xs:annotation> |
4347 | + <xs:documentation> |
4348 | + <html:p> |
4349 | + The base of a given media type describes the simple MIME type |
4350 | + that then a more complicated media type can be derived from. These |
4351 | + types are basic and provide no namespace or version specific |
4352 | + data are are only provided as a convenience. Because of this the |
4353 | + base attribute is declared as optional. |
4354 | + </html:p> |
4355 | + </xs:documentation> |
4356 | + </xs:annotation> |
4357 | + </xs:attribute> |
4358 | + |
4359 | + <xs:attribute name="type" type="xs:string" use="required"> |
4360 | + <xs:annotation> |
4361 | + <xs:documentation> |
4362 | + <html:p> |
4363 | + The type attribute of a MediaType describes the MIME specific |
4364 | + identifier of the media type in question. This identifier should include |
4365 | + a vendor namespace ( |
4366 | + <html:a href="http://tools.ietf.org/html/rfc2048">See RFC 2048</html:a>) |
4367 | + as well as a version suffix. |
4368 | + </html:p> |
4369 | + </xs:documentation> |
4370 | + </xs:annotation> |
4371 | + </xs:attribute> |
4372 | + <xs:anyAttribute namespace="##other" processContents="lax"/> |
4373 | + </xs:complexType> |
4374 | +</xs:schema> |
4375 | |
4376 | === added file 'nova/api/openstack/validation.py' |
4377 | --- nova/api/openstack/validation.py 1970-01-01 00:00:00 +0000 |
4378 | +++ nova/api/openstack/validation.py 2011-04-07 17:22:59 +0000 |
4379 | @@ -0,0 +1,85 @@ |
4380 | +# vim: tabstop=4 shiftwidth=4 softtabstop=4 |
4381 | + |
4382 | +# Copyright 2011 Justin Santa Barbara |
4383 | +# All Rights Reserved. |
4384 | +# |
4385 | +# Licensed under the Apache License, Version 2.0 (the "License"); you may |
4386 | +# not use this file except in compliance with the License. You may obtain |
4387 | +# a copy of the License at |
4388 | +# |
4389 | +# http://www.apache.org/licenses/LICENSE-2.0 |
4390 | +# |
4391 | +# Unless required by applicable law or agreed to in writing, software |
4392 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
4393 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
4394 | +# License for the specific language governing permissions and limitations |
4395 | +# under the License.import datetime |
4396 | + |
4397 | +"""Perform validation of output against schemas.""" |
4398 | + |
4399 | +from lxml import etree |
4400 | +from StringIO import StringIO |
4401 | + |
4402 | +from nova import exception |
4403 | +from nova import flags |
4404 | +from nova import log as logging |
4405 | +from nova.api.openstack import common |
4406 | + |
4407 | + |
4408 | +LOG = logging.getLogger('nova.api.openstack') |
4409 | + |
4410 | + |
4411 | +FLAGS = flags.FLAGS |
4412 | +flags.DEFINE_bool('validate_xml', |
4413 | + True, |
4414 | + 'Validate XML output?') |
4415 | +flags.DEFINE_bool('validate_xml_for_json', |
4416 | + False, |
4417 | + 'Always generate and validate XML output, even for JSON?') |
4418 | +flags.DEFINE_bool('raise_error_on_validation_warnings', |
4419 | + False, |
4420 | + 'Treat XML validation failures as errors?') |
4421 | + |
4422 | + |
4423 | +class OutputValidator(object): |
4424 | + """Perform validation of output.""" |
4425 | + |
4426 | + def validate_output(self, content_type, output): |
4427 | + """Validate the output.""" |
4428 | + if content_type == "application/xml": |
4429 | + is_valid = self._validate_xml(output) |
4430 | + if FLAGS.raise_error_on_validation_warnings and not is_valid: |
4431 | + raise exception.Error(_("XML output was not valid")) |
4432 | + elif content_type == "application/json": |
4433 | + pass |
4434 | + else: |
4435 | + LOG.warn(_("Unknown content type: %s") % content_type) |
4436 | + |
4437 | + def always_validate_xml(self): |
4438 | + """Should we always generate and validate XML output?""" |
4439 | + return FLAGS.validate_xml_for_json |
4440 | + |
4441 | + def _validate_xml(self, xml_text): |
4442 | + """Validate XML output.""" |
4443 | + doc = etree.parse(StringIO(xml_text)) |
4444 | + |
4445 | + xmlns_prefix = doc.getroot().prefix |
4446 | + xmlns = doc.getroot().nsmap.get(xmlns_prefix, None) |
4447 | + |
4448 | + if xmlns is None: |
4449 | + LOG.warning(_("No XML namespace for XML: %s") % xml_text) |
4450 | + return False |
4451 | + |
4452 | + xmlschema = common.load_xml_schema(xmlns) |
4453 | + if not xmlschema: |
4454 | + LOG.warning(_("Unknown XML namespace: %s") % xmlns) |
4455 | + return False |
4456 | + |
4457 | + try: |
4458 | + xmlschema.assertValid(doc) |
4459 | + except etree.DocumentInvalid as e: |
4460 | + LOG.warning(_("XML did not validate: %(e)s\nXML=%(xml_text)s") % |
4461 | + locals()) |
4462 | + return False |
4463 | + |
4464 | + return True |
4465 | |
4466 | === modified file 'nova/tests/fake_flags.py' |
4467 | --- nova/tests/fake_flags.py 2011-03-04 02:36:55 +0000 |
4468 | +++ nova/tests/fake_flags.py 2011-04-07 17:22:59 +0000 |
4469 | @@ -42,3 +42,9 @@ |
4470 | FLAGS.verbose = True |
4471 | FLAGS.sqlite_db = "tests.sqlite" |
4472 | FLAGS.use_ipv6 = True |
4473 | +flags.DECLARE('validate_xml_for_json', 'nova.api.openstack.validation') |
4474 | +flags.DECLARE('raise_error_on_validation_warnings', |
4475 | + 'nova.api.openstack.validation') |
4476 | +# NOTE(justinsb): Commented out for now because it finds too many issues |
4477 | +#FLAGS.validate_xml_for_json = True |
4478 | +#FLAGS.raise_error_on_validation_warnings = True |
4479 | |
4480 | === modified file 'nova/wsgi.py' |
4481 | --- nova/wsgi.py 2011-04-06 21:02:16 +0000 |
4482 | +++ nova/wsgi.py 2011-04-07 17:22:59 +0000 |
4483 | @@ -356,7 +356,9 @@ |
4484 | if type(result) is dict: |
4485 | content_type = req.best_match_content_type() |
4486 | default_xmlns = self.get_default_xmlns(req) |
4487 | - body = self._serialize(result, content_type, default_xmlns) |
4488 | + validator = self.get_validator(req) |
4489 | + body = self._serialize(result, content_type, default_xmlns, |
4490 | + validator) |
4491 | |
4492 | response = webob.Response() |
4493 | response.headers["Content-Type"] = content_type |
4494 | @@ -365,7 +367,8 @@ |
4495 | else: |
4496 | return result |
4497 | |
4498 | - def _serialize(self, data, content_type, default_xmlns): |
4499 | + def _serialize(self, data, content_type, default_xmlns=None, |
4500 | + validator=None): |
4501 | """ |
4502 | Serialize the given dict to the provided content_type. |
4503 | Uses self._serialization_metadata if it exists, which is a dict mapping |
4504 | @@ -373,7 +376,7 @@ |
4505 | """ |
4506 | _metadata = getattr(type(self), "_serialization_metadata", {}) |
4507 | |
4508 | - serializer = Serializer(_metadata, default_xmlns) |
4509 | + serializer = Serializer(_metadata, default_xmlns, validator) |
4510 | try: |
4511 | return serializer.serialize(data, content_type) |
4512 | except exception.InvalidContentType: |
4513 | @@ -393,13 +396,17 @@ |
4514 | """Provide the XML namespace to use if none is otherwise specified.""" |
4515 | return None |
4516 | |
4517 | + def get_validator(self, req): |
4518 | + """Provide a validator object that checks output.""" |
4519 | + return None |
4520 | + |
4521 | |
4522 | class Serializer(object): |
4523 | """ |
4524 | Serializes and deserializes dictionaries to certain MIME types. |
4525 | """ |
4526 | |
4527 | - def __init__(self, metadata=None, default_xmlns=None): |
4528 | + def __init__(self, metadata=None, default_xmlns=None, validator=None): |
4529 | """ |
4530 | Create a serializer based on the given WSGI environment. |
4531 | 'metadata' is an optional dict mapping MIME types to information |
4532 | @@ -407,6 +414,7 @@ |
4533 | """ |
4534 | self.metadata = metadata or {} |
4535 | self.default_xmlns = default_xmlns |
4536 | + self.validator = validator |
4537 | |
4538 | def _get_serialize_handler(self, content_type): |
4539 | handlers = { |
4540 | @@ -423,7 +431,15 @@ |
4541 | """ |
4542 | Serialize a dictionary into a string of the specified content type. |
4543 | """ |
4544 | - return self._get_serialize_handler(content_type)(data) |
4545 | + output = self._get_serialize_handler(content_type)(data) |
4546 | + if self.validator: |
4547 | + self.validator.validate_output(content_type, output) |
4548 | + if self.validator.always_validate_xml(): |
4549 | + if not content_type == "application/xml": |
4550 | + xml = self._get_serialize_handler("application/xml")(data) |
4551 | + self.validator.validate_output("application/xml", xml) |
4552 | + |
4553 | + return output |
4554 | |
4555 | def deserialize(self, datastring, content_type): |
4556 | """ |
4557 | |
4558 | === modified file 'tools/pip-requires' |
4559 | --- tools/pip-requires 2011-03-31 03:33:56 +0000 |
4560 | +++ tools/pip-requires 2011-04-07 17:22:59 +0000 |
4561 | @@ -32,3 +32,4 @@ |
4562 | glance |
4563 | nova-adminclient |
4564 | suds==0.4 |
4565 | +lxml |
The additional pre-req has now merged, so no pre-req beyond the marked one any more :-)