File: common.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 (156 lines) | stat: -rw-r--r-- 5,043 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
<?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>Common 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 common types used by multiple
        entities and possibly spanning several types of requests.
      </p>
    </xsd:documentation>
  </annotation>

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

  <complexType name="Metadata">
    <sequence>
      <element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="1000">
        <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
            <p>
              A collection of metadata items.  There may be an
              absolute limit that imposes additional constraints on
              the number of metadata items.
            </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="MetadataItem">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          A MetadataItem is simply a name-value pair. The name is
          specified in the key attribute and the <a
          href="#type_MetadataValue" title="See definition of
          MetadataValue">value</a> is included inline.
        </p>
        <xsdxt:code type="application/xml">
          <![CDATA[
            <meta xmlns="http://docs.openstack.org/compute/api/v1.0"
                  key="Server Label">Web Head 1</meta>
          ]]>
        </xsdxt:code>
      </xsd:documentation>
    </annotation>
    <simpleContent>
      <extension base="csapi:MetadataValue">
	<attribute name="key" type="csapi:MetadataKey" use="required">
          <annotation>
            <xsd:documentation
                xml:lang="EN"
                xmlns="http://www.w3.org/1999/xhtml">
              <p>
                A meta data name-value pair.
              </p>
            </xsd:documentation>
          </annotation>
        </attribute>
        <anyAttribute namespace="##other" processContents="lax"/>
      </extension>
    </simpleContent>
  </complexType>

  <!-- Simple types that span multiple requests -->
  <simpleType name="Progress">
    <annotation>
      <xsd:documentation
          xml:lang="EN"
          xmlns="http://www.w3.org/1999/xhtml">
        <p>
          An integer between 0 and 100 that denotes the progress of an
          operation.
        </p>
      </xsd:documentation>
    </annotation>
    <restriction base="xsd:int">
      <minInclusive value="0"/>
      <maxInclusive value="100" />
    </restriction>
  </simpleType>

  <simpleType name="UUID">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  A universally unique identifier.
              </p>
          </xsd:documentation>
      </annotation>
      <restriction base="xsd:string">
          <length value="36" fixed="true"/>
          <pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/>
      </restriction>
  </simpleType>

  <simpleType name="ExtendedStatus">
      <annotation>
          <xsd:documentation
              xml:lang="EN"
              xmlns="http://www.w3.org/1999/xhtml">
              <p>
                  An extended status must contian a prefix.
              </p>
          </xsd:documentation>
      </annotation>
      <restriction base="xsd:string">
          <pattern value="(\w|-)+:\w+"/>
      </restriction>
  </simpleType>

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

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