File: server.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 (1013 lines) | stat: -rw-r--r-- 36,045 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
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
<?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>Servers and Related Types</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 a <a href="#type_Server"
        title="Server Type Definition"> Server</a> and all internal
        entities related to servers including <a
        href="#type_Addresses" title="Addresses type
        definition">Addresses</a> and <a href="#type_File" title="File
        type definition">Files</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="image.xsd">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          Types related to images.
        </p>
      </xsd:documentation>
    </annotation>
  </include>
  <include schemaLocation="flavor.xsd">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          Types related to flavors.
        </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="server" type="csapi:Server">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          The element defines a server.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/server.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/server.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>

  <element name="servers" type="csapi:Servers">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          A collection of servers.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/servers.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/servers.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>

  <element name="addresses" type="csapi:Addresses">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          The element defines list of addresses by network: (public,
          private, ...).
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/addresses.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/addresses.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>
  
  <element name="network" type="csapi:AddressList">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
            The element defines a list of addresses in a network.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/public.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/public.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>

   <element name="ip" type="csapi:Address">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          The element defines an individual IP address.
        </p>
      </xsd:documentation>
      <xsd:appinfo>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/address.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/address.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:appinfo>
    </annotation>
  </element>
  

  <!-- Complex Types -->
  <complexType name="Server">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          A server is a virtual machine instance in the Cloud Servers
          system.  Note that this complex type defines all elements
          and attributes as optional because a server instance may
          take many different forms depending on the operation.  When
          creating a server, for example, the name, imageRef, and
          flavorRef attributes are required.  In addition, optional
          metadata and personality file elements may be specified:
        </p>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/server-post-req.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/server-post-req.json" />
          </xsdxt:sample>
        </xsdxt:samples>
        <p>
          The response to such a crate operation will include the
          administration password, host ID, and addresses associated
          with the server:
        </p>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/server-post-resp.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/server-post-resp.json" />
          </xsdxt:sample>
        </xsdxt:samples>
        <p>
          When modifying a server only the name and administration
          password should be specified as these are the only
          attributes that are modifiable.
        </p>
        <xsdxt:samples>
          <xsdxt:sample>
            <xsdxt:code type="application/xml" href="../samples/server-put-req.xml" />
          </xsdxt:sample>
          <xsdxt:sample>
            <xsdxt:code type="application/json" href="../samples/server-put-req.json" />
          </xsdxt:sample>
        </xsdxt:samples>
      </xsd:documentation>
    </annotation>
    <sequence>
      <element name="image" type="csapi:Image" minOccurs="0">
          <annotation>
              <xsd:documentation
                  xml:lang="EN"
                  xmlns="http://www.w3.org/1999/xhtml">
                  <p>
                      A reference to an image used to create the
                      server. External images must contian a link that
                      provides the full path to the image resource.
                  </p>
              </xsd:documentation>
          </annotation>
      </element>
      <element name="flavor" type="csapi:Flavor" minOccurs="0">
          <annotation>
              <xsd:documentation
                  xml:lang="EN"
                  xmlns="http://www.w3.org/1999/xhtml">
                  <p>
                      The current server flavor. This may not contais
                      all flavor detials 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 server.
            </p>
          </xsd:documentation>
        </annotation>
      </element>
      <element ref="csapi:addresses" minOccurs="0">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A server's public and private address.
            </p>
          </xsd:documentation>
        </annotation>
      </element>
      <element name="personality" type="csapi:Personality" minOccurs="0">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A collection of small <a href="#type_File" title="See
              definition of file">files</a> used to personalize a new
              server instance.
            </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 detials of a fault that may have occured
                      while cerating the server or performing a server
                      action.
                  </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="xsd:string" name="name" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The name of the server.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:anyURI" name="imageRef" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
              A reference to an image.  This is used exclusevely when
              creating a server. Using an image ID here indicates that
              the image is locally hosted.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:anyURI" name="flavorRef" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
              A reference to a flavor.  This is used exclusevely when
              creating a server. Using a flavorRef here indicates that
              the flavor is locally hosted.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string" name="accessIPv4" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
              The IPv4 primary IP.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string" name="accessIPv6" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
              The IPv6 primary IP.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>    <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 server.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string" name="adminPass" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            The server's administration password.
          </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 server.
          </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 server.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="xsd:string"    name="hostId" use="optional">
      <annotation>
        <xsd:documentation
            xml:lang="EN"
            xmlns="http://www.w3.org/1999/xhtml">
          <p>
            A unique ID that identifies the physical host that the VM
            is running on. This ID is unique <strong>per
            account</strong> and not globally unique.
          </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 server operation.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <attribute type="csapi:ExtensibleServerStatus" 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_ExtensibleServerStatus"
            title="See definition of ExtensibleServerStatus">status</a>) of the
            server.
          </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>
              The time the server was updated.
          </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>
              The time the server was created.
          </p>
        </xsd:documentation>
      </annotation>
    </attribute>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>

  <complexType name="ServerWithOnlyIDNameLinks">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  The only allowed attribute for this Server type is
                  the name, ID, and links. This type is used for
                  non-detailed server lists.
              </p>
          </xsd:documentation>
      </annotation>
      <complexContent>
          <restriction base="csapi:Server">
              <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="xsd:string" name="name" use="required"/>
              <attribute type="csapi:UUID" name="id"   use="required"/>
              <attribute type="xsd:string" name="accessIPv4" use="prohibited"/>
              <attribute type="xsd:string" name="accessIPv6" use="prohibited" />
              <attribute type="xsd:string" name="adminPass" use="prohibited"/>
              <attribute type="xsd:string" name="tenantId" use="prohibited"/>
              <attribute type="xsd:string" name="userId" use="prohibited"/>
              <attribute type="xsd:string" name="hostId" use="prohibited"/>
              <attribute type="csapi:Progress" name="progress"  use="prohibited"/>
              <attribute type="csapi:ExtensibleServerStatus" name="status" use="prohibited"/>
              <attribute type="xsd:dateTime" name="updated" use="prohibited"/>
              <attribute type="xsd:dateTime" name="created" 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 server <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="ServerForCreate">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  When creating a server the server must contain a
                  name and a reference to an image and flavor.
              </p>
          </xsd:documentation>
      </annotation>
      <complexContent>
          <restriction base="csapi:Server">
              <sequence>
                  <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 server.
                              </p>
                          </xsd:documentation>
                      </annotation>
                  </element>
                  <element name="personality" type="csapi:Personality" minOccurs="0">
                      <annotation>
                          <xsd:documentation
                              xml:lang="EN"
                              xmlns="http://www.w3.org/1999/xhtml">
                              <p>
                                  A collection of small <a href="#type_File" title="See
                                  definition of file">files</a> used to personalize a new
                                  server instance.
                              </p>
                          </xsd:documentation>
                      </annotation>
                  </element>
                  <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
              </sequence>
              <attribute type="xsd:string" name="name" use="required"/>
              <attribute type="xsd:anyURI" name="imageRef" use="required"/>
              <attribute type="xsd:anyURI" name="flavorRef" use="required"/>
              <attribute type="xsd:string" name="accessIPv4" use="optional"/>
              <attribute type="xsd:string" name="accessIPv6" use="optional" />
              <attribute type="xsd:string" name="adminPass" use="optional"/>
              <attribute type="csapi:UUID" name="id"   use="prohibited"/>
              <attribute type="xsd:string" name="tenantId" use="prohibited"/>
              <attribute type="xsd:string" name="userId" use="prohibited"/>
              <attribute type="xsd:string" name="hostId" use="prohibited"/>
              <attribute type="csapi:Progress" name="progress"  use="prohibited"/>
              <attribute type="csapi:ExtensibleServerStatus" name="status" use="prohibited"/>
              <attribute type="xsd:dateTime" name="updated" use="prohibited"/>
              <attribute type="xsd:dateTime" name="created" use="prohibited"/>
              <anyAttribute namespace="##other" processContents="lax"/>
          </restriction>
      </complexContent>
  </complexType>

  <complexType name="ServerForUpdate">
      <complexContent>
          <extension base="csapi:Server">
              <assert vc:minVersion="1.1" test="@name or @accessIPv4 or @accessIPv6 or csapi:metadata">
                  <annotation>
                      <xsd:documentation
                          xml:lang="EN"
                          xmlns="http://www.w3.org/1999/xhtml">
                          <p>
                              When updating a server.  The server
                              <strong>MUST</strong> contain either a
                              name or metadata or access address. The
                              other fields are not editabile on a
                              server update.
                          </p>
                      </xsd:documentation>
                  </annotation>
              </assert>
          </extension>
      </complexContent>
  </complexType>

  <complexType name="Servers">
    <sequence>
      <element name="server" type="csapi:Server" minOccurs="0" maxOccurs="1000">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A collection of servers.
            </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="ServersWithOnlyIDsNamesLinks">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  A collection of servers with only IDs, names, and
                  links.  A collection of this type is returned in
                  non-detailed server list.
              </p>
          </xsd:documentation>
      </annotation>
      <complexContent>
          <restriction base="csapi:Servers">
              <sequence>
                  <element name="server" type="csapi:ServerWithOnlyIDNameLinks" minOccurs="0" maxOccurs="1000">
                  </element>
                  <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
                  <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
              </sequence>
          </restriction>
      </complexContent>
  </complexType>

  <complexType name="Personality">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        A collection of small <a href="#type_File" title="See
        definition of file">files</a> used to personalize a server
        instance.
      </xsd:documentation>
    </annotation>
    <sequence>
      <element name="file" type="csapi:File" minOccurs="0" maxOccurs="5">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A collection of files.
            </p>
          </xsd:documentation>
        </annotation>
      </element>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>

  <complexType name="File">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          A file is simply a full path along with base64 file
          content. The name of the file is specified in the path
          attribute and the <a href="#type_FileContent" title="See
          definition of FileContent">file content</a> is included
          inline.
        </p>
        <xsdxt:code type="application/xml">
          <![CDATA[
          <file xmlns="http://docs.openstack.org/compute/api/v1.0"
                path="/etc/banner.txt">
            ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2gg
            YSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4u
            LnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNv
            bnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3cs
            IHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhv
            cml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
          </file>
          ]]>
        </xsdxt:code>
      </xsd:documentation>
    </annotation>
    <simpleContent>
      <extension base="csapi:FileContent">
	<attribute name="path"  type="csapi:FileName" use="required">
          <annotation>
            <xsd:documentation
                xml:lang="EN"
                xmlns="http://www.w3.org/1999/xhtml">
              <p>
                Full file path.
              </p>
            </xsd:documentation>
          </annotation>
        </attribute>
        <anyAttribute namespace="##other" processContents="lax"/>
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="Addresses">
    <sequence>
        <element name="network" type="csapi:AddressList" 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"/>
  </complexType>

  <complexType name="AddressList">
    <sequence>
      <element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="1000">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A collection of addresses.
            </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="xsd:string" name="id" use="optional">
        <annotation>
            <xsd:documentation
                xml:lang="EN"
                xmlns="http://www.w3.org/1999/xhtml">
                <p>
                    A id of an address list.  This is typically a name
                    used to identify a network.
                </p>
            </xsd:documentation>
        </annotation>
    </attribute>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>
  <complexType name="Address">
    <sequence>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <attribute name="addr" type="xsd:string" use="required">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              An IP address.
            </p>
          </xsd:documentation>
        </annotation>
    </attribute>
    <attribute name="version" type="csapi:AddressVersion" use="optional">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
                The IP Address version can be 4 or 6. The version
                attribute is optional if it is left off, the type of
                address will be determined by from its address
                format. If it is specified it <strong>should</strong>
                match the address format.
            </p>
            <p>
                The OpenStack compute API will always fill in the
                version number as a convinence to the client.
            </p>
          </xsd:documentation>
        </annotation>
    </attribute>
    <anyAttribute namespace="##other" processContents="lax"/>
  </complexType>

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

  <simpleType name="ServerStatus">
    <restriction base="xsd:string">
      <enumeration value="ACTIVE">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is ready to use.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="SUSPENDED">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is in an inactive (suspended) state.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="DELETED">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server has been deleted.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="RESIZE">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is being resized.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="VERIFY_RESIZE">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is waiting for the resize operation to be
              confirmed so that the original server may be removed.
            </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 failed, the server is in an
              error state.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="BUILD">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is being built.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="PASSWORD">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server password is being changed.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="REBUILD">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is being rebuilt.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="REBOOT">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is going through a <a
              href="actions.xsd#type_RebootType" title="See definition
              of RebootType">SOFT</a> reboot.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="HARD_REBOOT">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is going through a <a
              href="actions.xsd#type_RebootType" title="See definition
              of RebootType">HARD</a> reboot.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
      <enumeration value="UNKNOWN">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              The server is in an unknown state.
            </p>
          </xsd:documentation>
        </annotation>
      </enumeration>
    </restriction>
  </simpleType>

  <simpleType name="FileName">
    <restriction base="xsd:string">
      <maxLength value="255" />
    </restriction>
  </simpleType>

  <simpleType name="FileContent">
    <restriction base="xsd:base64Binary">
      <maxLength value="10240" />
    </restriction>
  </simpleType>

  <simpleType name="AddressVersion">
      <restriction base="xsd:int">
          <enumeration value="4">
              <annotation>
                  <xsd:documentation
                      xml:lang="EN"
                      xmlns="http://www.w3.org/1999/xhtml">
                      <p>
                          Denotes IPv4.
                      </p>
                  </xsd:documentation>
              </annotation>
          </enumeration>
          <enumeration value="6">
              <annotation>
                  <xsd:documentation
                      xml:lang="EN"
                      xmlns="http://www.w3.org/1999/xhtml">
                      <p>
                          Denotes IPv6.
                      </p>
                  </xsd:documentation>
              </annotation>
          </enumeration>
      </restriction>
  </simpleType>
</schema>