Statistics
| Branch: | Revision:

root / main / conf / server.xsd @ af63e739

History | View | Annotate | Download (5.9 kB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
<schema
3
    elementFormDefault="qualified"
4
    attributeFormDefault="unqualified"
5
    xmlns="http://www.w3.org/2001/XMLSchema"
6
    xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0"
7
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
8
    targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0"
9
>
10
  <include schemaLocation="common.xsd" />
11

    
12
  <element name="server" type="csapi:Server">
13
    <annotation>
14
      <xsd:documentation
15
          xml:lang="EN"
16
          xmlns="http://www.w3.org/1999/xhtml">
17
        <p>
18
          Represents a server.
19
        </p>
20
      </xsd:documentation>
21
    </annotation>
22
  </element>
23

    
24
  <element name="addresses" type="csapi:Addresses">
25
    <annotation>
26
      <xsd:documentation
27
          xml:lang="EN"
28
          xmlns="http://www.w3.org/1999/xhtml">
29
        <p>
30
          A list of addresses (public and private) belonging to a
31
          particular server.
32
        </p>
33
      </xsd:documentation>
34
    </annotation>
35
  </element>
36

    
37
  <element name="public" type="csapi:AddressList">
38
    <annotation>
39
      <xsd:documentation
40
          xml:lang="EN"
41
          xmlns="http://www.w3.org/1999/xhtml">
42
        <p>
43
          A list of public addresses belonging to a particular server.
44
        </p>
45
      </xsd:documentation>
46
    </annotation>
47
  </element>
48

    
49
  <element name="private" type="csapi:AddressList">
50
    <annotation>
51
      <xsd:documentation
52
          xml:lang="EN"
53
          xmlns="http://www.w3.org/1999/xhtml">
54
        <p>
55
          A list of private addresses belonging to a particular server.
56
        </p>
57
      </xsd:documentation>
58
    </annotation>
59
  </element>
60

    
61
  <element name="shareIp" type="csapi:ShareIp">
62
    <annotation>
63
      <xsd:documentation
64
          xml:lang="EN"
65
          xmlns="http://www.w3.org/1999/xhtml">
66
        <p>
67
          A request to share a public ip address.
68
        </p>
69
      </xsd:documentation>
70
    </annotation>
71
  </element>
72

    
73

    
74
  <!-- Complex Types -->
75
  <complexType name="Server">
76
    <sequence>
77
      <element name="metadata" type="csapi:Metadata" minOccurs="0" />
78
      <element ref="csapi:addresses" minOccurs="0" />
79
      <element name="personality" type="csapi:Personality" minOccurs="0" />
80
    </sequence>
81
    <attribute type="xsd:string" name="name" use="optional" />
82
    <attribute type="xsd:int"    name="id"   use="optional" />
83
    <attribute type="xsd:string" name="adminPass" use="optional"/>
84
    <attribute type="xsd:int"    name="imageId" use="optional" />
85
    <attribute type="xsd:int"    name="flavorId" use="optional" />
86
    <attribute type="xsd:string"    name="hostId" use="optional" />
87
    <attribute type="csapi:Progress"  name="progress"  use="optional" />
88
    <attribute type="csapi:ServerStatus" name="status" use="optional" />
89
    <attribute type="xsd:int" name="sharedIpGroupId" use="optional" />
90
  </complexType>
91

    
92
  <complexType name="Metadata">
93
    <sequence>
94
      <element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="5" />
95
    </sequence>
96
  </complexType>
97

    
98
  <complexType name="MetadataItem">
99
    <simpleContent>
100
      <extension base="csapi:MetadataValue">
101
	<attribute name="key" type="csapi:MetadataKey" use="required"/>
102
      </extension>
103
    </simpleContent>
104
  </complexType>
105

    
106
  <complexType name="Personality">
107
    <sequence>
108
      <!-- should the number of files be unbounded? -->
109
      <element name="file" type="csapi:File" minOccurs="0" maxOccurs="5" />
110
    </sequence>
111
  </complexType>
112

    
113
  <complexType name="File">
114
    <simpleContent>
115
      <extension base="csapi:FileContent">
116
	<attribute name="path"  type="csapi:FileName" use="required" />
117
      </extension>
118
    </simpleContent>
119
  </complexType>
120

    
121
  <complexType name="Addresses">
122
    <sequence>
123
      <element ref="csapi:public"  minOccurs="0" />
124
      <element ref="csapi:private" minOccurs="0" />
125
    </sequence>
126
  </complexType>
127

    
128
  <complexType name="AddressList">
129
    <sequence>
130
      <element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="unbounded" />
131
    </sequence>
132
  </complexType>
133

    
134
  <complexType name="Address">
135
    <!-- really need a better simple type than a string -->
136
    <attribute name="addr" type="xsd:string" use="required" />
137
  </complexType>
138

    
139
  <complexType name="ShareIp">
140
	<attribute name="sharedIpGroupId" type="xsd:int" use="required" />
141
	<attribute name="configureServer" type="xsd:boolean" default="false" />
142
  </complexType>
143

    
144
  <!-- Simple Types -->
145
  <simpleType name="ServerStatus">
146
    <restriction base="xsd:string">
147
      <enumeration value="ACTIVE" />
148
      <enumeration value="SUSPENDED" />
149
      <enumeration value="DELETED" />
150
      <enumeration value="QUEUE_RESIZE" />
151
      <enumeration value="PREP_RESIZE" />
152
      <enumeration value="RESIZE" />
153
      <enumeration value="VERIFY_RESIZE" />
154
      <enumeration value="QUEUE_MOVE" />
155
      <enumeration value="PREP_MOVE" />
156
      <enumeration value="MOVE" />
157
      <enumeration value="VERIFY_MOVE" />
158
      <enumeration value="RESCUE" />
159
      <enumeration value="ERROR" />
160
      <enumeration value="BUILD" />
161
      <enumeration value="RESTORING" />
162
      <enumeration value="PASSWORD" />
163
      <enumeration value="REBUILD" />
164
      <enumeration value="DELETE_IP" />
165
      <enumeration value="SHARE_IP_NO_CONFIG" />
166
      <enumeration value="SHARE_IP" />
167
      <enumeration value="REBOOT" />
168
      <enumeration value="HARD_REBOOT" />
169
      <enumeration value="UNKNOWN" />
170
    </restriction>
171
  </simpleType>
172

    
173
  <simpleType name="FileName">
174
    <restriction base="xsd:string">
175
      <maxLength value="255" />
176
    </restriction>
177
  </simpleType>
178

    
179
  <simpleType name="FileContent">
180
    <restriction base="xsd:base64Binary">
181
      <maxLength value="10240" />
182
    </restriction>
183
  </simpleType>
184

    
185
  <simpleType name="MetadataKey">
186
    <restriction base="xsd:string">
187
      <maxLength value="255" />
188
    </restriction>
189
  </simpleType>
190

    
191
  <simpleType name="MetadataValue">
192
    <restriction base="xsd:string">
193
      <maxLength value="255" />
194
    </restriction>
195
  </simpleType>
196
</schema>