File: image.xsd

package info (click to toggle)
quantum 2012.1-5%2Bdeb70u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,028 kB
  • sloc: python: 19,594; xml: 2,611; sh: 485; makefile: 105
file content (443 lines) | stat: -rw-r--r-- 15,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?>

<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->

<schema
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    targetNamespace="http://docs.openstack.org/compute/api/v1.1"
>
  <annotation>
    <xsd:appinfo
        xml:lang="EN"
        xmlns="http://www.w3.org/1999/xhtml">
      <xsdxt:title>Images</xsdxt:title>
      <xsdxt:link rel="index" href="api.xsd" />
    </xsd:appinfo>
    <xsd:documentation
        xml:lang="EN"
        xmlns="http://www.w3.org/1999/xhtml">
      <p>
        This schema file defines all entity related to <a
        href="#type_Image" title="See definition of Image">Images</a>.
      </p>
    </xsd:documentation>
  </annotation>

  <!-- Import ATOM specific schema definitions -->
  <import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" />

  <include schemaLocation="common.xsd">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          Common types used by multiple entities and possibly spanning
          several types of requests.
        </p>
      </xsd:documentation>
    </annotation>
  </include>
  <include schemaLocation="server.xsd">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          Servers and all internal Entities including: Addresses,
          and Files.
        </p>
      </xsd:documentation>
    </annotation>
  </include>
  <include schemaLocation="faults.xsd">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          All fault types.
        </p>
      </xsd:documentation>
    </annotation>
  </include>

  <element name="image" type="csapi:Image">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          The element defines a collection of files used to create or
          rebuild a server.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/image.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/image.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>
  <element name="images" type="csapi:Images">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          A collection of images.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/images.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/images.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>

  <!-- Complex Types -->
  <complexType name="Image">
    <sequence>
        <element name="server" type="csapi:Server" minOccurs="0">
            <annotation>
                <xsd:documentation
                    xml:lang="EN"
                    xmlns="http://www.w3.org/1999/xhtml">
                    <p>
                        The server associated with the image. This may
                        not contain full server details but will
                        always contain an ID, a name, as well as self
                        and bookmark links.
                    </p>
                </xsd:documentation>
            </annotation>
        </element>
        <element name="metadata" type="csapi:Metadata" minOccurs="0">
            <annotation>
                <xsd:documentation
                    xml:lang="EN"
                    xmlns="http://www.w3.org/1999/xhtml">
                    <p>
                        A collection of meta data items associated with the image.
                    </p>
                </xsd:documentation>
            </annotation>
        </element>
        <element name="fault" type="csapi:AsyncAPIFault" minOccurs="0">
            <annotation>
                <xsd:documentation
                    xml:lang="EN"
                    xmlns="http://www.w3.org/1999/xhtml">
                    <p>
                        The details of a fault that may have occurred
                        while creating an image.
                    </p>
                </xsd:documentation>
            </annotation>
        </element>
        <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
        <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <attribute type="csapi:UUID" name="id" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The ID of the image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string"      name="name"      use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The name of the image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string"  name="tenantId" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A unique ID that identifies the tenant that contains
            the image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string"    name="userId" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A unique ID that identifies the user who created
            the image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:dateTime"    name="updated" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A time-stamp identifying the modification time of the
            image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:dateTime"    name="created" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A creation time-stamp for the image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="csapi:Progress"  name="progress"  use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The progress of the current image operation.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="csapi:ExtensibleImageStatus" name="status"    use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The current state (or <a href="#type_ExtensibleImageStatus"
            title="See definition of ExtensibleImageStatus">status</a>) of the
            image.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:int"    name="minDisk" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
              Minimum disk space required for the image in gigabytes.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:int"    name="minRam"  use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The minimum amount of RAM required for the image in
            megabytes.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>

  <complexType name="ImageWithOnlyIDNameLinks">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  The only allowed attribute for this Image type is
                  the name, ID, and links.  This is used for
                  non-detailed list of images.
              </p>
          </xsd:documentation>
      </annotation>
      <complexContent>
          <restriction base="csapi:Image">
              <sequence>
                  <element ref="atom:link" minOccurs="1" maxOccurs="unbounded" />
                  <any vc:minVersion="1.1" namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
              </sequence>
              <attribute type="csapi:UUID" name="id"   use="required"/>
              <attribute type="xsd:string" name="name" use="required"/>
              <attribute type="xsd:dateTime" name="updated" use="prohibited"/>
              <attribute type="xsd:dateTime" name="created" use="prohibited"/>
              <attribute type="csapi:Progress" name="progress" use="prohibited"/>
              <attribute type="csapi:ExtensibleImageStatus" name="status" use="prohibited"/>
              <anyAttribute namespace="##other" processContents="lax"/>
              <assert vc:minVersion="1.1" test="atom:link[@rel='self']/@href and atom:link[@rel='bookmark']/@href">
                  <annotation>
                      <xsd:documentation
                          xml:lang="EN"
                          xmlns="http://www.w3.org/1999/xhtml">
                          <p>
                              Here the image <strong>MUST</strong>
                              contain a name, an ID, a bookmark link,
                              and a self link.
                          </p>
                      </xsd:documentation>
                  </annotation>
              </assert>
          </restriction>
      </complexContent>
  </complexType>

  <complexType name="Images">
    <sequence>
      <element name="image" type="csapi:Image" minOccurs="0" maxOccurs="1000">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A collection of images (all details).
          </p>
        </xsd:documentation>
      </annotation>
      </element>
      <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>

  <complexType name="ImagesWithOnlyIDsNamesLinks">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  A collection of images with only IDs, names, and
                  links. This is used for the non-detailed list of
                  images.
              </p>
          </xsd:documentation>
      </annotation>
      <complexContent>
          <restriction base="csapi:Images">
              <sequence>
                  <element name="image" type="csapi:ImageWithOnlyIDNameLinks" minOccurs="0" maxOccurs="1000"/>
                  <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
                  <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
              </sequence>
              <anyAttribute namespace="##other" processContents="lax"/>
          </restriction>
      </complexContent>
  </complexType>

  <!-- Simple Types -->
  <simpleType name="ExtensibleImageStatus">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  An extensible image status type allows all of the
                  strings defined in <a href="#type_ImageStatus"
                  title="See definition of
                  ImageStatus">ImageStatus</a> or an
                  alias prefixed status.
              </p>
          </xsd:documentation>
      </annotation>
      <union memberTypes="csapi:ImageStatus csapi:ExtendedStatus"/>
  </simpleType>

  <simpleType name="ImageStatus">
    <restriction base="xsd:string">
      <enumeration value="UNKNOWN">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The image is in an unknown state.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="ACTIVE">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              All operations have completed successfully, the image is
              available for install.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="SAVING">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The image is being created (or saved).
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="DELETED">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The image has been deleted.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="ERROR">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The requested operation has failed.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>
</schema>