Merge lp:~justin-fathomdb/nova/check-xsd into lp:~hudson-openstack/nova/trunk

Proposed by justinsb
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
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

To post a comment you must log in.
Revision history for this message
justinsb (justin-fathomdb) wrote :

The additional pre-req has now merged, so no pre-req beyond the marked one any more :-)

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Why the change in api/direct.py? I don't think direct api uses a schema.

review: Needs Information
Revision history for this message
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 :-)

Revision history for this message
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.

Revision history for this message
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?

review: Needs Information
Revision history for this message
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.

review: Needs Fixing
Revision history for this message
Mark Washenberger (markwash) wrote :

Now up to 3 conflicts:

Text conflict in nova/tests/fake_flags.py
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.

review: Needs Fixing

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova/api/direct.py'
--- nova/api/direct.py 2011-03-30 16:17:46 +0000
+++ nova/api/direct.py 2011-04-07 17:22:59 +0000
@@ -211,9 +211,7 @@
211 return result211 return result
212212
213 try:213 try:
214 content_type = req.best_match_content_type()214 return self._serialize(result, req.best_match_content_type())
215 default_xmlns = self.get_default_xmlns(req)
216 return self._serialize(result, content_type, default_xmlns)
217 except:215 except:
218 raise exception.Error("returned non-serializable type: %s"216 raise exception.Error("returned non-serializable type: %s"
219 % result)217 % result)
220218
=== modified file 'nova/api/openstack/common.py'
--- nova/api/openstack/common.py 2011-03-30 17:05:06 +0000
+++ nova/api/openstack/common.py 2011-04-07 17:22:59 +0000
@@ -17,6 +17,8 @@
1717
18from urlparse import urlparse18from urlparse import urlparse
1919
20from lxml import etree
21import os
20import webob22import webob
2123
22from nova import exception24from nova import exception
@@ -136,6 +138,52 @@
136138
137139
138class OpenstackController(wsgi.Controller):140class OpenstackController(wsgi.Controller):
139 def get_default_xmlns(self, req):141 def get_default_xmlns(self, _req):
140 # Use V10 by default142 # Use V10 by default
141 return XML_NS_V10143 return XML_NS_V10
144
145 def get_validator(self, _req):
146 # NOTE(justinsb): Avoid circular dependency.
147 from nova.api.openstack import validation
148 return validation.OutputValidator()
149
150
151def _load_schema_cloudservers_v10():
152 filename = os.path.join(os.path.dirname(__file__),
153 'schemas/v1.0/xsd/rackspace.xsd')
154
155 schema_tree = etree.parse(filename)
156 schema = etree.XMLSchema(etree=schema_tree)
157 return schema
158
159
160def _load_schema_cloudservers_v11():
161 filename = os.path.join(os.path.dirname(__file__),
162 'schemas/v1.1/api.xsd')
163
164 schema_tree = etree.parse(filename)
165 schema = etree.XMLSchema(etree=schema_tree)
166 return schema
167
168
169SCHEMA_CACHE = {}
170
171
172def load_xml_schema(xmlns):
173 schema = SCHEMA_CACHE.get(xmlns, None)
174 if not schema:
175 if xmlns == XML_NS_V10:
176 schema = _load_schema_cloudservers_v10()
177
178 if xmlns == XML_NS_V11:
179 try:
180 schema = _load_schema_cloudservers_v11()
181 except etree.XMLSchemaParseError as e:
182 # NOTE(justinsb): Bug #752929
183 # NOTE(justinsb): So we're not doing any 1.1 validation
184 LOG.warning("Ignoring known-error parsing CS 1.1 API: %s" % e)
185
186 if schema:
187 SCHEMA_CACHE[xmlns] = schema
188
189 return schema
142190
=== added directory 'nova/api/openstack/schemas/v1.1'
=== added file 'nova/api/openstack/schemas/v1.1/actions.xsd'
--- nova/api/openstack/schemas/v1.1/actions.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/actions.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,370 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6
7<schema
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified"
10 xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
12 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
13 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
15>
16 <annotation>
17 <xsd:appinfo
18 xml:lang="EN"
19 xmlns="http://www.w3.org/1999/xhtml">
20 <xsdxt:title>Server Actions</xsdxt:title>
21 <xsdxt:link rel="index" href="api.xsd" />
22 </xsd:appinfo>
23 <xsd:documentation
24 xml:lang="EN"
25 xmlns="http://www.w3.org/1999/xhtml">
26 <p>
27 This schema file defines actions that can be performed on a
28 cloud server. All cloud server actions are derived from the <a
29 href="#type_Action" title="See definition of
30 Action">Action</a> type.
31 </p>
32 </xsd:documentation>
33 </annotation>
34
35 <include schemaLocation="server.xsd">
36 <annotation>
37 <xsd:documentation
38 xml:lang="EN"
39 xmlns="http://www.w3.org/1999/xhtml">
40 <p>
41 Types related to servers.
42 </p>
43 </xsd:documentation>
44 </annotation>
45 </include>
46
47 <element name="reboot" type="csapi:Reboot">
48 <annotation>
49 <xsd:documentation
50 xml:lang="EN"
51 xmlns="http://www.w3.org/1999/xhtml">
52 <p>
53 Performs a HARD or SOFT reboot.
54 </p>
55 </xsd:documentation>
56 <xsd:appinfo>
57 <xsdxt:samples>
58 <xsdxt:sample>
59 <xsdxt:code type="application/xml" href="../samples/reboot.xml" />
60 </xsdxt:sample>
61 <xsdxt:sample>
62 <xsdxt:code type="application/json" href="../samples/reboot.json" />
63 </xsdxt:sample>
64 </xsdxt:samples>
65 </xsd:appinfo>
66 </annotation>
67 </element>
68 <element name="rebuild" type="csapi:Rebuild">
69 <annotation>
70 <xsd:documentation
71 xml:lang="EN"
72 xmlns="http://www.w3.org/1999/xhtml">
73 <p>
74 Rebuilds a server.
75 </p>
76 </xsd:documentation>
77 <xsd:appinfo>
78 <xsdxt:samples>
79 <xsdxt:sample>
80 <xsdxt:code type="application/xml" href="../samples/rebuild.xml" />
81 </xsdxt:sample>
82 <xsdxt:sample>
83 <xsdxt:code type="application/json" href="../samples/rebuild.json" />
84 </xsdxt:sample>
85 </xsdxt:samples>
86 </xsd:appinfo>
87 </annotation>
88 </element>
89 <element name="resize" type="csapi:Resize">
90 <annotation>
91 <xsd:documentation
92 xml:lang="EN"
93 xmlns="http://www.w3.org/1999/xhtml">
94 <p>
95 Resizes a server.
96 </p>
97 </xsd:documentation>
98 <xsd:appinfo>
99 <xsdxt:samples>
100 <xsdxt:sample>
101 <xsdxt:code type="application/xml" href="../samples/resize.xml" />
102 </xsdxt:sample>
103 <xsdxt:sample>
104 <xsdxt:code type="application/json" href="../samples/resize.json" />
105 </xsdxt:sample>
106 </xsdxt:samples>
107 </xsd:appinfo>
108 </annotation>
109 </element>
110 <element name="confirmResize" type="csapi:ConfirmResize">
111 <annotation>
112 <xsd:documentation
113 xml:lang="EN"
114 xmlns="http://www.w3.org/1999/xhtml">
115 <p>
116 Confirms a resize action.
117 </p>
118 </xsd:documentation>
119 <xsd:appinfo>
120 <xsdxt:samples>
121 <xsdxt:sample>
122 <xsdxt:code type="application/xml" href="../samples/confirmresize.xml" />
123 </xsdxt:sample>
124 <xsdxt:sample>
125 <xsdxt:code type="application/json" href="../samples/confirmresize.json" />
126 </xsdxt:sample>
127 </xsdxt:samples>
128 </xsd:appinfo>
129 </annotation>
130 </element>
131 <element name="revertResize" type="csapi:RevertResize">
132 <annotation>
133 <xsd:documentation
134 xml:lang="EN"
135 xmlns="http://www.w3.org/1999/xhtml">
136 <p>
137 Reverts a resize action.
138 </p>
139 </xsd:documentation>
140 <xsd:appinfo>
141 <xsdxt:samples>
142 <xsdxt:sample>
143 <xsdxt:code type="application/xml" href="../samples/revertresize.xml" />
144 </xsdxt:sample>
145 <xsdxt:sample>
146 <xsdxt:code type="application/json" href="../samples/revertresize.json" />
147 </xsdxt:sample>
148 </xsdxt:samples>
149 </xsd:appinfo>
150 </annotation>
151 </element>
152 <element name="changePassword" type="csapi:ChangePassword">
153 <annotation>
154 <xsd:documentation
155 xml:lang="EN"
156 xmlns="http://www.w3.org/1999/xhtml">
157 <p>
158 Changes a server's password.
159 </p>
160 </xsd:documentation>
161 <xsd:appinfo>
162 <xsdxt:samples>
163 <xsdxt:sample>
164 <xsdxt:code type="application/xml" href="../samples/changepassword.xml" />
165 </xsdxt:sample>
166 <xsdxt:sample>
167 <xsdxt:code type="application/json" href="../samples/changepassword.json" />
168 </xsdxt:sample>
169 </xsdxt:samples>
170 </xsd:appinfo>
171 </annotation>
172 </element>
173
174 <!-- Complex Types -->
175
176 <complexType abstract="true" name="Action">
177 <annotation>
178 <xsd:documentation
179 xml:lang="EN"
180 xmlns="http://www.w3.org/1999/xhtml">
181 <p>
182 This is the base type for all server actions. It is simply
183 a marker abstract type used to differentiate an Action
184 element from other elements.
185 </p>
186 </xsd:documentation>
187 </annotation>
188 <anyAttribute namespace="##other" processContents="lax"/>
189 </complexType>
190
191 <complexType name="Reboot">
192 <complexContent>
193 <extension base="csapi:Action">
194 <sequence>
195 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
196 </sequence>
197 <attribute name="type" type="csapi:RebootType" use="required">
198 <annotation>
199 <xsd:documentation
200 xml:lang="EN"
201 xmlns="http://www.w3.org/1999/xhtml">
202 <p>
203 The <a href="#type_RebootType" title="See definition
204 of RebootType">type</a> of reboot to perform.
205 </p>
206 </xsd:documentation>
207 </annotation>
208 </attribute>
209 </extension>
210 </complexContent>
211 </complexType>
212
213 <complexType name="Rebuild">
214 <complexContent>
215 <extension base="csapi:Action">
216 <sequence>
217 <element name="metadata" type="csapi:Metadata" minOccurs="0">
218 <annotation>
219 <xsd:documentation
220 xml:lang="EN"
221 xmlns="http://www.w3.org/1999/xhtml">
222 <p>
223 A collection of meta data items
224 associated with the server. If not
225 specified the original server metadata
226 will be kept.
227 </p>
228 </xsd:documentation>
229 </annotation>
230 </element>
231 <element name="personality" type="csapi:Personality" minOccurs="0">
232 <annotation>
233 <xsd:documentation
234 xml:lang="EN"
235 xmlns="http://www.w3.org/1999/xhtml">
236 <p>
237 A collection of small <a
238 href="#type_File" title="See definition
239 of file">files</a> used to personalize a
240 new server instance. Exisiting server
241 personality files are deleted by the
242 rebuild process.
243 </p>
244 </xsd:documentation>
245 </annotation>
246 </element>
247 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
248 </sequence>
249 <attribute type="xsd:string" name="name" use="optional">
250 <annotation>
251 <xsd:documentation
252 xml:lang="EN"
253 xmlns="http://www.w3.org/1999/xhtml">
254 <p>
255 The name of the server. If not specified the
256 original server name will be kept.
257 </p>
258 </xsd:documentation>
259 </annotation>
260 </attribute>
261 <attribute name="imageRef" type="xsd:anyURI" use="required">
262 <annotation>
263 <xsd:documentation
264 xml:lang="EN"
265 xmlns="http://www.w3.org/1999/xhtml">
266 <p>
267 A reference to an image to use for the rebuild.
268 </p>
269 </xsd:documentation>
270 </annotation>
271 </attribute>
272 </extension>
273 </complexContent>
274 </complexType>
275
276 <complexType name="Resize">
277 <complexContent>
278 <extension base="csapi:Action">
279 <sequence>
280 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
281 </sequence>
282 <attribute name="flavorRef" type="xsd:anyURI" use="required">
283 <annotation>
284 <xsd:documentation
285 xml:lang="EN"
286 xmlns="http://www.w3.org/1999/xhtml">
287 <p>
288 The reference of the flavor to convert to.
289 </p>
290 </xsd:documentation>
291 </annotation>
292 </attribute>
293 </extension>
294 </complexContent>
295 </complexType>
296
297 <complexType name="ConfirmResize">
298 <complexContent>
299 <extension base="csapi:Action">
300 <sequence>
301 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
302 </sequence>
303 </extension>
304 </complexContent>
305 </complexType>
306
307 <complexType name="RevertResize">
308 <complexContent>
309 <extension base="csapi:Action" >
310 <sequence>
311 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
312 </sequence>
313 </extension>
314 </complexContent>
315 </complexType>
316
317 <complexType name="ChangePassword">
318 <complexContent>
319 <extension base="csapi:Action" >
320 <sequence>
321 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
322 </sequence>
323 <attribute type="xsd:string" name="adminPass" use="required">
324 <annotation>
325 <xsd:documentation
326 xml:lang="EN"
327 xmlns="http://www.w3.org/1999/xhtml">
328 <p>
329 The server's administration password.
330 </p>
331 </xsd:documentation>
332 </annotation>
333 </attribute>
334 </extension>
335 </complexContent>
336 </complexType>
337
338 <!-- Simple Types -->
339 <simpleType name="RebootType">
340 <restriction base="xsd:string">
341 <enumeration value="HARD">
342 <annotation>
343 <xsd:documentation
344 xml:lang="EN"
345 xmlns="http://www.w3.org/1999/xhtml">
346 <p>
347 A HARD reboot is equivalent to power cycling the server.
348 The operating system is not allowed to gracefully
349 shutdown.
350 </p>
351 </xsd:documentation>
352 </annotation>
353 </enumeration>
354 <enumeration value="SOFT">
355 <annotation>
356 <xsd:documentation
357 xml:lang="EN"
358 xmlns="http://www.w3.org/1999/xhtml">
359 <p>
360 With a SOFT reboot, the operating system is signaled to
361 restart. This allows for a graceful shutdown of all
362 processes.
363 </p>
364 </xsd:documentation>
365 </annotation>
366 </enumeration>
367 </restriction>
368 </simpleType>
369</schema>
370
0371
=== added file 'nova/api/openstack/schemas/v1.1/api-common.xjb'
--- nova/api/openstack/schemas/v1.1/api-common.xjb 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/api-common.xjb 2011-04-07 17:22:59 +0000
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 xmlns:capi="http://docs.openstack.org/common/api/v1.0" version="2.0"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
7 schemaLocation="api-common.xsd">
8 <schemaBindings>
9 <package name="com.rackspace.cloud.common.api.beans" />
10 </schemaBindings>
11</bindings>
012
=== added file 'nova/api/openstack/schemas/v1.1/api-common.xsd'
--- nova/api/openstack/schemas/v1.1/api-common.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/api-common.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,67 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6
7<schema
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified"
10 xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:capi="http://docs.openstack.org/common/api/v1.0"
12 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
13 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14 targetNamespace="http://docs.openstack.org/common/api/v1.0"
15>
16 <annotation>
17 <xsd:appinfo
18 xml:lang="EN"
19 xmlns="http://www.w3.org/1999/xhtml">
20 <xsdxt:title>Open Stack Common API Schema Types 1.0</xsdxt:title>
21 <xsdxt:link rev="index" href="extensions.xsd" />
22 <xsdxt:link rev="index" href="limits.xsd" />
23 <xsdxt:link rev="index" href="version.xsd" />
24 </xsd:appinfo>
25 <xsd:documentation
26 xml:lang="EN"
27 xmlns="http://www.w3.org/1999/xhtml">
28 <p>
29 This is the main index XML Schema document
30 for Common API Schema Types Version 1.0.
31 </p>
32 </xsd:documentation>
33 </annotation>
34 <include schemaLocation="extensions.xsd">
35 <annotation>
36 <xsd:documentation
37 xml:lang="EN"
38 xmlns="http://www.w3.org/1999/xhtml">
39 <p>
40 Types related to extensions.
41 </p>
42 </xsd:documentation>
43 </annotation>
44 </include>
45 <include schemaLocation="limits.xsd">
46 <annotation>
47 <xsd:documentation
48 xml:lang="EN"
49 xmlns="http://www.w3.org/1999/xhtml">
50 <p>
51 Types related to rate and absolute limits.
52 </p>
53 </xsd:documentation>
54 </annotation>
55 </include>
56 <include schemaLocation="version.xsd">
57 <annotation>
58 <xsd:documentation
59 xml:lang="EN"
60 xmlns="http://www.w3.org/1999/xhtml">
61 <p>
62 Types related to API version details.
63 </p>
64 </xsd:documentation>
65 </annotation>
66 </include>
67</schema>
068
=== added file 'nova/api/openstack/schemas/v1.1/api.xjb'
--- nova/api/openstack/schemas/v1.1/api.xjb 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/api.xjb 2011-04-07 17:22:59 +0000
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 xmlns:csapi="http://docs.openstack.org/servers/api/v1.0" version="2.0"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
7 schemaLocation="api.xsd">
8 <globalBindings>
9 <serializable />
10 <javaType name="java.util.Calendar" xmlType="xsd:dateTime"
11 parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
12 printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
13 </globalBindings>
14 <schemaBindings>
15 <package name="com.rackspace.cloud.servers.api.beans" />
16 </schemaBindings>
17</bindings>
018
=== added file 'nova/api/openstack/schemas/v1.1/api.xsd'
--- nova/api/openstack/schemas/v1.1/api.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/api.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,117 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6
7<schema
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified"
10 xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
12 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
13 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
15>
16 <annotation>
17 <xsd:appinfo
18 xml:lang="EN"
19 xmlns="http://www.w3.org/1999/xhtml">
20 <xsdxt:title>Open Stack Compute&#x2122; API Schema Types 1.1</xsdxt:title>
21 <xsdxt:link rev="index" href="actions.xsd" />
22 <xsdxt:link rev="index" href="backup.xsd" />
23 <xsdxt:link rev="index" href="common.xsd" />
24 <xsdxt:link rev="index" href="faults.xsd" />
25 <xsdxt:link rev="index" href="flavor.xsd" />
26 <xsdxt:link rev="index" href="image.xsd" />
27 <xsdxt:link rev="index" href="ipgroup.xsd" />
28 <xsdxt:link rev="index" href="server.xsd" />
29 </xsd:appinfo>
30 <xsd:documentation
31 xml:lang="EN"
32 xmlns="http://www.w3.org/1999/xhtml">
33 <p>
34 This is the main index XML Schema document
35 for the Open Stack Compute API Version 1.1.
36 </p>
37 </xsd:documentation>
38 </annotation>
39 <include schemaLocation="server.xsd">
40 <annotation>
41 <xsd:documentation
42 xml:lang="EN"
43 xmlns="http://www.w3.org/1999/xhtml">
44 <p>
45 Servers and all internal Entities including: Addresses,
46 Files, and MetaData.
47 </p>
48 </xsd:documentation>
49 </annotation>
50 </include>
51 <include schemaLocation="image.xsd">
52 <annotation>
53 <xsd:documentation
54 xml:lang="EN"
55 xmlns="http://www.w3.org/1999/xhtml">
56 <p>
57 Types related to images.
58 </p>
59 </xsd:documentation>
60 </annotation>
61 </include>
62 <include schemaLocation="flavor.xsd">
63 <annotation>
64 <xsd:documentation
65 xml:lang="EN"
66 xmlns="http://www.w3.org/1999/xhtml">
67 <p>
68 Types related to flavors.
69 </p>
70 </xsd:documentation>
71 </annotation>
72 </include>
73 <include schemaLocation="ipgroup.xsd">
74 <annotation>
75 <xsd:documentation
76 xml:lang="EN"
77 xmlns="http://www.w3.org/1999/xhtml">
78 <p>
79 Types related to shared IP groups.
80 </p>
81 </xsd:documentation>
82 </annotation>
83 </include>
84 <include schemaLocation="backup.xsd">
85 <annotation>
86 <xsd:documentation
87 xml:lang="EN"
88 xmlns="http://www.w3.org/1999/xhtml">
89 <p>
90 Types related to backup schedules.
91 </p>
92 </xsd:documentation>
93 </annotation>
94 </include>
95 <include schemaLocation="actions.xsd">
96 <annotation>
97 <xsd:documentation
98 xml:lang="EN"
99 xmlns="http://www.w3.org/1999/xhtml">
100 <p>
101 Defines server actions: reboot, rebuild, resize...
102 </p>
103 </xsd:documentation>
104 </annotation>
105 </include>
106 <include schemaLocation="faults.xsd">
107 <annotation>
108 <xsd:documentation
109 xml:lang="EN"
110 xmlns="http://www.w3.org/1999/xhtml">
111 <p>
112 All fault types.
113 </p>
114 </xsd:documentation>
115 </annotation>
116 </include>
117</schema>
0118
=== added directory 'nova/api/openstack/schemas/v1.1/atom'
=== added file 'nova/api/openstack/schemas/v1.1/atom.xjb'
--- nova/api/openstack/schemas/v1.1/atom.xjb 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/atom.xjb 2011-04-07 17:22:59 +0000
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 version="2.0"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
7 schemaLocation="atom/atom.xsd">
8 <schemaBindings>
9 <package name="org.w3.www.atom"/>
10 </schemaBindings>
11</bindings>
012
=== added file 'nova/api/openstack/schemas/v1.1/atom/atom.xsd'
--- nova/api/openstack/schemas/v1.1/atom/atom.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/atom/atom.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,115 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
4 targetNamespace="http://www.w3.org/2005/Atom"
5 xmlns:html="http://www.w3.org/1999/xhtml"
6 xmlns:atom="http://www.w3.org/2005/Atom"
7 xmlns:xml="http://www.w3.org/XML/1998/namespace"
8 xmlns:xs="http://www.w3.org/2001/XMLSchema">
9
10 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
11
12 <xs:simpleType name="relation">
13 <xs:restriction base="xs:string">
14 <xs:enumeration value="alternate" />
15 <xs:enumeration value="appendix" />
16 <xs:enumeration value="archives" />
17 <xs:enumeration value="author" />
18 <xs:enumeration value="bookmark" />
19 <xs:enumeration value="chapter" />
20 <xs:enumeration value="contents" />
21 <xs:enumeration value="copyright" />
22 <xs:enumeration value="current" />
23 <xs:enumeration value="describedby" />
24 <xs:enumeration value="edit" />
25 <xs:enumeration value="edit-media" />
26 <xs:enumeration value="first" />
27 <xs:enumeration value="glossary" />
28 <xs:enumeration value="help" />
29 <xs:enumeration value="hub" />
30 <xs:enumeration value="icon" />
31 <xs:enumeration value="index" />
32 <xs:enumeration value="last" />
33 <xs:enumeration value="latest-version" />
34 <xs:enumeration value="license" />
35 <xs:enumeration value="monitor" />
36 <xs:enumeration value="monitor-group" />
37 <xs:enumeration value="next" />
38 <xs:enumeration value="next-arvhice" />
39 <xs:enumeration value="nofollow" />
40 <xs:enumeration value="payment" />
41 <xs:enumeration value="predecessor-version" />
42 <xs:enumeration value="prefetch" />
43 <xs:enumeration value="prev" />
44 <xs:enumeration value="previous" />
45 <xs:enumeration value="prev-archive" />
46 <xs:enumeration value="replies" />
47 <xs:enumeration value="search" />
48 <xs:enumeration value="section" />
49 <xs:enumeration value="self" />
50 <xs:enumeration value="service" />
51 <xs:enumeration value="start" />
52 <xs:enumeration value="stylesheet" />
53 <xs:enumeration value="subsection" />
54 <xs:enumeration value="successor-version" />
55 <xs:enumeration value="up" />
56 <xs:enumeration value="version-history" />
57 <xs:enumeration value="via" />
58 <xs:enumeration value="working-copy" />
59 <xs:enumeration value="working-copy-of" />
60 </xs:restriction>
61 </xs:simpleType>
62
63 <xs:element name="link" type="atom:link" />
64
65 <xs:complexType name="link">
66 <xs:annotation>
67 <xs:documentation>
68 <html:p>See section 3.4 of the ATOM RFC <html:a href="http://tools.ietf.org/html/rfc4287">RFC4287</html:a></html:p>
69 </xs:documentation>
70 </xs:annotation>
71
72 <xs:attribute name="rel" use="required" type="atom:relation">
73 <xs:annotation>
74 <xs:documentation>
75 <html:p>TODO</html:p>
76 </xs:documentation>
77 </xs:annotation>
78 </xs:attribute>
79
80 <xs:attribute name="type" use="optional" type="xs:string">
81 <xs:annotation>
82 <xs:documentation>
83 <html:p>TODO</html:p>
84 </xs:documentation>
85 </xs:annotation>
86 </xs:attribute>
87
88 <xs:attribute name="href" use="required" type="xs:anyURI">
89 <xs:annotation>
90 <xs:documentation>
91 <html:p>TODO</html:p>
92 </xs:documentation>
93 </xs:annotation>
94 </xs:attribute>
95
96 <xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN">
97 <xs:annotation>
98 <xs:documentation>
99 <html:p>TODO</html:p>
100 </xs:documentation>
101 </xs:annotation>
102 </xs:attribute>
103
104 <xs:attribute name="title" use="optional" type="xs:string">
105 <xs:annotation>
106 <xs:documentation>
107 <html:p>TODO</html:p>
108 </xs:documentation>
109 </xs:annotation>
110 </xs:attribute>
111
112 <xs:attribute ref="xml:base" />
113 <xs:attribute ref="xml:lang" />
114 </xs:complexType>
115</xs:schema>
0116
=== added file 'nova/api/openstack/schemas/v1.1/atom/xml.xsd'
--- nova/api/openstack/schemas/v1.1/atom/xml.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/atom/xml.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,287 @@
1<?xml version='1.0'?>
2<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
3<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
4 xmlns:xs="http://www.w3.org/2001/XMLSchema"
5 xmlns ="http://www.w3.org/1999/xhtml"
6 xml:lang="en">
7
8 <xs:annotation>
9 <xs:documentation>
10 <div>
11 <h1>About the XML namespace</h1>
12
13 <div class="bodytext">
14 <p>
15 This schema document describes the XML namespace, in a form
16 suitable for import by other schema documents.
17 </p>
18 <p>
19 See <a href="http://www.w3.org/XML/1998/namespace.html">
20 http://www.w3.org/XML/1998/namespace.html</a> and
21 <a href="http://www.w3.org/TR/REC-xml">
22 http://www.w3.org/TR/REC-xml</a> for information
23 about this namespace.
24 </p>
25 <p>
26 Note that local names in this namespace are intended to be
27 defined only by the World Wide Web Consortium or its subgroups.
28 The names currently defined in this namespace are listed below.
29 They should not be used with conflicting semantics by any Working
30 Group, specification, or document instance.
31 </p>
32 <p>
33 See further below in this document for more information about <a
34 href="#usage">how to refer to this schema document from your own
35 XSD schema documents</a> and about <a href="#nsversioning">the
36 namespace-versioning policy governing this schema document</a>.
37 </p>
38 </div>
39 </div>
40 </xs:documentation>
41 </xs:annotation>
42
43 <xs:attribute name="lang">
44 <xs:annotation>
45 <xs:documentation>
46 <div>
47
48 <h3>lang (as an attribute name)</h3>
49 <p>
50 denotes an attribute whose value
51 is a language code for the natural language of the content of
52 any element; its value is inherited. This name is reserved
53 by virtue of its definition in the XML specification.</p>
54
55 </div>
56 <div>
57 <h4>Notes</h4>
58 <p>
59 Attempting to install the relevant ISO 2- and 3-letter
60 codes as the enumerated possible values is probably never
61 going to be a realistic possibility.
62 </p>
63 <p>
64 See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
65 http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
66 and the IANA language subtag registry at
67 <a href="http://www.iana.org/assignments/language-subtag-registry">
68 http://www.iana.org/assignments/language-subtag-registry</a>
69 for further information.
70 </p>
71 <p>
72 The union allows for the 'un-declaration' of xml:lang with
73 the empty string.
74 </p>
75 </div>
76 </xs:documentation>
77 </xs:annotation>
78 <xs:simpleType>
79 <xs:union memberTypes="xs:language">
80 <xs:simpleType>
81 <xs:restriction base="xs:string">
82 <xs:enumeration value=""/>
83 </xs:restriction>
84 </xs:simpleType>
85 </xs:union>
86 </xs:simpleType>
87 </xs:attribute>
88
89 <xs:attribute name="space">
90 <xs:annotation>
91 <xs:documentation>
92 <div>
93
94 <h3>space (as an attribute name)</h3>
95 <p>
96 denotes an attribute whose
97 value is a keyword indicating what whitespace processing
98 discipline is intended for the content of the element; its
99 value is inherited. This name is reserved by virtue of its
100 definition in the XML specification.</p>
101
102 </div>
103 </xs:documentation>
104 </xs:annotation>
105 <xs:simpleType>
106 <xs:restriction base="xs:NCName">
107 <xs:enumeration value="default"/>
108 <xs:enumeration value="preserve"/>
109 </xs:restriction>
110 </xs:simpleType>
111 </xs:attribute>
112
113 <xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
114 <xs:documentation>
115 <div>
116
117 <h3>base (as an attribute name)</h3>
118 <p>
119 denotes an attribute whose value
120 provides a URI to be used as the base for interpreting any
121 relative URIs in the scope of the element on which it
122 appears; its value is inherited. This name is reserved
123 by virtue of its definition in the XML Base specification.</p>
124
125 <p>
126 See <a
127 href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
128 for information about this attribute.
129 </p>
130 </div>
131 </xs:documentation>
132 </xs:annotation>
133 </xs:attribute>
134
135 <xs:attribute name="id" type="xs:ID">
136 <xs:annotation>
137 <xs:documentation>
138 <div>
139
140 <h3>id (as an attribute name)</h3>
141 <p>
142 denotes an attribute whose value
143 should be interpreted as if declared to be of type ID.
144 This name is reserved by virtue of its definition in the
145 xml:id specification.</p>
146
147 <p>
148 See <a
149 href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
150 for information about this attribute.
151 </p>
152 </div>
153 </xs:documentation>
154 </xs:annotation>
155 </xs:attribute>
156
157 <xs:attributeGroup name="specialAttrs">
158 <xs:attribute ref="xml:base"/>
159 <xs:attribute ref="xml:lang"/>
160 <xs:attribute ref="xml:space"/>
161 <xs:attribute ref="xml:id"/>
162 </xs:attributeGroup>
163
164 <xs:annotation>
165 <xs:documentation>
166 <div>
167
168 <h3>Father (in any context at all)</h3>
169
170 <div class="bodytext">
171 <p>
172 denotes Jon Bosak, the chair of
173 the original XML Working Group. This name is reserved by
174 the following decision of the W3C XML Plenary and
175 XML Coordination groups:
176 </p>
177 <blockquote>
178 <p>
179 In appreciation for his vision, leadership and
180 dedication the W3C XML Plenary on this 10th day of
181 February, 2000, reserves for Jon Bosak in perpetuity
182 the XML name "xml:Father".
183 </p>
184 </blockquote>
185 </div>
186 </div>
187 </xs:documentation>
188 </xs:annotation>
189
190 <xs:annotation>
191 <xs:documentation>
192 <div xml:id="usage" id="usage">
193 <h2><a name="usage">About this schema document</a></h2>
194
195 <div class="bodytext">
196 <p>
197 This schema defines attributes and an attribute group suitable
198 for use by schemas wishing to allow <code>xml:base</code>,
199 <code>xml:lang</code>, <code>xml:space</code> or
200 <code>xml:id</code> attributes on elements they define.
201 </p>
202 <p>
203 To enable this, such a schema must import this schema for
204 the XML namespace, e.g. as follows:
205 </p>
206 <pre>
207 &lt;schema . . .>
208 . . .
209 &lt;import namespace="http://www.w3.org/XML/1998/namespace"
210 schemaLocation="http://www.w3.org/2001/xml.xsd"/>
211 </pre>
212 <p>
213 or
214 </p>
215 <pre>
216 &lt;import namespace="http://www.w3.org/XML/1998/namespace"
217 schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
218 </pre>
219 <p>
220 Subsequently, qualified reference to any of the attributes or the
221 group defined below will have the desired effect, e.g.
222 </p>
223 <pre>
224 &lt;type . . .>
225 . . .
226 &lt;attributeGroup ref="xml:specialAttrs"/>
227 </pre>
228 <p>
229 will define a type which will schema-validate an instance element
230 with any of those attributes.
231 </p>
232 </div>
233 </div>
234 </xs:documentation>
235 </xs:annotation>
236
237 <xs:annotation>
238 <xs:documentation>
239 <div id="nsversioning" xml:id="nsversioning">
240 <h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
241 <div class="bodytext">
242 <p>
243 In keeping with the XML Schema WG's standard versioning
244 policy, this schema document will persist at
245 <a href="http://www.w3.org/2009/01/xml.xsd">
246 http://www.w3.org/2009/01/xml.xsd</a>.
247 </p>
248 <p>
249 At the date of issue it can also be found at
250 <a href="http://www.w3.org/2001/xml.xsd">
251 http://www.w3.org/2001/xml.xsd</a>.
252 </p>
253 <p>
254 The schema document at that URI may however change in the future,
255 in order to remain compatible with the latest version of XML
256 Schema itself, or with the XML namespace itself. In other words,
257 if the XML Schema or XML namespaces change, the version of this
258 document at <a href="http://www.w3.org/2001/xml.xsd">
259 http://www.w3.org/2001/xml.xsd
260 </a>
261 will change accordingly; the version at
262 <a href="http://www.w3.org/2009/01/xml.xsd">
263 http://www.w3.org/2009/01/xml.xsd
264 </a>
265 will not change.
266 </p>
267 <p>
268 Previous dated (and unchanging) versions of this schema
269 document are at:
270 </p>
271 <ul>
272 <li><a href="http://www.w3.org/2009/01/xml.xsd">
273 http://www.w3.org/2009/01/xml.xsd</a></li>
274 <li><a href="http://www.w3.org/2007/08/xml.xsd">
275 http://www.w3.org/2007/08/xml.xsd</a></li>
276 <li><a href="http://www.w3.org/2004/10/xml.xsd">
277 http://www.w3.org/2004/10/xml.xsd</a></li>
278 <li><a href="http://www.w3.org/2001/03/xml.xsd">
279 http://www.w3.org/2001/03/xml.xsd</a></li>
280 </ul>
281 </div>
282 </div>
283 </xs:documentation>
284 </xs:annotation>
285
286</xs:schema>
287
0288
=== added file 'nova/api/openstack/schemas/v1.1/backup.xsd'
--- nova/api/openstack/schemas/v1.1/backup.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/backup.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,378 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6<schema
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
11 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
13 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
14>
15
16 <annotation>
17 <xsd:appinfo
18 xml:lang="EN"
19 xmlns="http://www.w3.org/1999/xhtml">
20 <xsdxt:title>Backup Schedule</xsdxt:title>
21 <xsdxt:link rel="index" href="api.xsd" />
22 </xsd:appinfo>
23 <xsd:documentation
24 xml:lang="EN"
25 xmlns="http://www.w3.org/1999/xhtml">
26 <p>
27 This schema file defines all entities related to <a
28 href="#type_BackupSchedule" title="See definition of
29 BackupSchedule">Backup Schedules</a>.
30 </p>
31 </xsd:documentation>
32 </annotation>
33
34 <element name="backupSchedule" type="csapi:BackupSchedule">
35 <annotation>
36 <xsd:documentation
37 xml:lang="EN"
38 xmlns="http://www.w3.org/1999/xhtml">
39 <p>
40 This element is used to create periodic daily and weekly
41 images automatically.
42 </p>
43 </xsd:documentation>
44 <xsd:appinfo>
45 <xsdxt:samples>
46 <xsdxt:sample>
47 <xsdxt:code type="application/xml" href="../samples/backup.xml" />
48 </xsdxt:sample>
49 <xsdxt:sample>
50 <xsdxt:code type="application/json" href="../samples/backup.json" />
51 </xsdxt:sample>
52 </xsdxt:samples>
53 </xsd:appinfo>
54 </annotation>
55 </element>
56
57 <!-- Complex Types -->
58 <complexType name="BackupSchedule">
59 <sequence>
60 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
61 </sequence>
62 <attribute type="xsd:boolean" name="enabled" use="required">
63 <annotation>
64 <xsd:documentation
65 xml:lang="EN"
66 xmlns="http://www.w3.org/1999/xhtml">
67 <p>
68 If true, both daily and weekly backup schedules are
69 disabled.
70 </p>
71 </xsd:documentation>
72 </annotation>
73 </attribute>
74 <attribute type="csapi:WeeklyBackup" name="weekly" use="required">
75 <annotation>
76 <xsd:documentation
77 xml:lang="EN"
78 xmlns="http://www.w3.org/1999/xhtml">
79 <p>
80 A <a href="#type_WeeklyBackup" title="See definition of
81 WeeklyBackup">WeeklyBackup</a> type that describes the day
82 of the week in which to perform a weekly backup or
83 DISABLED if weekly backups are disabled.
84 </p>
85 </xsd:documentation>
86 </annotation>
87 </attribute>
88 <attribute type="csapi:DailyBackup" name="daily" use="required">
89 <annotation>
90 <xsd:documentation
91 xml:lang="EN"
92 xmlns="http://www.w3.org/1999/xhtml">
93 <p>
94 A <a href="#type_DailyBackup" title="See definition of
95 DailyBackup">DailyBackup</a> type that describes an hour
96 range in which to perform a daily backup or DISABLED if
97 daily backups are disabled.
98 </p>
99 </xsd:documentation>
100 </annotation>
101 </attribute>
102 <anyAttribute namespace="##other" processContents="lax"/>
103 </complexType>
104
105 <!-- Simple Types -->
106 <simpleType name="DailyBackup">
107 <annotation>
108 <xsd:documentation
109 xml:lang="EN"
110 xmlns="http://www.w3.org/1999/xhtml">
111 <p>
112 A target GMT hour range in which to perform a daily backup
113 or DISABLED if daily backups are disabled.
114 </p>
115 </xsd:documentation>
116 </annotation>
117 <restriction base="xsd:string">
118 <enumeration value="DISABLED">
119 <annotation>
120 <xsd:documentation
121 xml:lang="EN"
122 xmlns="http://www.w3.org/1999/xhtml">
123 <p>
124 Daily backups are disabled.
125 </p>
126 </xsd:documentation>
127 </annotation>
128 </enumeration>
129 <enumeration value="H_0000_0200">
130 <annotation>
131 <xsd:documentation
132 xml:lang="EN"
133 xmlns="http://www.w3.org/1999/xhtml">
134 <p>
135 Daily backup target of 00:00&#x2013;02:00 GMT.
136 </p>
137 </xsd:documentation>
138 </annotation>
139 </enumeration>
140 <enumeration value="H_0200_0400">
141 <annotation>
142 <xsd:documentation
143 xml:lang="EN"
144 xmlns="http://www.w3.org/1999/xhtml">
145 <p>
146 Daily backup target of 02:00&#x2013;04:00 GMT.
147 </p>
148 </xsd:documentation>
149 </annotation>
150 </enumeration>
151 <enumeration value="H_0400_0600">
152 <annotation>
153 <xsd:documentation
154 xml:lang="EN"
155 xmlns="http://www.w3.org/1999/xhtml">
156 <p>
157 Daily backup target of 04:00&#x2013;06:00 GMT.
158 </p>
159 </xsd:documentation>
160 </annotation>
161 </enumeration>
162 <enumeration value="H_0600_0800">
163 <annotation>
164 <xsd:documentation
165 xml:lang="EN"
166 xmlns="http://www.w3.org/1999/xhtml">
167 <p>
168 Daily backup target of 06:00&#x2013;08:00 GMT.
169 </p>
170 </xsd:documentation>
171 </annotation>
172 </enumeration>
173 <enumeration value="H_0800_1000">
174 <annotation>
175 <xsd:documentation
176 xml:lang="EN"
177 xmlns="http://www.w3.org/1999/xhtml">
178 <p>
179 Daily backup target of 08:00&#x2013;10:00 GMT.
180 </p>
181 </xsd:documentation>
182 </annotation>
183 </enumeration>
184 <enumeration value="H_1000_1200">
185 <annotation>
186 <xsd:documentation
187 xml:lang="EN"
188 xmlns="http://www.w3.org/1999/xhtml">
189 <p>
190 Daily backup target of 10:00&#x2013;12:00 GMT.
191 </p>
192 </xsd:documentation>
193 </annotation>
194 </enumeration>
195 <enumeration value="H_1200_1400">
196 <annotation>
197 <xsd:documentation
198 xml:lang="EN"
199 xmlns="http://www.w3.org/1999/xhtml">
200 <p>
201 Daily backup target of 12:00&#x2013;14:00 GMT.
202 </p>
203 </xsd:documentation>
204 </annotation>
205 </enumeration>
206 <enumeration value="H_1400_1600">
207 <annotation>
208 <xsd:documentation
209 xml:lang="EN"
210 xmlns="http://www.w3.org/1999/xhtml">
211 <p>
212 Daily backup target of 14:00&#x2013;16:00 GMT.
213 </p>
214 </xsd:documentation>
215 </annotation>
216 </enumeration>
217 <enumeration value="H_1600_1800">
218 <annotation>
219 <xsd:documentation
220 xml:lang="EN"
221 xmlns="http://www.w3.org/1999/xhtml">
222 <p>
223 Daily backup target of 16:00&#x2013;18:00 GMT.
224 </p>
225 </xsd:documentation>
226 </annotation>
227 </enumeration>
228 <enumeration value="H_1800_2000">
229 <annotation>
230 <xsd:documentation
231 xml:lang="EN"
232 xmlns="http://www.w3.org/1999/xhtml">
233 <p>
234 Daily backup target of 18:00&#x2013;20:00 GMT.
235 </p>
236 </xsd:documentation>
237 </annotation>
238 </enumeration>
239 <enumeration value="H_2000_2200">
240 <annotation>
241 <xsd:documentation
242 xml:lang="EN"
243 xmlns="http://www.w3.org/1999/xhtml">
244 <p>
245 Daily backup target of 20:00&#x2013;22:00 GMT.
246 </p>
247 </xsd:documentation>
248 </annotation>
249 </enumeration>
250 <enumeration value="H_2200_0000">
251 <annotation>
252 <xsd:documentation
253 xml:lang="EN"
254 xmlns="http://www.w3.org/1999/xhtml">
255 <p>
256 Daily backup target of 22:00&#x2013;00:00 GMT.
257 </p>
258 </xsd:documentation>
259 </annotation>
260 </enumeration>
261 </restriction>
262 </simpleType>
263
264 <simpleType name="WeeklyBackup">
265 <annotation>
266 <xsd:documentation
267 xml:lang="EN"
268 xmlns="http://www.w3.org/1999/xhtml">
269 <p>
270 A target day of the week in which to perform a weekly backup
271 or DISABLED if daily backups are disabled.
272 </p>
273 </xsd:documentation>
274 </annotation>
275 <restriction base="xsd:string">
276 <enumeration value="DISABLED">
277 <annotation>
278 <xsd:documentation
279 xml:lang="EN"
280 xmlns="http://www.w3.org/1999/xhtml">
281 <p>
282 Weekly backups are disabled.
283 </p>
284 </xsd:documentation>
285 </annotation>
286 </enumeration>
287 <enumeration value="SUNDAY">
288 <annotation>
289 <xsd:documentation
290 xml:lang="EN"
291 xmlns="http://www.w3.org/1999/xhtml">
292 <p>
293 A weekly backup target of Sunday.
294 </p>
295 </xsd:documentation>
296 </annotation>
297 </enumeration>
298 <enumeration value="MONDAY">
299 <annotation>
300 <xsd:documentation
301 xml:lang="EN"
302 xmlns="http://www.w3.org/1999/xhtml">
303 <p>
304 A weekly backup target of Monday.
305 </p>
306 </xsd:documentation>
307 </annotation>
308 </enumeration>
309 <enumeration value="TUESDAY">
310 <annotation>
311 <xsd:documentation
312 xml:lang="EN"
313 xmlns="http://www.w3.org/1999/xhtml">
314 <p>
315 A weekly backup target of Tuesday.
316 </p>
317 </xsd:documentation>
318 </annotation>
319 </enumeration>
320 <enumeration value="WEDNESDAY">
321 <annotation>
322 <xsd:documentation
323 xml:lang="EN"
324 xmlns="http://www.w3.org/1999/xhtml">
325 <p>
326 A weekly backup target of Wednesday.
327 </p>
328 </xsd:documentation>
329 </annotation>
330 </enumeration>
331 <enumeration value="THURSDAY">
332 <annotation>
333 <xsd:documentation
334 xml:lang="EN"
335 xmlns="http://www.w3.org/1999/xhtml">
336 <p>
337 A weekly backup target of Thursday.
338 </p>
339 </xsd:documentation>
340 </annotation>
341 </enumeration>
342 <enumeration value="FRIDAY">
343 <annotation>
344 <xsd:documentation
345 xml:lang="EN"
346 xmlns="http://www.w3.org/1999/xhtml">
347 <p>
348 A weekly backup target of Friday.
349 </p>
350 </xsd:documentation>
351 </annotation>
352 </enumeration>
353 <enumeration value="SATURDAY">
354 <annotation>
355 <xsd:documentation
356 xml:lang="EN"
357 xmlns="http://www.w3.org/1999/xhtml">
358 <p>
359 A weekly backup target of Saturday.
360 </p>
361 </xsd:documentation>
362 </annotation>
363 </enumeration>
364 <enumeration value="SUNDAY">
365 <annotation>
366 <xsd:documentation
367 xml:lang="EN"
368 xmlns="http://www.w3.org/1999/xhtml">
369 <p>
370 A weekly backup target of Sunday.
371 </p>
372 </xsd:documentation>
373 </annotation>
374 </enumeration>
375 </restriction>
376 </simpleType>
377</schema>
378
0379
=== added file 'nova/api/openstack/schemas/v1.1/common.xsd'
--- nova/api/openstack/schemas/v1.1/common.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/common.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,125 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6<schema
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
11 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
13 xmlns:atom="http://www.w3.org/2005/Atom"
14 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
15 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
16>
17
18 <annotation>
19 <xsd:appinfo
20 xml:lang="EN"
21 xmlns="http://www.w3.org/1999/xhtml">
22 <xsdxt:title>Common Types</xsdxt:title>
23 <xsdxt:link rel="index" href="api.xsd" />
24 </xsd:appinfo>
25 <xsd:documentation
26 xml:lang="EN"
27 xmlns="http://www.w3.org/1999/xhtml">
28 <p>
29 This schema file defines common types used by multiple
30 entities and possibly spanning several types of requests.
31 </p>
32 </xsd:documentation>
33 </annotation>
34
35 <!-- Import ATOM specific schema definitions -->
36 <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
37
38 <complexType name="Metadata">
39 <sequence>
40 <element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="1000">
41 <annotation>
42 <xsd:documentation
43 xml:lang="EN"
44 xmlns="http://www.w3.org/1999/xhtml">
45 <p>
46 A collection of metadata items. There may be an
47 absolute limit that imposes additional constraints on
48 the number of metadata items.
49 </p>
50 </xsd:documentation>
51 </annotation>
52 </element>
53 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
54 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
55 </sequence>
56 <anyAttribute namespace="##other" processContents="lax"/>
57 </complexType>
58 <complexType name="MetadataItem">
59 <annotation>
60 <xsd:documentation
61 xml:lang="EN"
62 xmlns="http://www.w3.org/1999/xhtml">
63 <p>
64 A MetadataItem is simply a name-value pair. The name is
65 specified in the key attribute and the <a
66 href="#type_MetadataValue" title="See definition of
67 MetadataValue">value</a> is included inline.
68 </p>
69 <xsdxt:code type="application/xml">
70 <![CDATA[
71 <meta xmlns="http://docs.openstack.org/compute/api/v1.0"
72 key="Server Label">Web Head 1</meta>
73 ]]>
74 </xsdxt:code>
75 </xsd:documentation>
76 </annotation>
77 <simpleContent>
78 <extension base="csapi:MetadataValue">
79 <attribute name="key" type="csapi:MetadataKey" use="required">
80 <annotation>
81 <xsd:documentation
82 xml:lang="EN"
83 xmlns="http://www.w3.org/1999/xhtml">
84 <p>
85 A meta data name-value pair.
86 </p>
87 </xsd:documentation>
88 </annotation>
89 </attribute>
90 <anyAttribute namespace="##other" processContents="lax"/>
91 </extension>
92 </simpleContent>
93 </complexType>
94
95 <!-- Simple types that span multiple requests -->
96 <simpleType name="Progress">
97 <annotation>
98 <xsd:documentation
99 xml:lang="EN"
100 xmlns="http://www.w3.org/1999/xhtml">
101 <p>
102 An integer between 0 and 100 that denotes the progress of an
103 operation.
104 </p>
105 </xsd:documentation>
106 </annotation>
107 <restriction base="xsd:int">
108 <minInclusive value="0"/>
109 <maxInclusive value="100" />
110 </restriction>
111 </simpleType>
112
113 <simpleType name="MetadataKey">
114 <restriction base="xsd:string">
115 <maxLength value="255" />
116 </restriction>
117 </simpleType>
118
119 <simpleType name="MetadataValue">
120 <restriction base="xsd:string">
121 <maxLength value="255" />
122 </restriction>
123 </simpleType>
124</schema>
125
0126
=== added file 'nova/api/openstack/schemas/v1.1/extensions.xsd'
--- nova/api/openstack/schemas/v1.1/extensions.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/extensions.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,56 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
4 targetNamespace="http://docs.openstack.org/common/api/v1.0"
5 xmlns:ext="http://docs.openstack.org/common/api/v1.0"
6 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:atom="http://www.w3.org/2005/Atom"
9 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
10
11 <!-- Import ATOM specific schema definitions -->
12 <xsd:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
13
14 <xsd:element name="extensions" type="ext:Extensions"/>
15 <xsd:element name="extension" type="ext:Extension"/>
16
17 <xsd:complexType name="Extensions">
18 <xsd:sequence>
19 <xsd:element name="extension" type="ext:Extension" minOccurs="0" maxOccurs="unbounded" />
20 <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
21 </xsd:sequence>
22 <xsd:anyAttribute namespace="##other" processContents="lax"/>
23 </xsd:complexType>
24
25 <xsd:complexType name="Extension">
26 <xsd:sequence>
27 <xsd:element name="description" type="xsd:string" minOccurs="1" />
28 <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
29 <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
30 </xsd:sequence>
31 <xsd:attribute name="name" type="xsd:string" use="required"/>
32 <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
33 <xsd:attribute name="alias" type="ext:Alias" use="required"/>
34 <xsd:attribute name="updated" type="xsd:dateTime" use="optional"/>
35 <xsd:anyAttribute namespace="##other" processContents="lax"/>
36 <xsd:assert vc:minVersion="1.1" test="atom:link[@rel='describedby']">
37 <xsd:annotation>
38 <xsd:documentation
39 xml:lang="EN"
40 xmlns="http://www.w3.org/1999/xhtml">
41 <p>
42 There should be at least one atom link
43 with a describedby relation.
44 </p>
45 </xsd:documentation>
46 </xsd:annotation>
47 </xsd:assert>
48 </xsd:complexType>
49
50 <xsd:simpleType name="Alias">
51 <xsd:restriction base="xsd:string">
52 <xsd:pattern value="\w+\-\w+" />
53 </xsd:restriction>
54 </xsd:simpleType>
55
56</xsd:schema>
057
=== added file 'nova/api/openstack/schemas/v1.1/faults.xsd'
--- nova/api/openstack/schemas/v1.1/faults.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/faults.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,482 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6
7<schema
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified"
10 xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
12 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
13 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
14 targetNamespace="http://docs.openstack.org/compute/api/v1.1">
15
16 <annotation>
17 <xsd:appinfo
18 xml:lang="EN"
19 xmlns="http://www.w3.org/1999/xhtml">
20 <xsdxt:title>Faults</xsdxt:title>
21 <xsdxt:link rel="index" href="api.xsd" />
22 </xsd:appinfo>
23 <xsd:documentation
24 xml:lang="EN"
25 xmlns="http://www.w3.org/1999/xhtml">
26 <p>
27 This schema file defines faults that may be raised by the
28 Cloud Servers API. These faults are derived from the <a
29 href="#type_ComputeAPIFault" title="See definition of
30 ComputeAPIFault">ComputeAPIFault</a>. Most faults
31 extend this type without adding any additional attributes or
32 elements. The only exception is the <a
33 href="#type_OverLimitAPIFault" title="See definition of
34 OverLimitAPIFault">OverLimitAPIFault</a> which adds a
35 <strong>retryAt</strong> attribute. Because all faults
36 extend a standard base type, it should be possible to capture
37 all API faults with a single <code>catch</code> statement.
38 </p>
39 <p>
40 Faults are associated with a default HTTP status code that
41 corresponds to the particular fault type. For example an <a
42 href="#element_itemNotFound" title="see definition of
43 itemNotFound">&lt;itemNotFound&gt;</a> element is associated
44 with the HTTP status code 404. Some elements, the <a
45 href="#element_computeFault" title="see definition of
46 computeFault">&lt;computeFault&gt;</a> element for
47 example, may be associated with multiple status codes. It is
48 also possible for multiple fault elements to be associated
49 with the same default code. The examples below showcase the
50 default status codes for each element type. Note that these
51 default codes are not part of the formal schema. In practice,
52 however, an element type will likely be associated with its
53 corresponding default status code.
54 </p>
55 </xsd:documentation>
56 </annotation>
57
58 <!-- Faults -->
59 <element name="computeFault" type="csapi:ComputeAPIFault">
60 <annotation>
61 <xsd:documentation
62 xml:lang="EN"
63 xmlns="http://www.w3.org/1999/xhtml">
64 <p>
65 A generic Cloud Servers API fault.
66 </p>
67 </xsd:documentation>
68 <xsd:appinfo>
69 <xsdxt:samples>
70 <xsdxt:sample>
71 <xsdxt:code type="application/xml" href="../samples/fault.xml" />
72 </xsdxt:sample>
73 <xsdxt:sample>
74 <xsdxt:code type="application/json" href="../samples/fault.json" />
75 </xsdxt:sample>
76 </xsdxt:samples>
77 </xsd:appinfo>
78 </annotation>
79 </element>
80 <element name="itemNotFound" type="csapi:ItemNotFoundAPIFault">
81 <annotation>
82 <xsd:documentation
83 xml:lang="EN"
84 xmlns="http://www.w3.org/1999/xhtml">
85 <p>
86 The item or resource could not be found.
87 </p>
88 </xsd:documentation>
89 <xsd:appinfo>
90 <xsdxt:samples>
91 <xsdxt:sample>
92 <xsdxt:code type="application/xml" href="../samples/notfound.xml" />
93 </xsdxt:sample>
94 <xsdxt:sample>
95 <xsdxt:code type="application/json" href="../samples/notfound.json" />
96 </xsdxt:sample>
97 </xsdxt:samples>
98 </xsd:appinfo>
99 </annotation>
100 </element>
101 <element name="buildInProgress" type="csapi:BuildInProgressAPIFault">
102 <annotation>
103 <xsd:documentation
104 xml:lang="EN"
105 xmlns="http://www.w3.org/1999/xhtml">
106 <p>
107 The operation is not allowed because the corresponding
108 server is in a build state.
109 </p>
110 </xsd:documentation>
111 <xsd:appinfo>
112 <xsdxt:samples>
113 <xsdxt:sample>
114 <xsdxt:code type="application/xml" href="../samples/build.xml" />
115 </xsdxt:sample>
116 <xsdxt:sample>
117 <xsdxt:code type="application/json" href="../samples/build.json" />
118 </xsdxt:sample>
119 </xsdxt:samples>
120 </xsd:appinfo>
121 </annotation>
122 </element>
123 <element name="serverCapacityUnavailable" type="csapi:ServerCapacityUnavailableAPIFault">
124 <annotation>
125 <xsd:documentation
126 xml:lang="EN"
127 xmlns="http://www.w3.org/1999/xhtml">
128 <p>
129 There is not enough capacity to honor the request.
130 </p>
131 </xsd:documentation>
132 <xsd:appinfo>
133 <xsdxt:samples>
134 <xsdxt:sample>
135 <xsdxt:code type="application/xml" href="../samples/serverCap.xml" />
136 </xsdxt:sample>
137 <xsdxt:sample>
138 <xsdxt:code type="application/json" href="../samples/serverCap.json" />
139 </xsdxt:sample>
140 </xsdxt:samples>
141 </xsd:appinfo>
142 </annotation>
143 </element>
144 <element name="backupOrResizeInProgress" type="csapi:BackupOrResizeInProgressAPIFault">
145 <annotation>
146 <xsd:documentation
147 xml:lang="EN"
148 xmlns="http://www.w3.org/1999/xhtml">
149 <p>
150 The operation is not allowed because the corresponding
151 server is being re-sized or backed up.
152 </p>
153 </xsd:documentation>
154 <xsd:appinfo>
155 <xsdxt:samples>
156 <xsdxt:sample>
157 <xsdxt:code type="application/xml" href="../samples/backupInProgress.xml" />
158 </xsdxt:sample>
159 <xsdxt:sample>
160 <xsdxt:code type="application/json" href="../samples/backupInProgress.json" />
161 </xsdxt:sample>
162 </xsdxt:samples>
163 </xsd:appinfo>
164 </annotation>
165 </element>
166 <element name="resizeNotAllowed" type="csapi:ResizeNotAllowedAPIFault">
167 <annotation>
168 <xsd:documentation
169 xml:lang="EN"
170 xmlns="http://www.w3.org/1999/xhtml">
171 <p>
172 The re-size operation is not permitted.
173 </p>
174 </xsd:documentation>
175 <xsd:appinfo>
176 <xsdxt:samples>
177 <xsdxt:sample>
178 <xsdxt:code type="application/xml" href="../samples/resizeNotAllowed.xml" />
179 </xsdxt:sample>
180 <xsdxt:sample>
181 <xsdxt:code type="application/json" href="../samples/resizeNotAllowed.json" />
182 </xsdxt:sample>
183 </xsdxt:samples>
184 </xsd:appinfo>
185 </annotation>
186 </element>
187 <element name="serviceUnavailable" type="csapi:ServiceUnavailableAPIFault">
188 <annotation>
189 <xsd:documentation
190 xml:lang="EN"
191 xmlns="http://www.w3.org/1999/xhtml">
192 <p>
193 The API service is currently unavailable.
194 </p>
195 </xsd:documentation>
196 <xsd:appinfo>
197 <xsdxt:samples>
198 <xsdxt:sample>
199 <xsdxt:code type="application/xml" href="../samples/serviceNotAvailable.xml" />
200 </xsdxt:sample>
201 <xsdxt:sample>
202 <xsdxt:code type="application/json" href="../samples/serviceNotAvailable.json" />
203 </xsdxt:sample>
204 </xsdxt:samples>
205 </xsd:appinfo>
206 </annotation>
207 </element>
208 <element name="unauthorized" type="csapi:UnauthorizedAPIFault">
209 <annotation>
210 <xsd:documentation
211 xml:lang="EN"
212 xmlns="http://www.w3.org/1999/xhtml">
213 <p>
214 Insufficient privileges to honor the request, perhaps an
215 authentication token needs to be obtained or renewed.
216 </p>
217 </xsd:documentation>
218 <xsd:appinfo>
219 <xsdxt:samples>
220 <xsdxt:sample>
221 <xsdxt:code type="application/xml" href="../samples/unauth.xml" />
222 </xsdxt:sample>
223 <xsdxt:sample>
224 <xsdxt:code type="application/json" href="../samples/unauth.json" />
225 </xsdxt:sample>
226 </xsdxt:samples>
227 </xsd:appinfo>
228 </annotation>
229 </element>
230 <element name="overLimit" type="csapi:OverLimitAPIFault">
231 <annotation>
232 <xsd:documentation
233 xml:lang="EN"
234 xmlns="http://www.w3.org/1999/xhtml">
235 <p>
236 An <a href="limits.xsd#type_AbsoluteLimit" title="See
237 definition of AbsoluteLimit">absolute</a> or <a
238 href="limits.xsd#type_RateLimit" title="See definition of
239 RateLimit">rate</a> limit has been exceeded.
240 </p>
241 </xsd:documentation>
242 <xsd:appinfo>
243 <xsdxt:samples>
244 <xsdxt:sample>
245 <xsdxt:code type="application/xml" href="../samples/overlimit.xml" />
246 </xsdxt:sample>
247 <xsdxt:sample>
248 <xsdxt:code type="application/json" href="../samples/overlimit.json" />
249 </xsdxt:sample>
250 </xsdxt:samples>
251 </xsd:appinfo>
252 </annotation>
253 </element>
254 <element name="badRequest" type="csapi:BadRequestAPIFault">
255 <annotation>
256 <xsd:documentation
257 xml:lang="EN"
258 xmlns="http://www.w3.org/1999/xhtml">
259 <p>
260 The request is malformed.
261 </p>
262 </xsd:documentation>
263 <xsd:appinfo>
264 <xsdxt:samples>
265 <xsdxt:sample>
266 <xsdxt:code type="application/xml" href="../samples/badrequest.xml" />
267 </xsdxt:sample>
268 <xsdxt:sample>
269 <xsdxt:code type="application/json" href="../samples/badrequest.json" />
270 </xsdxt:sample>
271 </xsdxt:samples>
272 </xsd:appinfo>
273 </annotation>
274 </element>
275 <element name="badMediaType" type="csapi:BadMediaTypeAPIFault">
276 <annotation>
277 <xsd:documentation
278 xml:lang="EN"
279 xmlns="http://www.w3.org/1999/xhtml">
280 <p>
281 The Content Type of the request is not supported.
282 </p>
283 </xsd:documentation>
284 <xsd:appinfo>
285 <xsdxt:samples>
286 <xsdxt:sample>
287 <xsdxt:code type="application/xml" href="../samples/badmediatype.xml" />
288 </xsdxt:sample>
289 <xsdxt:sample>
290 <xsdxt:code type="application/json" href="../samples/badmediatype.json" />
291 </xsdxt:sample>
292 </xsdxt:samples>
293 </xsd:appinfo>
294 </annotation>
295 </element>
296 <element name="badMethod" type="csapi:BadMethodAPIFault">
297 <annotation>
298 <xsd:documentation
299 xml:lang="EN"
300 xmlns="http://www.w3.org/1999/xhtml">
301 <p>
302 The HTTP method (or <a href="limits.xsd#type_HTTPVerb"
303 title="See definition of HTTPVerb">verb</a>) is not
304 supported by the corresponding resource.
305 </p>
306 </xsd:documentation>
307 <xsd:appinfo>
308 <xsdxt:samples>
309 <xsdxt:sample>
310 <xsdxt:code type="application/xml" href="../samples/badmethod.xml" />
311 </xsdxt:sample>
312 <xsdxt:sample>
313 <xsdxt:code type="application/json" href="../samples/badmethod.json" />
314 </xsdxt:sample>
315 </xsdxt:samples>
316 </xsd:appinfo>
317 </annotation>
318 </element>
319 <element name="notImplemented" type="csapi:NotImplementedAPIFault">
320 <annotation>
321 <xsd:documentation
322 xml:lang="EN"
323 xmlns="http://www.w3.org/1999/xhtml">
324 <p>
325 The operation is currently not implemented.
326 </p>
327 </xsd:documentation>
328 <xsd:appinfo>
329 <xsdxt:samples>
330 <xsdxt:sample>
331 <xsdxt:code type="application/xml" href="../samples/notimplemented.xml" />
332 </xsdxt:sample>
333 <xsdxt:sample>
334 <xsdxt:code type="application/json" href="../samples/notimplemented.json" />
335 </xsdxt:sample>
336 </xsdxt:samples>
337 </xsd:appinfo>
338 </annotation>
339 </element>
340
341 <!-- Complex Types -->
342 <complexType name="ComputeAPIFault">
343 <sequence>
344 <element name="message" type="xsd:string">
345 <annotation>
346 <xsd:documentation
347 xml:lang="EN"
348 xmlns="http://www.w3.org/1999/xhtml">
349 <p>
350 A human readable message that is appropriate for display
351 to the end user.
352 </p>
353 </xsd:documentation>
354 </annotation>
355 </element>
356 <element name="details" type="xsd:string" minOccurs="0">
357 <annotation>
358 <xsd:documentation
359 xml:lang="EN"
360 xmlns="http://www.w3.org/1999/xhtml">
361 <p>
362 The optional &lt;details&gt; element may contain useful
363 information for tracking down errors (e.g a stack
364 trace). This information may or may not be appropriate
365 for display to an end user.
366 </p>
367 </xsd:documentation>
368 </annotation>
369 </element>
370 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
371 </sequence>
372 <attribute name="code" type="xsd:int" use="required">
373 <annotation>
374 <xsd:documentation
375 xml:lang="EN"
376 xmlns="http://www.w3.org/1999/xhtml">
377 <p>
378 The HTTP status code associated with the current fault.
379 </p>
380 </xsd:documentation>
381 </annotation>
382 </attribute>
383 <anyAttribute namespace="##other" processContents="lax"/>
384 </complexType>
385
386 <complexType name="ItemNotFoundAPIFault">
387 <complexContent>
388 <extension base="csapi:ComputeAPIFault">
389 </extension>
390 </complexContent>
391 </complexType>
392
393 <complexType name="BuildInProgressAPIFault">
394 <complexContent>
395 <extension base="csapi:ComputeAPIFault">
396 </extension>
397 </complexContent>
398 </complexType>
399
400 <complexType name="ServerCapacityUnavailableAPIFault">
401 <complexContent>
402 <extension base="csapi:ComputeAPIFault">
403 </extension>
404 </complexContent>
405 </complexType>
406
407 <complexType name="BackupOrResizeInProgressAPIFault">
408 <complexContent>
409 <extension base="csapi:ComputeAPIFault">
410 </extension>
411 </complexContent>
412 </complexType>
413
414 <complexType name="ResizeNotAllowedAPIFault">
415 <complexContent>
416 <extension base="csapi:ComputeAPIFault">
417 </extension>
418 </complexContent>
419 </complexType>
420
421 <complexType name="ServiceUnavailableAPIFault">
422 <complexContent>
423 <extension base="csapi:ComputeAPIFault">
424 </extension>
425 </complexContent>
426 </complexType>
427
428 <complexType name="UnauthorizedAPIFault">
429 <complexContent>
430 <extension base="csapi:ComputeAPIFault">
431 </extension>
432 </complexContent>
433 </complexType>
434
435 <complexType name="OverLimitAPIFault">
436 <complexContent>
437 <extension base="csapi:ComputeAPIFault">
438 <attribute name="retryAt" type="xsd:dateTime" use="optional">
439 <annotation>
440 <xsd:documentation
441 xml:lang="EN"
442 xmlns="http://www.w3.org/1999/xhtml">
443 <p>
444 An optional dateTime denoting when an operation should
445 be retried.
446 </p>
447 </xsd:documentation>
448 </annotation>
449 </attribute>
450 </extension>
451 </complexContent>
452 </complexType>
453
454 <complexType name="BadRequestAPIFault">
455 <complexContent>
456 <extension base="csapi:ComputeAPIFault">
457 </extension>
458 </complexContent>
459 </complexType>
460
461 <complexType name="BadMediaTypeAPIFault">
462 <complexContent>
463 <extension base="csapi:ComputeAPIFault">
464 </extension>
465 </complexContent>
466 </complexType>
467
468 <complexType name="BadMethodAPIFault">
469 <complexContent>
470 <extension base="csapi:ComputeAPIFault">
471 </extension>
472 </complexContent>
473 </complexType>
474
475 <complexType name="NotImplementedAPIFault">
476 <complexContent>
477 <extension base="csapi:ComputeAPIFault">
478 </extension>
479 </complexContent>
480 </complexType>
481
482</schema>
0483
=== added file 'nova/api/openstack/schemas/v1.1/flavor.xsd'
--- nova/api/openstack/schemas/v1.1/flavor.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/flavor.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,156 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6
7<schema
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified"
10 xmlns="http://www.w3.org/2001/XMLSchema"
11 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
12 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
13 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14 xmlns:atom="http://www.w3.org/2005/Atom"
15 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
16 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
17>
18 <annotation>
19 <xsd:appinfo
20 xml:lang="EN"
21 xmlns="http://www.w3.org/1999/xhtml">
22 <xsdxt:title>Flavors</xsdxt:title>
23 <xsdxt:link rel="index" href="api.xsd" />
24 </xsd:appinfo>
25 <xsd:documentation
26 xml:lang="EN"
27 xmlns="http://www.w3.org/1999/xhtml">
28 <p>
29 This schema file defines all entities related to <a
30 href="#type_Flavor" title="See definition of
31 Flavor">Flavors</a>.
32 </p>
33 </xsd:documentation>
34 </annotation>
35
36 <!-- Import ATOM specific schema definitions -->
37 <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
38
39 <element name="flavor" type="csapi:Flavor">
40 <annotation>
41 <xsd:documentation
42 xml:lang="EN"
43 xmlns="http://www.w3.org/1999/xhtml">
44 <p>
45 The element defines an available hardware configuration for
46 a server.
47 </p>
48 </xsd:documentation>
49 <xsd:appinfo>
50 <xsdxt:samples>
51 <xsdxt:sample>
52 <xsdxt:code type="application/xml" href="../samples/flavor.xml" />
53 </xsdxt:sample>
54 <xsdxt:sample>
55 <xsdxt:code type="application/json" href="../samples/flavor.json" />
56 </xsdxt:sample>
57 </xsdxt:samples>
58 </xsd:appinfo>
59 </annotation>
60 </element>
61
62 <element name="flavors" type="csapi:Flavors">
63 <annotation>
64 <xsd:documentation
65 xml:lang="EN"
66 xmlns="http://www.w3.org/1999/xhtml">
67 <p>
68 A collection of flavors.
69 </p>
70 </xsd:documentation>
71 <xsd:appinfo>
72 <xsdxt:samples>
73 <xsdxt:sample>
74 <xsdxt:code type="application/xml" href="../samples/flavors.xml" />
75 </xsdxt:sample>
76 <xsdxt:sample>
77 <xsdxt:code type="application/json" href="../samples/flavors.json" />
78 </xsdxt:sample>
79 </xsdxt:samples>
80 </xsd:appinfo>
81 </annotation>
82 </element>
83
84 <!-- Complex Types -->
85 <complexType name="Flavor">
86 <sequence>
87 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
88 </sequence>
89 <attribute type="xsd:int" name="id" use="required">
90 <annotation>
91 <xsd:documentation
92 xml:lang="EN"
93 xmlns="http://www.w3.org/1999/xhtml">
94 <p>
95 The ID of the flavor.
96 </p>
97 </xsd:documentation>
98 </annotation>
99 </attribute>
100 <attribute type="xsd:string" name="name" use="required">
101 <annotation>
102 <xsd:documentation
103 xml:lang="EN"
104 xmlns="http://www.w3.org/1999/xhtml">
105 <p>
106 The name of the flavor.
107 </p>
108 </xsd:documentation>
109 </annotation>
110 </attribute>
111 <attribute type="xsd:int" name="ram" use="optional">
112 <annotation>
113 <xsd:documentation
114 xml:lang="EN"
115 xmlns="http://www.w3.org/1999/xhtml">
116 <p>
117 The amount of RAM in the flavor in megabytes.
118 </p>
119 </xsd:documentation>
120 </annotation>
121 </attribute>
122 <attribute type="xsd:int" name="disk" use="optional">
123 <annotation>
124 <xsd:documentation
125 xml:lang="EN"
126 xmlns="http://www.w3.org/1999/xhtml">
127 <p>
128 The amount of disk space in the flavor in gigabytes.
129 </p>
130 </xsd:documentation>
131 </annotation>
132 </attribute>
133 <anyAttribute namespace="##other" processContents="lax"/>
134 </complexType>
135
136 <complexType name="Flavors">
137 <sequence>
138 <element name="flavor" type="csapi:Flavor" minOccurs="0" maxOccurs="1000">
139 <annotation>
140 <xsd:documentation
141 xml:lang="EN"
142 xmlns="http://www.w3.org/1999/xhtml">
143 <p>
144 A collection of flavors.
145 </p>
146 </xsd:documentation>
147 </annotation>
148 </element>
149 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
150 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
151 </sequence>
152 <anyAttribute namespace="##other" processContents="lax"/>
153 </complexType>
154
155</schema>
156
0157
=== added file 'nova/api/openstack/schemas/v1.1/image.xsd'
--- nova/api/openstack/schemas/v1.1/image.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/image.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,286 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6<schema
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
11 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
13 xmlns:atom="http://www.w3.org/2005/Atom"
14 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
15 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
16>
17 <annotation>
18 <xsd:appinfo
19 xml:lang="EN"
20 xmlns="http://www.w3.org/1999/xhtml">
21 <xsdxt:title>Images</xsdxt:title>
22 <xsdxt:link rel="index" href="api.xsd" />
23 </xsd:appinfo>
24 <xsd:documentation
25 xml:lang="EN"
26 xmlns="http://www.w3.org/1999/xhtml">
27 <p>
28 This schema file defines all entity related to <a
29 href="#type_Image" title="See definition of Image">Images</a>.
30 </p>
31 </xsd:documentation>
32 </annotation>
33
34 <!-- Import ATOM specific schema definitions -->
35 <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
36
37 <include schemaLocation="common.xsd">
38 <annotation>
39 <xsd:documentation
40 xml:lang="EN"
41 xmlns="http://www.w3.org/1999/xhtml">
42 <p>
43 Common types used by multiple entities and possibly spanning
44 several types of requests.
45 </p>
46 </xsd:documentation>
47 </annotation>
48 </include>
49
50 <element name="image" type="csapi:Image">
51 <annotation>
52 <xsd:documentation
53 xml:lang="EN"
54 xmlns="http://www.w3.org/1999/xhtml">
55 <p>
56 The element defines a collection of files used to create or
57 rebuild a server.
58 </p>
59 </xsd:documentation>
60 <xsd:appinfo>
61 <xsdxt:samples>
62 <xsdxt:sample>
63 <xsdxt:code type="application/xml" href="../samples/image.xml" />
64 </xsdxt:sample>
65 <xsdxt:sample>
66 <xsdxt:code type="application/json" href="../samples/image.json" />
67 </xsdxt:sample>
68 </xsdxt:samples>
69 </xsd:appinfo>
70 </annotation>
71 </element>
72 <element name="images" type="csapi:Images">
73 <annotation>
74 <xsd:documentation
75 xml:lang="EN"
76 xmlns="http://www.w3.org/1999/xhtml">
77 <p>
78 A collection of images.
79 </p>
80 </xsd:documentation>
81 <xsd:appinfo>
82 <xsdxt:samples>
83 <xsdxt:sample>
84 <xsdxt:code type="application/xml" href="../samples/images.xml" />
85 </xsdxt:sample>
86 <xsdxt:sample>
87 <xsdxt:code type="application/json" href="../samples/images.json" />
88 </xsdxt:sample>
89 </xsdxt:samples>
90 </xsd:appinfo>
91 </annotation>
92 </element>
93
94 <!-- Complex Types -->
95 <complexType name="Image">
96 <sequence>
97 <element name="metadata" type="csapi:Metadata" minOccurs="0">
98 <annotation>
99 <xsd:documentation
100 xml:lang="EN"
101 xmlns="http://www.w3.org/1999/xhtml">
102 <p>
103 A collection of meta data items associated with the image.
104 </p>
105 </xsd:documentation>
106 </annotation>
107 </element>
108 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
109 </sequence>
110 <attribute type="xsd:int" name="id" use="optional">
111 <annotation>
112 <xsd:documentation
113 xml:lang="EN"
114 xmlns="http://www.w3.org/1999/xhtml">
115 <p>
116 The ID of the image.
117 </p>
118 </xsd:documentation>
119 </annotation>
120 </attribute>
121 <attribute type="xsd:string" name="name" use="required">
122 <annotation>
123 <xsd:documentation
124 xml:lang="EN"
125 xmlns="http://www.w3.org/1999/xhtml">
126 <p>
127 The name of the image.
128 </p>
129 </xsd:documentation>
130 </annotation>
131 </attribute>
132 <attribute type="xsd:anyURI" name="serverRef" use="optional">
133 <annotation>
134 <xsd:documentation
135 xml:lang="EN"
136 xmlns="http://www.w3.org/1999/xhtml">
137 <p>
138 An optional reference of the server associated with the image.
139 </p>
140 </xsd:documentation>
141 </annotation>
142 </attribute>
143 <attribute type="xsd:dateTime" name="updated" use="optional">
144 <annotation>
145 <xsd:documentation
146 xml:lang="EN"
147 xmlns="http://www.w3.org/1999/xhtml">
148 <p>
149 A time-stamp identifying the modification time of the
150 image.
151 </p>
152 </xsd:documentation>
153 </annotation>
154 </attribute>
155 <attribute type="xsd:dateTime" name="created" use="optional">
156 <annotation>
157 <xsd:documentation
158 xml:lang="EN"
159 xmlns="http://www.w3.org/1999/xhtml">
160 <p>
161 A creation time-stamp for the image.
162 </p>
163 </xsd:documentation>
164 </annotation>
165 </attribute>
166 <attribute type="csapi:Progress" name="progress" use="optional">
167 <annotation>
168 <xsd:documentation
169 xml:lang="EN"
170 xmlns="http://www.w3.org/1999/xhtml">
171 <p>
172 The progress of the current image operation.
173 </p>
174 </xsd:documentation>
175 </annotation>
176 </attribute>
177 <attribute type="csapi:ImageStatus" name="status" use="optional">
178 <annotation>
179 <xsd:documentation
180 xml:lang="EN"
181 xmlns="http://www.w3.org/1999/xhtml">
182 <p>
183 The current state (or <a href="#type_ImageStatus"
184 title="See definition of ImageStatus">status</a>) of the
185 image.
186 </p>
187 </xsd:documentation>
188 </annotation>
189 </attribute>
190 <anyAttribute namespace="##other" processContents="lax"/>
191 </complexType>
192
193 <complexType name="Images">
194 <sequence>
195 <element name="image" type="csapi:Image" minOccurs="0" maxOccurs="1000">
196 <annotation>
197 <xsd:documentation
198 xml:lang="EN"
199 xmlns="http://www.w3.org/1999/xhtml">
200 <p>
201 A collection of images.
202 </p>
203 </xsd:documentation>
204 </annotation>
205 </element>
206 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
207 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
208 </sequence>
209 <anyAttribute namespace="##other" processContents="lax"/>
210 </complexType>
211
212 <!-- Simple Types -->
213 <simpleType name="ImageStatus">
214 <restriction base="xsd:string">
215 <enumeration value="UNKNOWN">
216 <annotation>
217 <xsd:documentation
218 xml:lang="EN"
219 xmlns="http://www.w3.org/1999/xhtml">
220 <p>
221 The image is in an unknown state.
222 </p>
223 </xsd:documentation>
224 </annotation>
225 </enumeration>
226 <enumeration value="ACTIVE">
227 <annotation>
228 <xsd:documentation
229 xml:lang="EN"
230 xmlns="http://www.w3.org/1999/xhtml">
231 <p>
232 All operations have completed successfully, the image is
233 available for install.
234 </p>
235 </xsd:documentation>
236 </annotation>
237 </enumeration>
238 <enumeration value="SAVING">
239 <annotation>
240 <xsd:documentation
241 xml:lang="EN"
242 xmlns="http://www.w3.org/1999/xhtml">
243 <p>
244 The image is being created (or saved).
245 </p>
246 </xsd:documentation>
247 </annotation>
248 </enumeration>
249 <enumeration value="PREPARING">
250 <annotation>
251 <xsd:documentation
252 xml:lang="EN"
253 xmlns="http://www.w3.org/1999/xhtml">
254 <p>
255 The image is being prepared to perform an operation.
256 </p>
257 </xsd:documentation>
258 </annotation>
259 </enumeration>
260 <enumeration value="QUEUED">
261 <annotation>
262 <xsd:documentation
263 xml:lang="EN"
264 xmlns="http://www.w3.org/1999/xhtml">
265 <p>
266 A request to perform an operation on the specified image
267 has been received. The operation is pending.
268 </p>
269 </xsd:documentation>
270 </annotation>
271 </enumeration>
272 <enumeration value="FAILED">
273 <annotation>
274 <xsd:documentation
275 xml:lang="EN"
276 xmlns="http://www.w3.org/1999/xhtml">
277 <p>
278 The requested operation has failed.
279 </p>
280 </xsd:documentation>
281 </annotation>
282 </enumeration>
283 </restriction>
284 </simpleType>
285</schema>
286
0287
=== added file 'nova/api/openstack/schemas/v1.1/ipgroup.xsd'
--- nova/api/openstack/schemas/v1.1/ipgroup.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/ipgroup.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,231 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6<schema
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
11 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
13 xmlns:atom="http://www.w3.org/2005/Atom"
14 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
15 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
16>
17 <annotation>
18 <xsd:appinfo
19 xml:lang="EN"
20 xmlns="http://www.w3.org/1999/xhtml">
21 <xsdxt:title>Shared IP Groups</xsdxt:title>
22 <xsdxt:link rel="index" href="api.xsd" />
23 </xsd:appinfo>
24 <xsd:documentation
25 xml:lang="EN"
26 xmlns="http://www.w3.org/1999/xhtml">
27 <p>
28 This schema file defines all entities related to <a
29 href="#type_SharedIpGroup" title="See definition of
30 SharedIPGroup">Shared IP Groups</a>.
31 </p>
32 </xsd:documentation>
33 </annotation>
34
35 <!-- Import ATOM specific schema definitions -->
36 <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
37
38 <element name="sharedIpGroup" type="csapi:SharedIpGroup">
39 <annotation>
40 <xsd:documentation
41 xml:lang="EN"
42 xmlns="http://www.w3.org/1999/xhtml">
43 <p>
44 The element defines a group of servers that can share one or
45 more public IPs with each other.
46 </p>
47 </xsd:documentation>
48 <xsd:appinfo>
49 <xsdxt:samples>
50 <xsdxt:sample>
51 <xsdxt:code type="application/xml" href="../samples/ipgroup.xml" />
52 </xsdxt:sample>
53 <xsdxt:sample>
54 <xsdxt:code type="application/json" href="../samples/ipgroup.json" />
55 </xsdxt:sample>
56 </xsdxt:samples>
57 </xsd:appinfo>
58 </annotation>
59 </element>
60 <element name="sharedIpGroups" type="csapi:SharedIpGroups">
61 <annotation>
62 <xsd:documentation
63 xml:lang="EN"
64 xmlns="http://www.w3.org/1999/xhtml">
65 <p>
66 A collection of shared IP groups.
67 </p>
68 </xsd:documentation>
69 <xsd:appinfo>
70 <xsdxt:samples>
71 <xsdxt:sample>
72 <xsdxt:code type="application/xml" href="../samples/ipgroups.xml" />
73 </xsdxt:sample>
74 <xsdxt:sample>
75 <xsdxt:code type="application/json" href="../samples/ipgroups.json" />
76 </xsdxt:sample>
77 </xsdxt:samples>
78 </xsd:appinfo>
79 </annotation>
80 </element>
81
82 <!-- Complex Types -->
83 <complexType name="SharedIpGroup">
84 <sequence>
85 <choice>
86 <annotation>
87 <xsd:documentation
88 xml:lang="EN"
89 xmlns="http://www.w3.org/1999/xhtml">
90 <p>
91 An IP group type can take two basic forms. On a request
92 a single, optional, server ID may be specified&#x2026;
93 </p>
94 <xsdxt:samples>
95 <xsdxt:sample>
96 <xsdxt:code type="application/xml" href="../samples/ipgroup2.xml" />
97 </xsdxt:sample>
98 <xsdxt:sample>
99 <xsdxt:code type="application/json" href="../samples/ipgroup2.json" />
100 </xsdxt:sample>
101 </xsdxt:samples>
102 <p>
103 &#x2026;on a response a server ID list is always returned. This
104 server list may be empty&#x2026;
105 </p>
106 <xsdxt:samples>
107 <xsdxt:sample>
108 <xsdxt:code type="application/xml" href="../samples/ipgroup.xml" />
109 </xsdxt:sample>
110 <xsdxt:sample>
111 <xsdxt:code type="application/json" href="../samples/ipgroup.json" />
112 </xsdxt:sample>
113 </xsdxt:samples>
114 <p>
115 &#x2026;note that is a mutually exclusive choice: either
116 a &lt;server&gt; or &lt;servers&gt; element must be
117 specified, but not both.
118 </p>
119 </xsd:documentation>
120 </annotation>
121 <element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="1">
122 <annotation>
123 <xsd:documentation
124 xml:lang="EN"
125 xmlns="http://www.w3.org/1999/xhtml">
126 <p>
127 A single, optional, server ID. This form is used when
128 creating an IP group.
129 </p>
130 </xsd:documentation>
131 </annotation>
132 </element>
133 <element name="servers" type="csapi:ServerIDList">
134 <annotation>
135 <xsd:documentation
136 xml:lang="EN"
137 xmlns="http://www.w3.org/1999/xhtml">
138 <p>
139 A collection of server IDs. This form is used when
140 querying an IP group.
141 </p>
142 </xsd:documentation>
143 </annotation>
144 </element>
145 </choice>
146 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
147 </sequence>
148 <attribute type="xsd:int" name="id" use="optional">
149 <annotation>
150 <xsd:documentation
151 xml:lang="EN"
152 xmlns="http://www.w3.org/1999/xhtml">
153 <p>
154 The ID of the shared IP group. The attribute should not
155 be specified when creating a new shared IP group.
156 </p>
157 </xsd:documentation>
158 </annotation>
159 </attribute>
160 <attribute type="xsd:string" name="name" use="required">
161 <annotation>
162 <xsd:documentation
163 xml:lang="EN"
164 xmlns="http://www.w3.org/1999/xhtml">
165 <p>
166 The name of the shared IP group.
167 </p>
168 </xsd:documentation>
169 </annotation>
170 </attribute>
171 <anyAttribute namespace="##other" processContents="lax"/>
172 </complexType>
173
174 <complexType name="SharedIpGroups">
175 <sequence>
176 <element name="sharedIpGroup" type="csapi:SharedIpGroup" minOccurs="0" maxOccurs="1000">
177 <annotation>
178 <xsd:documentation
179 xml:lang="EN"
180 xmlns="http://www.w3.org/1999/xhtml">
181 <p>
182 A collection of shared IP groups.
183 </p>
184 </xsd:documentation>
185 </annotation>
186 </element>
187 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
188 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
189 </sequence>
190 <anyAttribute namespace="##other" processContents="lax"/>
191 </complexType>
192
193 <complexType name="ServerIDList">
194 <sequence>
195 <element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="25">
196 <annotation>
197 <xsd:documentation
198 xml:lang="EN"
199 xmlns="http://www.w3.org/1999/xhtml">
200 <p>
201 A collection of servers within a shared IP group.
202 </p>
203 </xsd:documentation>
204 </annotation>
205 </element>
206 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
207 </sequence>
208 <anyAttribute namespace="##other" processContents="lax"/>
209 </complexType>
210
211 <complexType name="ServerID">
212 <sequence>
213 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
214 </sequence>
215 <attribute name="id" type="xsd:int" use="required">
216 <annotation>
217 <xsd:documentation
218 xml:lang="EN"
219 xmlns="http://www.w3.org/1999/xhtml">
220 <p>
221 The ID of a server within a shared IP group.
222 </p>
223 </xsd:documentation>
224 </annotation>
225 </attribute>
226 <anyAttribute namespace="##other" processContents="lax"/>
227 </complexType>
228</schema>
229
230
231
0232
=== added file 'nova/api/openstack/schemas/v1.1/limits.xsd'
--- nova/api/openstack/schemas/v1.1/limits.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/limits.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,282 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
4 targetNamespace="http://docs.openstack.org/common/api/v1.0"
5 xmlns:limits="http://docs.openstack.org/common/api/v1.0"
6 xmlns:html="http://www.w3.org/1999/xhtml"
7 xmlns:xs="http://www.w3.org/2001/XMLSchema">
8
9 <!-- Enumeration and SimpleType definitions -->
10 <xs:simpleType name="HttpMethod">
11 <xs:annotation>
12 <xs:documentation>
13 <html:p>
14 The HttpMethod simple type defines a string
15 enumeration of HTTP method verbs as outlined in <a
16 href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>
17 section 9.
18 </html:p>
19 </xs:documentation>
20 </xs:annotation>
21
22 <xs:restriction base="xs:string">
23 <xs:enumeration value="GET" />
24 <xs:enumeration value="DELETE" />
25 <xs:enumeration value="POST" />
26 <xs:enumeration value="PUT" />
27 <xs:enumeration value="HEAD" />
28 <xs:enumeration value="OPTIONS" />
29 <xs:enumeration value="CONNECT" />
30 <xs:enumeration value="TRACE" />
31
32 <xs:enumeration value="ALL" />
33 </xs:restriction>
34 </xs:simpleType>
35
36 <xs:simpleType name="TimeUnit">
37 <xs:annotation>
38 <xs:documentation>
39 <html:p>
40 The TimeUnit simple type defines a string
41 enumeration of coarse time units that are be used
42 to define the duration of time that a limited
43 request will be unavailable for.
44 </html:p>
45 </xs:documentation>
46 </xs:annotation>
47
48 <xs:restriction base="xs:string">
49 <xs:enumeration value="SECOND" />
50 <xs:enumeration value="MINUTE" />
51 <xs:enumeration value="HOUR" />
52 <xs:enumeration value="DAY" />
53 </xs:restriction>
54 </xs:simpleType>
55
56
57 <!-- Live limit definitions -->
58 <xs:element name="limits" type="limits:Limits" />
59
60 <xs:complexType name="Limits">
61 <xs:annotation>
62 <xs:documentation>
63 <html:p>
64 A Limits type defines a collection of limits
65 </html:p>
66 </xs:documentation>
67 </xs:annotation>
68
69 <xs:sequence>
70 <xs:element name="rates" type="limits:RateLimitList" minOccurs="0" maxOccurs="1" />
71 <xs:element name="absolute" type="limits:AbsoluteLimitList" minOccurs="0" maxOccurs="1" />
72 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
73 </xs:sequence>
74 <xs:anyAttribute namespace="##other" processContents="lax"/>
75 </xs:complexType>
76
77 <xs:complexType name="AbsoluteLimitList">
78 <xs:annotation>
79 <xs:documentation>
80 <html:p>
81 An AbsoluteLimitList type defines a list of absolute limits
82 </html:p>
83 </xs:documentation>
84 </xs:annotation>
85
86 <xs:sequence>
87 <xs:element name="limit" type="limits:AbsoluteLimit" minOccurs="1" maxOccurs="unbounded" />
88 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
89 </xs:sequence>
90 <xs:anyAttribute namespace="##other" processContents="lax"/>
91 </xs:complexType>
92
93 <xs:complexType name="RateLimitList">
94 <xs:annotation>
95 <xs:documentation>
96 <html:p>
97 A RateLimitList type defines a list of resource
98 scoped limit collections.
99 </html:p>
100 </xs:documentation>
101 </xs:annotation>
102
103 <xs:sequence>
104 <xs:element name="rate" type="limits:ResourceRateLimits" minOccurs="1" maxOccurs="unbounded" />
105 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
106 </xs:sequence>
107 <xs:anyAttribute namespace="##other" processContents="lax"/>
108 </xs:complexType>
109
110 <xs:complexType name="ResourceRateLimits">
111 <xs:annotation>
112 <xs:documentation>
113 <html:p>
114 A ResourceLimitCollection type represents a
115 collection of limits that are scoped to a single
116 resource variant.
117 </html:p>
118 </xs:documentation>
119 </xs:annotation>
120
121 <xs:sequence>
122 <xs:element name="limit" type="limits:RateLimit" minOccurs="1" maxOccurs="unbounded" />
123 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
124 </xs:sequence>
125
126 <xs:attribute name="uri" type="xs:string" use="required">
127 <xs:annotation>
128 <xs:documentation>
129 <html:p>
130 The uri of a limit collection is a human
131 readable string version of the regular
132 expression matcher that is used to define the
133 limit collection resource scope.
134 </html:p>
135 </xs:documentation>
136 </xs:annotation>
137 </xs:attribute>
138
139 <xs:attribute name="regex" type="xs:string" use="required">
140 <xs:annotation>
141 <xs:documentation>
142 <html:p>
143 A collection of limits are scoped to a
144 resource by a regular expression.
145
146 <html:div class="note">
147 <html:strong>Note:</html:strong> the
148 regular expressions are only guaranteed to
149 work with the Java Standard Edition 6
150 Regular Expression Engine. Please see the
151 <html:a
152 href="http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html">JAPI
153 documentation</html:a> for more
154 information.
155 </html:div>
156 </html:p>
157 </xs:documentation>
158 </xs:annotation>
159 </xs:attribute>
160 <xs:anyAttribute namespace="##other" processContents="lax"/>
161 </xs:complexType>
162
163 <xs:complexType name="AbsoluteLimit">
164 <xs:annotation>
165 <xs:documentation>
166 <html:p>
167 Absolute limits are predefined fixed limits. We
168 define each of these limits as a key/value
169 pair. Please consult the API Specification for a
170 list of absolute limits used by the system.
171 </html:p>
172 </xs:documentation>
173 </xs:annotation>
174
175 <xs:sequence>
176 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
177 </xs:sequence>
178 <xs:attribute name="name" type="xs:string" use="required">
179 <xs:annotation>
180 <xs:documentation>
181 <html:p>
182 The name (or key) of the absolute limit.
183 </html:p>
184 </xs:documentation>
185 </xs:annotation>
186 </xs:attribute>
187
188 <xs:attribute name="value" type="xs:int" use="required">
189 <xs:annotation>
190 <xs:documentation>
191 <html:p>
192 A value specifying the absolute limit.The name
193 of the absolute limit determines the unit
194 type. For example, the key maxIPGroups implies
195 that the value is in terms of IPGroups.
196 </html:p>
197 </xs:documentation>
198 </xs:annotation>
199 </xs:attribute>
200 <xs:anyAttribute namespace="##other" processContents="lax"/>
201 </xs:complexType>
202
203 <xs:complexType name="RateLimit">
204 <xs:annotation>
205 <xs:documentation>
206 <html:p>
207 A Rate Limit type defines the maximum number of
208 requests that can be performed, the time interval
209 that each limited request will be unavailable for,
210 and, for convience, the remaining number of
211 requests remaining. This is done for every
212 HttpMethod that is rate limited.
213 </html:p>
214 </xs:documentation>
215 </xs:annotation>
216 <xs:sequence>
217 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
218 </xs:sequence>
219 <xs:attribute name="verb" type="limits:HttpMethod" use="required">
220 <xs:annotation>
221 <xs:documentation>
222 <html:p>
223 The verb of a Limit represents the HttpMethod
224 that the Limit is scoped to.
225 </html:p>
226 </xs:documentation>
227 </xs:annotation>
228 </xs:attribute>
229
230 <xs:attribute name="value" type="xs:int" use="required">
231 <xs:annotation>
232 <xs:documentation>
233 <html:p>
234 The value of a Limit represents maximum Number
235 of requests that the rate limit will allow.
236 </html:p>
237 </xs:documentation>
238 </xs:annotation>
239 </xs:attribute>
240
241 <xs:attribute name="remaining" type="xs:int" use="required">
242 <xs:annotation>
243 <xs:documentation>
244 <html:p>
245 The remaining number of requests that a user
246 can make against the limited resource before
247 being denied access.
248 </html:p>
249 </xs:documentation>
250 </xs:annotation>
251 </xs:attribute>
252
253 <xs:attribute name="unit" type="limits:TimeUnit" use="required">
254 <xs:annotation>
255 <xs:documentation>
256 <html:p>
257 The unit of a Limit defines the duration of a
258 limited request's unavailability.
259 </html:p>
260 </xs:documentation>
261 </xs:annotation>
262 </xs:attribute>
263
264 <xs:attribute name="next-available" type="xs:dateTime" use="required">
265 <xs:annotation>
266 <xs:documentation>
267 <html:p>
268 The next-available attribute of a Limit tells
269 the user when a limited request will become
270 available for consumption.
271
272 <html:div class="note">
273 <html:strong>Note:</html:strong> this attribute uses the
274 <html:a href="http://www.iso.org/iso/date_and_time_format">ISO 8601</html:a> date standard.
275 </html:div>
276 </html:p>
277 </xs:documentation>
278 </xs:annotation>
279 </xs:attribute>
280 <xs:anyAttribute namespace="##other" processContents="lax"/>
281 </xs:complexType>
282</xs:schema>
0283
=== added file 'nova/api/openstack/schemas/v1.1/server.xsd'
--- nova/api/openstack/schemas/v1.1/server.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/server.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,1010 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
3
4<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
5
6<schema
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
11 xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
12 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
13 xmlns:atom="http://www.w3.org/2005/Atom"
14 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
15 targetNamespace="http://docs.openstack.org/compute/api/v1.1"
16>
17 <annotation>
18 <xsd:appinfo
19 xml:lang="EN"
20 xmlns="http://www.w3.org/1999/xhtml">
21 <xsdxt:title>Servers and Related Types</xsdxt:title>
22 <xsdxt:link rel="index" href="api.xsd" />
23 </xsd:appinfo>
24 <xsd:documentation
25 xml:lang="EN"
26 xmlns="http://www.w3.org/1999/xhtml">
27 <p>
28 This schema file defines a <a href="#type_Server" title="Server Type Definition">
29 Server</a> and all internal entities
30 related to servers including:
31 <a href="#type_Addresses" title="Addresses type definition">Addresses</a>,
32 <a href="#type_ShareIp" title="ShareIp type definition">ShareIPs</a>,
33 <a href="#type_File" title="File type definition">Files</a>, and
34 <a href="#type_Metadata" title="Metadata type definition">MetaData</a>.
35 </p>
36 </xsd:documentation>
37 </annotation>
38
39 <!-- Import ATOM specific schema definitions -->
40 <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
41
42 <include schemaLocation="common.xsd">
43 <annotation>
44 <xsd:documentation
45 xml:lang="EN"
46 xmlns="http://www.w3.org/1999/xhtml">
47 <p>
48 Common types used by multiple entities and possibly spanning
49 several types of requests.
50 </p>
51 </xsd:documentation>
52 </annotation>
53 </include>
54
55 <element name="server" type="csapi:Server">
56 <annotation>
57 <xsd:documentation
58 xml:lang="EN"
59 xmlns="http://www.w3.org/1999/xhtml">
60 <p>
61 The element defines a server.
62 </p>
63 </xsd:documentation>
64 <xsd:appinfo>
65 <xsdxt:samples>
66 <xsdxt:sample>
67 <xsdxt:code type="application/xml" href="../samples/server.xml" />
68 </xsdxt:sample>
69 <xsdxt:sample>
70 <xsdxt:code type="application/json" href="../samples/server.json" />
71 </xsdxt:sample>
72 </xsdxt:samples>
73 </xsd:appinfo>
74 </annotation>
75 </element>
76
77 <element name="servers" type="csapi:Servers">
78 <annotation>
79 <xsd:documentation
80 xml:lang="EN"
81 xmlns="http://www.w3.org/1999/xhtml">
82 <p>
83 A collection of servers.
84 </p>
85 </xsd:documentation>
86 <xsd:appinfo>
87 <xsdxt:samples>
88 <xsdxt:sample>
89 <xsdxt:code type="application/xml" href="../samples/servers.xml" />
90 </xsdxt:sample>
91 <xsdxt:sample>
92 <xsdxt:code type="application/json" href="../samples/servers.json" />
93 </xsdxt:sample>
94 </xsdxt:samples>
95 </xsd:appinfo>
96 </annotation>
97 </element>
98
99 <element name="addresses" type="csapi:Addresses">
100 <annotation>
101 <xsd:documentation
102 xml:lang="EN"
103 xmlns="http://www.w3.org/1999/xhtml">
104 <p>
105 The element defines list of addresses by network: (public,
106 private, ...).
107 </p>
108 </xsd:documentation>
109 <xsd:appinfo>
110 <xsdxt:samples>
111 <xsdxt:sample>
112 <xsdxt:code type="application/xml" href="../samples/addresses.xml" />
113 </xsdxt:sample>
114 <xsdxt:sample>
115 <xsdxt:code type="application/json" href="../samples/addresses.json" />
116 </xsdxt:sample>
117 </xsdxt:samples>
118 </xsd:appinfo>
119 </annotation>
120 </element>
121
122 <element name="shareIp" type="csapi:ShareIp">
123 <annotation>
124 <xsd:documentation
125 xml:lang="EN"
126 xmlns="http://www.w3.org/1999/xhtml">
127 <p>
128 The element defines request to share a public IP address.
129 </p>
130 </xsd:documentation>
131 <xsd:appinfo>
132 <xsdxt:samples>
133 <xsdxt:sample>
134 <xsdxt:code type="application/xml" href="../samples/shareip.xml" />
135 </xsdxt:sample>
136 <xsdxt:sample>
137 <xsdxt:code type="application/json" href="../samples/shareip.json" />
138 </xsdxt:sample>
139 </xsdxt:samples>
140 </xsd:appinfo>
141 </annotation>
142 </element>
143
144 <element name="addIp" type="csapi:AddIp">
145 <annotation>
146 <xsd:documentation
147 xml:lang="EN"
148 xmlns="http://www.w3.org/1999/xhtml">
149 <p>
150 The element defines request to add an IP address.
151 </p>
152 </xsd:documentation>
153 <xsd:appinfo>
154 <xsdxt:samples>
155 <xsdxt:sample>
156 <xsdxt:code type="application/xml" href="../samples/addip.xml" />
157 </xsdxt:sample>
158 <xsdxt:sample>
159 <xsdxt:code type="application/json" href="../samples/addip.json" />
160 </xsdxt:sample>
161 </xsdxt:samples>
162 </xsd:appinfo>
163 </annotation>
164 </element>
165
166 <element name="network" type="csapi:AddressList" />
167
168 <element name="ip" type="csapi:Address">
169 <annotation>
170 <xsd:documentation
171 xml:lang="EN"
172 xmlns="http://www.w3.org/1999/xhtml">
173 <p>
174 The element defines response that returns an added IP address.
175 </p>
176 </xsd:documentation>
177 <xsd:appinfo>
178 <xsdxt:samples>
179 <xsdxt:sample>
180 <xsdxt:code type="application/xml" href="../samples/address.xml" />
181 </xsdxt:sample>
182 <xsdxt:sample>
183 <xsdxt:code type="application/json" href="../samples/addip.json" />
184 </xsdxt:sample>
185 </xsdxt:samples>
186 </xsd:appinfo>
187 </annotation>
188 </element>
189
190
191 <!-- Complex Types -->
192 <complexType name="Server">
193 <annotation>
194 <xsd:documentation
195 xml:lang="EN"
196 xmlns="http://www.w3.org/1999/xhtml">
197 <p>
198 A server is a virtual machine instance in the Cloud Servers
199 system. Note that this complex type defines all elements
200 and attributes as optional because a server instance may
201 take many different forms depending on the operation. When
202 creating a server, for example, the name, imageRef, and
203 flavorRef attributes are required. In addition, optional
204 metadata and personality file elements may be specified:
205 </p>
206 <xsdxt:samples>
207 <xsdxt:sample>
208 <xsdxt:code type="application/xml" href="../samples/server-post-req.xml" />
209 </xsdxt:sample>
210 <xsdxt:sample>
211 <xsdxt:code type="application/json" href="../samples/server-post-req.json" />
212 </xsdxt:sample>
213 </xsdxt:samples>
214 <p>
215 The response to such a crate operation will include the
216 administration password, host ID, and addresses associated
217 with the server:
218 </p>
219 <xsdxt:samples>
220 <xsdxt:sample>
221 <xsdxt:code type="application/xml" href="../samples/server-post-resp.xml" />
222 </xsdxt:sample>
223 <xsdxt:sample>
224 <xsdxt:code type="application/json" href="../samples/server-post-resp.json" />
225 </xsdxt:sample>
226 </xsdxt:samples>
227 <p>
228 When modifying a server only the name and administration
229 password should be specified as these are the only
230 attributes that are modifiable.
231 </p>
232 <xsdxt:samples>
233 <xsdxt:sample>
234 <xsdxt:code type="application/xml" href="../samples/server-put-req.xml" />
235 </xsdxt:sample>
236 <xsdxt:sample>
237 <xsdxt:code type="application/json" href="../samples/server-put-req.json" />
238 </xsdxt:sample>
239 </xsdxt:samples>
240 </xsd:documentation>
241 </annotation>
242 <sequence>
243 <element name="metadata" type="csapi:Metadata" minOccurs="0">
244 <annotation>
245 <xsd:documentation
246 xml:lang="EN"
247 xmlns="http://www.w3.org/1999/xhtml">
248 <p>
249 A collection of meta data items associated with the server.
250 </p>
251 </xsd:documentation>
252 </annotation>
253 </element>
254 <element ref="csapi:addresses" minOccurs="0">
255 <annotation>
256 <xsd:documentation
257 xml:lang="EN"
258 xmlns="http://www.w3.org/1999/xhtml">
259 <p>
260 A server's public and private address.
261 </p>
262 </xsd:documentation>
263 </annotation>
264 </element>
265 <element name="personality" type="csapi:Personality" minOccurs="0">
266 <annotation>
267 <xsd:documentation
268 xml:lang="EN"
269 xmlns="http://www.w3.org/1999/xhtml">
270 <p>
271 A collection of small <a href="#type_File" title="See
272 definition of file">files</a> used to personalize a new
273 server instance.
274 </p>
275 </xsd:documentation>
276 </annotation>
277 </element>
278 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
279 </sequence>
280 <attribute type="xsd:string" name="name" use="optional">
281 <annotation>
282 <xsd:documentation
283 xml:lang="EN"
284 xmlns="http://www.w3.org/1999/xhtml">
285 <p>
286 The name of the server.
287 </p>
288 </xsd:documentation>
289 </annotation>
290 </attribute>
291 <attribute type="xsd:int" name="id" use="optional">
292 <annotation>
293 <xsd:documentation
294 xml:lang="EN"
295 xmlns="http://www.w3.org/1999/xhtml">
296 <p>
297 The ID of the server.
298 </p>
299 </xsd:documentation>
300 </annotation>
301 </attribute>
302 <attribute type="xsd:string" name="adminPass" use="optional">
303 <annotation>
304 <xsd:documentation
305 xml:lang="EN"
306 xmlns="http://www.w3.org/1999/xhtml">
307 <p>
308 The server's administration password.
309 </p>
310 </xsd:documentation>
311 </annotation>
312 </attribute>
313 <attribute type="xsd:anyURI" name="imageRef" use="optional">
314 <annotation>
315 <xsd:documentation
316 xml:lang="EN"
317 xmlns="http://www.w3.org/1999/xhtml">
318 <p>
319 A reference to an image used to create the server. The
320 refrence may be an image ID, or it may be a full path to
321 an image resource.
322 </p>
323 </xsd:documentation>
324 </annotation>
325 </attribute>
326 <attribute type="xsd:anyURI" name="flavorRef" use="optional">
327 <annotation>
328 <xsd:documentation
329 xml:lang="EN"
330 xmlns="http://www.w3.org/1999/xhtml">
331 <p>
332 The current server flavor.
333 </p>
334 </xsd:documentation>
335 </annotation>
336 </attribute>
337 <attribute type="xsd:string" name="hostId" use="optional">
338 <annotation>
339 <xsd:documentation
340 xml:lang="EN"
341 xmlns="http://www.w3.org/1999/xhtml">
342 <p>
343 A unique ID that identifies the physical host that the VM
344 is running on. This ID is unique <strong>per
345 account</strong> and not globally unique.
346 </p>
347 </xsd:documentation>
348 </annotation>
349 </attribute>
350 <attribute type="csapi:Progress" name="progress" use="optional">
351 <annotation>
352 <xsd:documentation
353 xml:lang="EN"
354 xmlns="http://www.w3.org/1999/xhtml">
355 <p>
356 The progress of the current server operation.
357 </p>
358 </xsd:documentation>
359 </annotation>
360 </attribute>
361 <attribute type="csapi:ServerStatus" name="status" use="optional">
362 <annotation>
363 <xsd:documentation
364 xml:lang="EN"
365 xmlns="http://www.w3.org/1999/xhtml">
366 <p>
367 The current state (or <a href="#type_ServerStatus"
368 title="See definition of ServerStatus">status</a>) of the
369 server.
370 </p>
371 </xsd:documentation>
372 </annotation>
373 </attribute>
374 <attribute type="xsd:int" name="sharedIpGroupId" use="optional">
375 <annotation>
376 <xsd:documentation
377 xml:lang="EN"
378 xmlns="http://www.w3.org/1999/xhtml">
379 <p>
380 An ID of the <a href="ipgroup.xsd#type_SharedIpGroup"
381 title="See definition of SharedIPGroup">shared IP
382 group</a> that the server belongs to.
383 </p>
384 </xsd:documentation>
385 </annotation>
386 </attribute>
387 <attribute type="xsd:string" name="affinityId" use="optional">
388 <annotation>
389 <xsd:documentation
390 xml:lang="EN"
391 xmlns="http://www.w3.org/1999/xhtml">
392 <p>
393 Servers with the same affinity ID are located in the
394 same low level zone. The affinity ID is an identifier
395 for a lowest level zone that will allow customers to
396 specify placement of VM. This can be used for a varity
397 of things including IPv6 sharing.
398 </p>
399 </xsd:documentation>
400 </annotation>
401 </attribute>
402 <attribute type="xsd:dateTime" name="updated" use="optional">
403 <annotation>
404 <xsd:documentation
405 xml:lang="EN"
406 xmlns="http://www.w3.org/1999/xhtml">
407 <p>
408 The time the server was updated.
409 </p>
410 </xsd:documentation>
411 </annotation>
412 </attribute>
413 <attribute type="xsd:dateTime" name="created" use="optional">
414 <annotation>
415 <xsd:documentation
416 xml:lang="EN"
417 xmlns="http://www.w3.org/1999/xhtml">
418 <p>
419 The time the server was created.
420 </p>
421 </xsd:documentation>
422 </annotation>
423 </attribute>
424 <anyAttribute namespace="##other" processContents="lax"/>
425 </complexType>
426
427 <complexType name="Servers">
428 <sequence>
429 <element name="server" type="csapi:Server" minOccurs="0" maxOccurs="1000">
430 <annotation>
431 <xsd:documentation
432 xml:lang="EN"
433 xmlns="http://www.w3.org/1999/xhtml">
434 <p>
435 A collection of servers.
436 </p>
437 </xsd:documentation>
438 </annotation>
439 </element>
440 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
441 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
442 </sequence>
443 <anyAttribute namespace="##other" processContents="lax"/>
444 </complexType>
445
446 <complexType name="Personality">
447 <annotation>
448 <xsd:documentation
449 xml:lang="EN"
450 xmlns="http://www.w3.org/1999/xhtml">
451 A collection of small <a href="#type_File" title="See
452 definition of file">files</a> used to personalize a server
453 instance.
454 </xsd:documentation>
455 </annotation>
456 <sequence>
457 <element name="file" type="csapi:File" minOccurs="0" maxOccurs="5">
458 <annotation>
459 <xsd:documentation
460 xml:lang="EN"
461 xmlns="http://www.w3.org/1999/xhtml">
462 <p>
463 A collection of files.
464 </p>
465 </xsd:documentation>
466 </annotation>
467 </element>
468 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
469 </sequence>
470 <anyAttribute namespace="##other" processContents="lax"/>
471 </complexType>
472
473 <complexType name="File">
474 <annotation>
475 <xsd:documentation
476 xml:lang="EN"
477 xmlns="http://www.w3.org/1999/xhtml">
478 <p>
479 A file is simply a full path along with base64 file
480 content. The name of the file is specified in the path
481 attribute and the <a href="#type_FileContent" title="See
482 definition of FileContent">file content</a> is included
483 inline.
484 </p>
485 <xsdxt:code type="application/xml">
486 <![CDATA[
487 <file xmlns="http://docs.openstack.org/compute/api/v1.0"
488 path="/etc/banner.txt">
489 ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2gg
490 YSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4u
491 LnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNv
492 bnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3cs
493 IHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhv
494 cml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
495 </file>
496 ]]>
497 </xsdxt:code>
498 </xsd:documentation>
499 </annotation>
500 <simpleContent>
501 <extension base="csapi:FileContent">
502 <attribute name="path" type="csapi:FileName" use="required">
503 <annotation>
504 <xsd:documentation
505 xml:lang="EN"
506 xmlns="http://www.w3.org/1999/xhtml">
507 <p>
508 Full file path.
509 </p>
510 </xsd:documentation>
511 </annotation>
512 </attribute>
513 <anyAttribute namespace="##other" processContents="lax"/>
514 </extension>
515 </simpleContent>
516 </complexType>
517
518 <complexType name="Addresses">
519 <sequence>
520 <element name="network" type="csapi:AddressList" minOccurs="0" maxOccurs="1000"/>
521 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
522 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
523 </sequence>
524 <anyAttribute namespace="##other" processContents="lax"/>
525 </complexType>
526
527 <complexType name="AddressList">
528 <sequence>
529 <element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="1000">
530 <annotation>
531 <xsd:documentation
532 xml:lang="EN"
533 xmlns="http://www.w3.org/1999/xhtml">
534 <p>
535 A collection of addresses.
536 </p>
537 </xsd:documentation>
538 </annotation>
539 </element>
540 <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
541 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
542 </sequence>
543 <attribute type="xsd:string" name="id" use="optional">
544 <annotation>
545 <xsd:documentation
546 xml:lang="EN"
547 xmlns="http://www.w3.org/1999/xhtml">
548 <p>
549 A id of an address list. This is typically a name
550 used to identify a network.
551 </p>
552 </xsd:documentation>
553 </annotation>
554 </attribute>
555 <anyAttribute namespace="##other" processContents="lax"/>
556 </complexType>
557
558 <complexType name="Address">
559 <sequence>
560 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
561 </sequence>
562 <attribute name="addr" type="xsd:string" use="required">
563 <annotation>
564 <xsd:documentation
565 xml:lang="EN"
566 xmlns="http://www.w3.org/1999/xhtml">
567 <p>
568 An IP address.
569 </p>
570 </xsd:documentation>
571 </annotation>
572 </attribute>
573 <attribute name="version" type="csapi:AddressVersion" use="optional">
574 <annotation>
575 <xsd:documentation
576 xml:lang="EN"
577 xmlns="http://www.w3.org/1999/xhtml">
578 <p>
579 The IP Address version can be 4 or 6. The version
580 attribute is optional if it is left off, the type of
581 address will be determined by from its address
582 format. If it is specified it <strong>should</strong>
583 match the address format.
584 </p>
585 <p>
586 The OpenStack compute API will always fill in the
587 version number as a convinence to the client.
588 </p>
589 </xsd:documentation>
590 </annotation>
591 </attribute>
592 <anyAttribute namespace="##other" processContents="lax"/>
593 </complexType>
594
595 <complexType name="ShareIp">
596 <annotation>
597 <xsd:documentation
598 xml:lang="EN"
599 xmlns="http://www.w3.org/1999/xhtml">
600 <p>
601 This type is used to represent a request to share an IP
602 address.
603 </p>
604 </xsd:documentation>
605 </annotation>
606 <sequence>
607 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
608 </sequence>
609 <attribute name="sharedIpGroupId" type="xsd:int" use="required">
610 <annotation>
611 <xsd:documentation
612 xml:lang="EN"
613 xmlns="http://www.w3.org/1999/xhtml">
614 <p>
615 The <a href="ipgroup.xsd#type_SharedIpGroup" title="See
616 definition of SharedIPGroup">shared IP group</a> use to
617 share the address.
618 </p>
619 </xsd:documentation>
620 </annotation>
621 </attribute>
622 <attribute name="configureServer" type="xsd:boolean" default="false">
623 <annotation>
624 <xsd:documentation
625 xml:lang="EN"
626 xmlns="http://www.w3.org/1999/xhtml">
627 <p>
628 If true, the server is configured with the new address
629 though the address may not be enabled.
630 </p>
631 </xsd:documentation>
632 </annotation>
633 </attribute>
634 <anyAttribute namespace="##other" processContents="lax"/>
635 </complexType>
636
637 <complexType name="AddIp">
638 <annotation>
639 <xsd:documentation
640 xml:lang="EN"
641 xmlns="http://www.w3.org/1999/xhtml">
642 <p>
643 This type is used to represent a request to add an IP
644 address.
645 </p>
646 </xsd:documentation>
647 </annotation>
648 <sequence>
649 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
650 </sequence>
651 <attribute name="configureServer" type="xsd:boolean" default="false">
652 <annotation>
653 <xsd:documentation
654 xml:lang="EN"
655 xmlns="http://www.w3.org/1999/xhtml">
656 <p>
657 If true, the server is added and configured with the new address
658 though the address may not be enabled.
659 </p>
660 </xsd:documentation>
661 </annotation>
662 </attribute>
663 <anyAttribute namespace="##other" processContents="lax"/>
664 </complexType>
665
666
667 <!-- Simple Types -->
668 <simpleType name="ServerStatus">
669 <restriction base="xsd:string">
670 <enumeration value="ACTIVE">
671 <annotation>
672 <xsd:documentation
673 xml:lang="EN"
674 xmlns="http://www.w3.org/1999/xhtml">
675 <p>
676 The server is ready to use.
677 </p>
678 </xsd:documentation>
679 </annotation>
680 </enumeration>
681 <enumeration value="SUSPENDED">
682 <annotation>
683 <xsd:documentation
684 xml:lang="EN"
685 xmlns="http://www.w3.org/1999/xhtml">
686 <p>
687 The server is in an inactive (suspended) state.
688 </p>
689 </xsd:documentation>
690 </annotation>
691 </enumeration>
692 <enumeration value="DELETED">
693 <annotation>
694 <xsd:documentation
695 xml:lang="EN"
696 xmlns="http://www.w3.org/1999/xhtml">
697 <p>
698 The server has been deleted.
699 </p>
700 </xsd:documentation>
701 </annotation>
702 </enumeration>
703 <enumeration value="QUEUE_RESIZE">
704 <annotation>
705 <xsd:documentation
706 xml:lang="EN"
707 xmlns="http://www.w3.org/1999/xhtml">
708 <p>
709 A request to perform a <a
710 href="actions.xsd#element_resize" title="See definition
711 of resize">resize action</a> has been received. The
712 operation is pending.
713 </p>
714 </xsd:documentation>
715 </annotation>
716 </enumeration>
717 <enumeration value="PREP_RESIZE">
718 <annotation>
719 <xsd:documentation
720 xml:lang="EN"
721 xmlns="http://www.w3.org/1999/xhtml">
722 <p>
723 The server is being prepared to perform the resize
724 operation.
725 </p>
726 </xsd:documentation>
727 </annotation>
728 </enumeration>
729 <enumeration value="RESIZE">
730 <annotation>
731 <xsd:documentation
732 xml:lang="EN"
733 xmlns="http://www.w3.org/1999/xhtml">
734 <p>
735 The server is being resized.
736 </p>
737 </xsd:documentation>
738 </annotation>
739 </enumeration>
740 <enumeration value="VERIFY_RESIZE">
741 <annotation>
742 <xsd:documentation
743 xml:lang="EN"
744 xmlns="http://www.w3.org/1999/xhtml">
745 <p>
746 The server is waiting for the resize operation to be
747 confirmed so that the original server may be removed.
748 </p>
749 </xsd:documentation>
750 </annotation>
751 </enumeration>
752 <enumeration value="RESCUE">
753 <annotation>
754 <xsd:documentation
755 xml:lang="EN"
756 xmlns="http://www.w3.org/1999/xhtml">
757 <p>
758 The server is in rescue mode.
759 </p>
760 </xsd:documentation>
761 </annotation>
762 </enumeration>
763 <enumeration value="ERROR">
764 <annotation>
765 <xsd:documentation
766 xml:lang="EN"
767 xmlns="http://www.w3.org/1999/xhtml">
768 <p>
769 The requested operation failed, the server is in an
770 error state.
771 </p>
772 </xsd:documentation>
773 </annotation>
774 </enumeration>
775 <enumeration value="BUILD">
776 <annotation>
777 <xsd:documentation
778 xml:lang="EN"
779 xmlns="http://www.w3.org/1999/xhtml">
780 <p>
781 The server is being built.
782 </p>
783 </xsd:documentation>
784 </annotation>
785 </enumeration>
786 <enumeration value="RESTORING">
787 <annotation>
788 <xsd:documentation
789 xml:lang="EN"
790 xmlns="http://www.w3.org/1999/xhtml">
791 <p>
792 The server is being restored.
793 </p>
794 </xsd:documentation>
795 </annotation>
796 </enumeration>
797 <enumeration value="PASSWORD">
798 <annotation>
799 <xsd:documentation
800 xml:lang="EN"
801 xmlns="http://www.w3.org/1999/xhtml">
802 <p>
803 The server password is being changed.
804 </p>
805 </xsd:documentation>
806 </annotation>
807 </enumeration>
808 <enumeration value="REBUILD">
809 <annotation>
810 <xsd:documentation
811 xml:lang="EN"
812 xmlns="http://www.w3.org/1999/xhtml">
813 <p>
814 The server is being rebuilt.
815 </p>
816 </xsd:documentation>
817 </annotation>
818 </enumeration>
819 <enumeration value="DELETE_IP">
820 <annotation>
821 <xsd:documentation
822 xml:lang="EN"
823 xmlns="http://www.w3.org/1999/xhtml">
824 <p>
825 A shared IP address is being removed.
826 </p>
827 </xsd:documentation>
828 </annotation>
829 </enumeration>
830 <enumeration value="SHARE_IP_NO_CONFIG">
831 <annotation>
832 <xsd:documentation
833 xml:lang="EN"
834 xmlns="http://www.w3.org/1999/xhtml">
835 <p>
836 An IP address is being shared, but not configured.
837 </p>
838 </xsd:documentation>
839 </annotation>
840 </enumeration>
841 <enumeration value="SHARE_IP">
842 <annotation>
843 <xsd:documentation
844 xml:lang="EN"
845 xmlns="http://www.w3.org/1999/xhtml">
846 <p>
847 An IP address is being shared, and the server is being
848 configured with the new address.
849 </p>
850 </xsd:documentation>
851 </annotation>
852 </enumeration>
853 <enumeration value="ADD_IP_NO_CONFIG">
854 <annotation>
855 <xsd:documentation
856 xml:lang="EN"
857 xmlns="http://www.w3.org/1999/xhtml">
858 <p>
859 An IP address is being added, but not configured.
860 </p>
861 </xsd:documentation>
862 </annotation>
863 </enumeration>
864 <enumeration value="ADD_IP">
865 <annotation>
866 <xsd:documentation
867 xml:lang="EN"
868 xmlns="http://www.w3.org/1999/xhtml">
869 <p>
870 An IP address is being added, and the server is being
871 configured with the new address.
872 </p>
873 </xsd:documentation>
874 </annotation>
875 </enumeration>
876
877 <enumeration value="REBOOT">
878 <annotation>
879 <xsd:documentation
880 xml:lang="EN"
881 xmlns="http://www.w3.org/1999/xhtml">
882 <p>
883 The server is going through a <a
884 href="actions.xsd#type_RebootType" title="See definition
885 of RebootType">SOFT</a> reboot.
886 </p>
887 </xsd:documentation>
888 </annotation>
889 </enumeration>
890 <enumeration value="HARD_REBOOT">
891 <annotation>
892 <xsd:documentation
893 xml:lang="EN"
894 xmlns="http://www.w3.org/1999/xhtml">
895 <p>
896 The server is going through a <a
897 href="actions.xsd#type_RebootType" title="See definition
898 of RebootType">HARD</a> reboot.
899 </p>
900 </xsd:documentation>
901 </annotation>
902 </enumeration>
903 <enumeration value="UNKNOWN">
904 <annotation>
905 <xsd:documentation
906 xml:lang="EN"
907 xmlns="http://www.w3.org/1999/xhtml">
908 <p>
909 The server is in an unknown state.
910 </p>
911 </xsd:documentation>
912 </annotation>
913 </enumeration>
914 <enumeration value="QUEUE_MOVE">
915 <annotation>
916 <xsd:documentation
917 xml:lang="EN"
918 xmlns="http://www.w3.org/1999/xhtml">
919 <p>
920 Reserved for future use.
921 </p>
922 </xsd:documentation>
923 </annotation>
924 </enumeration>
925 <enumeration value="PREP_MOVE">
926 <annotation>
927 <xsd:documentation
928 xml:lang="EN"
929 xmlns="http://www.w3.org/1999/xhtml">
930 <p>
931 Reserved for future use.
932 </p>
933 </xsd:documentation>
934 </annotation>
935 </enumeration>
936 <enumeration value="MOVE">
937 <annotation>
938 <xsd:documentation
939 xml:lang="EN"
940 xmlns="http://www.w3.org/1999/xhtml">
941 <p>
942 Reserved for future use.
943 </p>
944 </xsd:documentation>
945 </annotation>
946 </enumeration>
947 <enumeration value="VERIFY_MOVE">
948 <annotation>
949 <xsd:documentation
950 xml:lang="EN"
951 xmlns="http://www.w3.org/1999/xhtml">
952 <p>
953 Reserved for future use.
954 </p>
955 </xsd:documentation>
956 </annotation>
957 </enumeration>
958 <enumeration value="PENDING">
959 <annotation>
960 <xsd:documentation
961 xml:lang="EN"
962 xmlns="http://www.w3.org/1999/xhtml">
963 <p>
964 Reserved for future use.
965 </p>
966 </xsd:documentation>
967 </annotation>
968 </enumeration>
969 </restriction>
970 </simpleType>
971
972 <simpleType name="FileName">
973 <restriction base="xsd:string">
974 <maxLength value="255" />
975 </restriction>
976 </simpleType>
977
978 <simpleType name="FileContent">
979 <restriction base="xsd:base64Binary">
980 <maxLength value="10240" />
981 </restriction>
982 </simpleType>
983
984 <simpleType name="AddressVersion">
985 <restriction base="xsd:int">
986 <enumeration value="4">
987 <annotation>
988 <xsd:documentation
989 xml:lang="EN"
990 xmlns="http://www.w3.org/1999/xhtml">
991 <p>
992 Denotes IPv4.
993 </p>
994 </xsd:documentation>
995 </annotation>
996 </enumeration>
997 <enumeration value="6">
998 <annotation>
999 <xsd:documentation
1000 xml:lang="EN"
1001 xmlns="http://www.w3.org/1999/xhtml">
1002 <p>
1003 Denotes IPv6.
1004 </p>
1005 </xsd:documentation>
1006 </annotation>
1007 </enumeration>
1008 </restriction>
1009 </simpleType>
1010</schema>
01011
=== added file 'nova/api/openstack/schemas/v1.1/version.xsd'
--- nova/api/openstack/schemas/v1.1/version.xsd 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/schemas/v1.1/version.xsd 2011-04-07 17:22:59 +0000
@@ -0,0 +1,200 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
4 targetNamespace="http://docs.openstack.org/common/api/v1.0"
5 xmlns:vers="http://docs.openstack.org/common/api/v1.0"
6 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:atom="http://www.w3.org/2005/Atom"
9 xmlns:xs="http://www.w3.org/2001/XMLSchema">
10
11 <!-- Import ATOM specific schema definitions -->
12 <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="./atom/atom.xsd" />
13
14 <!-- Multiple choices -->
15 <xs:element name="choices" type="vers:VersionChoiceList" />
16
17 <!-- Versioning -->
18 <xs:element name="versions" type="vers:VersionChoiceList" />
19 <xs:element name="version" type="vers:VersionChoice" vc:minVersion="1.0" vc:maxVersion="1.1"/>
20 <xs:element name="version" type="vers:VersionChoiceRoot" vc:minVersion="1.1"/>
21
22 <!-- Types -->
23 <xs:simpleType name="VersionStatus">
24 <xs:annotation>
25 <xs:documentation>
26 <html:p>
27 The VersionStatus type describes a service's operational status.
28 </html:p>
29 </xs:documentation>
30 </xs:annotation>
31
32 <xs:restriction base="xs:string">
33 <xs:enumeration value="DEPRECATED" />
34 <xs:enumeration value="ALPHA" />
35 <xs:enumeration value="BETA" />
36 <xs:enumeration value="CURRENT" />
37 </xs:restriction>
38 </xs:simpleType>
39
40 <xs:complexType name="VersionChoiceList">
41 <xs:annotation>
42 <xs:documentation>
43 <html:p>
44 A version choice list outlines a collection of service version choices.
45 </html:p>
46 </xs:documentation>
47 </xs:annotation>
48
49 <xs:sequence>
50 <xs:element name="version" type="vers:VersionChoice" minOccurs="1" maxOccurs="unbounded" />
51 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
52 </xs:sequence>
53 <xs:anyAttribute namespace="##other" processContents="lax"/>
54 <xs:assert vc:minVersion="1.1" test="every $v in vers:version satisfies $v/atom:link[@rel='self']">
55 <xs:annotation>
56 <xs:documentation>
57 <html:p>
58 In version lists, every single version must
59 contain at least one self link.
60 </html:p>
61 </xs:documentation>
62 </xs:annotation>
63 </xs:assert>
64 </xs:complexType>
65
66 <xs:complexType name="VersionChoiceRoot" vc:minVersion="1.1">
67 <xs:complexContent>
68 <xs:extension base="vers:VersionChoice">
69 <xs:assert test="atom:link[@rel='describedby']">
70 <xs:annotation>
71 <xs:documentation>
72 <html:p>
73 When used as a root element, a version choice
74 must contain at least one describedby link.
75 </html:p>
76 </xs:documentation>
77 </xs:annotation>
78 </xs:assert>
79 </xs:extension>
80 </xs:complexContent>
81 </xs:complexType>
82
83 <xs:complexType name="VersionChoice">
84 <xs:annotation>
85 <xs:documentation>
86 <html:p>
87 A version choice contains relevant information about an available service
88 that a user can then use to target a specific version of the service. Note
89 that both the descriptive media types and the atom link references are
90 not manditory and are offered as message enrichment elements rather
91 than message requirements.
92 </html:p>
93 </xs:documentation>
94 </xs:annotation>
95
96 <xs:sequence>
97 <xs:element name="media-types" type="vers:MediaTypeList" minOccurs="0" maxOccurs="1" />
98 <xs:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
99 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
100 </xs:sequence>
101
102 <xs:attribute name="id" type="xs:string" use="required">
103 <xs:annotation>
104 <xs:documentation>
105 <html:p>
106 The ID of a version choice represents the service version's unique
107 identifier. This ID is guaranteed to be unique only among the
108 service version choices outlined in the VersionChoiceList.
109 </html:p>
110 </xs:documentation>
111 </xs:annotation>
112 </xs:attribute>
113
114 <xs:attribute name="status" type="vers:VersionStatus" use="required">
115 <xs:annotation>
116 <xs:documentation>
117 <html:p>
118 A version choice's status describes the current operational state of
119 the given service version. The operational status is captured in a
120 simple type enumeration called VersionStatus.
121 </html:p>
122 </xs:documentation>
123 </xs:annotation>
124 </xs:attribute>
125
126 <xs:attribute name="updated" type="xs:dateTime" use="optional">
127 <xs:annotation>
128 <xs:documentation>
129 <html:p>
130 A version choice's updated attribute describes
131 the time when the version was updated. The
132 time should be updated anytime
133 <html:strong>anything</html:strong> in the
134 version has changed: documentation,
135 extensions, bug fixes.
136 </html:p>
137 </xs:documentation>
138 </xs:annotation>
139 </xs:attribute>
140 <xs:anyAttribute namespace="##other" processContents="lax"/>
141 </xs:complexType>
142
143 <xs:complexType name="MediaTypeList">
144 <xs:annotation>
145 <xs:documentation>
146 <html:p>
147 A MediaTypeList outlines a collection of valid media types for a given
148 service version.
149 </html:p>
150 </xs:documentation>
151 </xs:annotation>
152
153 <xs:sequence>
154 <xs:element name="media-type" type="vers:MediaType" minOccurs="1" maxOccurs="unbounded" />
155 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
156 </xs:sequence>
157 <xs:anyAttribute namespace="##other" processContents="lax"/>
158 </xs:complexType>
159
160 <xs:complexType name="MediaType">
161 <xs:annotation>
162 <xs:documentation>
163 <html:p>
164 A MediaType describes what content types the service version understands.
165 </html:p>
166 </xs:documentation>
167 </xs:annotation>
168 <xs:sequence>
169 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
170 </xs:sequence>
171 <xs:attribute name="base" type="xs:string" use="optional" default="">
172 <xs:annotation>
173 <xs:documentation>
174 <html:p>
175 The base of a given media type describes the simple MIME type
176 that then a more complicated media type can be derived from. These
177 types are basic and provide no namespace or version specific
178 data are are only provided as a convenience. Because of this the
179 base attribute is declared as optional.
180 </html:p>
181 </xs:documentation>
182 </xs:annotation>
183 </xs:attribute>
184
185 <xs:attribute name="type" type="xs:string" use="required">
186 <xs:annotation>
187 <xs:documentation>
188 <html:p>
189 The type attribute of a MediaType describes the MIME specific
190 identifier of the media type in question. This identifier should include
191 a vendor namespace (
192 <html:a href="http://tools.ietf.org/html/rfc2048">See RFC 2048</html:a>)
193 as well as a version suffix.
194 </html:p>
195 </xs:documentation>
196 </xs:annotation>
197 </xs:attribute>
198 <xs:anyAttribute namespace="##other" processContents="lax"/>
199 </xs:complexType>
200</xs:schema>
0201
=== added file 'nova/api/openstack/validation.py'
--- nova/api/openstack/validation.py 1970-01-01 00:00:00 +0000
+++ nova/api/openstack/validation.py 2011-04-07 17:22:59 +0000
@@ -0,0 +1,85 @@
1# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
3# Copyright 2011 Justin Santa Barbara
4# All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.import datetime
17
18"""Perform validation of output against schemas."""
19
20from lxml import etree
21from StringIO import StringIO
22
23from nova import exception
24from nova import flags
25from nova import log as logging
26from nova.api.openstack import common
27
28
29LOG = logging.getLogger('nova.api.openstack')
30
31
32FLAGS = flags.FLAGS
33flags.DEFINE_bool('validate_xml',
34 True,
35 'Validate XML output?')
36flags.DEFINE_bool('validate_xml_for_json',
37 False,
38 'Always generate and validate XML output, even for JSON?')
39flags.DEFINE_bool('raise_error_on_validation_warnings',
40 False,
41 'Treat XML validation failures as errors?')
42
43
44class OutputValidator(object):
45 """Perform validation of output."""
46
47 def validate_output(self, content_type, output):
48 """Validate the output."""
49 if content_type == "application/xml":
50 is_valid = self._validate_xml(output)
51 if FLAGS.raise_error_on_validation_warnings and not is_valid:
52 raise exception.Error(_("XML output was not valid"))
53 elif content_type == "application/json":
54 pass
55 else:
56 LOG.warn(_("Unknown content type: %s") % content_type)
57
58 def always_validate_xml(self):
59 """Should we always generate and validate XML output?"""
60 return FLAGS.validate_xml_for_json
61
62 def _validate_xml(self, xml_text):
63 """Validate XML output."""
64 doc = etree.parse(StringIO(xml_text))
65
66 xmlns_prefix = doc.getroot().prefix
67 xmlns = doc.getroot().nsmap.get(xmlns_prefix, None)
68
69 if xmlns is None:
70 LOG.warning(_("No XML namespace for XML: %s") % xml_text)
71 return False
72
73 xmlschema = common.load_xml_schema(xmlns)
74 if not xmlschema:
75 LOG.warning(_("Unknown XML namespace: %s") % xmlns)
76 return False
77
78 try:
79 xmlschema.assertValid(doc)
80 except etree.DocumentInvalid as e:
81 LOG.warning(_("XML did not validate: %(e)s\nXML=%(xml_text)s") %
82 locals())
83 return False
84
85 return True
086
=== modified file 'nova/tests/fake_flags.py'
--- nova/tests/fake_flags.py 2011-03-04 02:36:55 +0000
+++ nova/tests/fake_flags.py 2011-04-07 17:22:59 +0000
@@ -42,3 +42,9 @@
42FLAGS.verbose = True42FLAGS.verbose = True
43FLAGS.sqlite_db = "tests.sqlite"43FLAGS.sqlite_db = "tests.sqlite"
44FLAGS.use_ipv6 = True44FLAGS.use_ipv6 = True
45flags.DECLARE('validate_xml_for_json', 'nova.api.openstack.validation')
46flags.DECLARE('raise_error_on_validation_warnings',
47 'nova.api.openstack.validation')
48# NOTE(justinsb): Commented out for now because it finds too many issues
49#FLAGS.validate_xml_for_json = True
50#FLAGS.raise_error_on_validation_warnings = True
4551
=== modified file 'nova/wsgi.py'
--- nova/wsgi.py 2011-04-06 21:02:16 +0000
+++ nova/wsgi.py 2011-04-07 17:22:59 +0000
@@ -356,7 +356,9 @@
356 if type(result) is dict:356 if type(result) is dict:
357 content_type = req.best_match_content_type()357 content_type = req.best_match_content_type()
358 default_xmlns = self.get_default_xmlns(req)358 default_xmlns = self.get_default_xmlns(req)
359 body = self._serialize(result, content_type, default_xmlns)359 validator = self.get_validator(req)
360 body = self._serialize(result, content_type, default_xmlns,
361 validator)
360362
361 response = webob.Response()363 response = webob.Response()
362 response.headers["Content-Type"] = content_type364 response.headers["Content-Type"] = content_type
@@ -365,7 +367,8 @@
365 else:367 else:
366 return result368 return result
367369
368 def _serialize(self, data, content_type, default_xmlns):370 def _serialize(self, data, content_type, default_xmlns=None,
371 validator=None):
369 """372 """
370 Serialize the given dict to the provided content_type.373 Serialize the given dict to the provided content_type.
371 Uses self._serialization_metadata if it exists, which is a dict mapping374 Uses self._serialization_metadata if it exists, which is a dict mapping
@@ -373,7 +376,7 @@
373 """376 """
374 _metadata = getattr(type(self), "_serialization_metadata", {})377 _metadata = getattr(type(self), "_serialization_metadata", {})
375378
376 serializer = Serializer(_metadata, default_xmlns)379 serializer = Serializer(_metadata, default_xmlns, validator)
377 try:380 try:
378 return serializer.serialize(data, content_type)381 return serializer.serialize(data, content_type)
379 except exception.InvalidContentType:382 except exception.InvalidContentType:
@@ -393,13 +396,17 @@
393 """Provide the XML namespace to use if none is otherwise specified."""396 """Provide the XML namespace to use if none is otherwise specified."""
394 return None397 return None
395398
399 def get_validator(self, req):
400 """Provide a validator object that checks output."""
401 return None
402
396403
397class Serializer(object):404class Serializer(object):
398 """405 """
399 Serializes and deserializes dictionaries to certain MIME types.406 Serializes and deserializes dictionaries to certain MIME types.
400 """407 """
401408
402 def __init__(self, metadata=None, default_xmlns=None):409 def __init__(self, metadata=None, default_xmlns=None, validator=None):
403 """410 """
404 Create a serializer based on the given WSGI environment.411 Create a serializer based on the given WSGI environment.
405 'metadata' is an optional dict mapping MIME types to information412 'metadata' is an optional dict mapping MIME types to information
@@ -407,6 +414,7 @@
407 """414 """
408 self.metadata = metadata or {}415 self.metadata = metadata or {}
409 self.default_xmlns = default_xmlns416 self.default_xmlns = default_xmlns
417 self.validator = validator
410418
411 def _get_serialize_handler(self, content_type):419 def _get_serialize_handler(self, content_type):
412 handlers = {420 handlers = {
@@ -423,7 +431,15 @@
423 """431 """
424 Serialize a dictionary into a string of the specified content type.432 Serialize a dictionary into a string of the specified content type.
425 """433 """
426 return self._get_serialize_handler(content_type)(data)434 output = self._get_serialize_handler(content_type)(data)
435 if self.validator:
436 self.validator.validate_output(content_type, output)
437 if self.validator.always_validate_xml():
438 if not content_type == "application/xml":
439 xml = self._get_serialize_handler("application/xml")(data)
440 self.validator.validate_output("application/xml", xml)
441
442 return output
427443
428 def deserialize(self, datastring, content_type):444 def deserialize(self, datastring, content_type):
429 """445 """
430446
=== modified file 'tools/pip-requires'
--- tools/pip-requires 2011-03-31 03:33:56 +0000
+++ tools/pip-requires 2011-04-07 17:22:59 +0000
@@ -32,3 +32,4 @@
32glance32glance
33nova-adminclient33nova-adminclient
34suds==0.434suds==0.4
35lxml