summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiad Sawalha <github@highbridgellc.com>2011-08-10 23:42:52 -0500
committerZiad Sawalha <github@highbridgellc.com>2011-08-10 23:43:37 -0500
commitb1fd6aac34a2e96d7e71f307f31f40fa3bf3fac1 (patch)
treeef4c5eeaab29503405e37a629582327a688cf892
parentbd5bdb5d881f04d3a5515ed35dca3c488864ce0a (diff)
downloadkeystone-b1fd6aac34a2e96d7e71f307f31f40fa3bf3fac1.tar.gz
keystone-b1fd6aac34a2e96d7e71f307f31f40fa3bf3fac1.tar.xz
keystone-b1fd6aac34a2e96d7e71f307f31f40fa3bf3fac1.zip
Added xsd content, update static controller, and static tests
Change-Id: Ibb56ac3273a5f29d5a6dc96d8f14e2e7b058c7c5
-rw-r--r--keystone/content/xsd/api-common.xsd56
-rwxr-xr-xkeystone/content/xsd/api.xsd18
-rw-r--r--keystone/content/xsd/atom/atom.xsd115
-rw-r--r--keystone/content/xsd/atom/xml.xsd287
-rw-r--r--keystone/content/xsd/endpoints.xsd200
-rw-r--r--keystone/content/xsd/extensions.xsd56
-rw-r--r--keystone/content/xsd/fault.xsd135
-rwxr-xr-xkeystone/content/xsd/roles.xsd113
-rw-r--r--keystone/content/xsd/services.xsd59
-rw-r--r--keystone/content/xsd/tenant.xsd40
-rw-r--r--keystone/content/xsd/token.xsd172
-rwxr-xr-xkeystone/content/xsd/user.xsd100
-rw-r--r--keystone/content/xsd/version.xsd200
-rw-r--r--keystone/controllers/staticfiles.py21
-rwxr-xr-xkeystone/routers/admin.py17
-rw-r--r--keystone/routers/service.py21
-rw-r--r--keystone/test/functional/test_static_files.py10
17 files changed, 1612 insertions, 8 deletions
diff --git a/keystone/content/xsd/api-common.xsd b/keystone/content/xsd/api-common.xsd
new file mode 100644
index 00000000..5e8ebeda
--- /dev/null
+++ b/keystone/content/xsd/api-common.xsd
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
+
+<!-- (C) 2009-2011 Rackspace Hosting, All Rights Reserved -->
+
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:capi="http://docs.openstack.org/common/api/v1.0"
+ xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://docs.openstack.org/common/api/v1.0"
+>
+ <annotation>
+ <xsd:appinfo
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <xsdxt:title>Open Stack Common API Schema Types 1.0</xsdxt:title>
+ <xsdxt:link rev="index" href="extensions.xsd" />
+ <xsdxt:link rev="index" href="limits.xsd" />
+ <xsdxt:link rev="index" href="version.xsd" />
+ </xsd:appinfo>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This is the main index XML Schema document
+ for Common API Schema Types Version 1.0.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ <include schemaLocation="extensions.xsd">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Types related to extensions.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </include>
+ <include schemaLocation="version.xsd">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Types related to API version details.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </include>
+</schema>
diff --git a/keystone/content/xsd/api.xsd b/keystone/content/xsd/api.xsd
new file mode 100755
index 00000000..e2a065a0
--- /dev/null
+++ b/keystone/content/xsd/api.xsd
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+ <include schemaLocation="token.xsd"/>
+ <include schemaLocation="tenant.xsd"/>
+ <include schemaLocation="fault.xsd"/>
+ <include schemaLocation="endpoints.xsd"/>
+ <include schemaLocation="roles.xsd"/>
+ <include schemaLocation="services.xsd"/>
+ <include schemaLocation="user.xsd"/>
+</schema>
diff --git a/keystone/content/xsd/atom/atom.xsd b/keystone/content/xsd/atom/atom.xsd
new file mode 100644
index 00000000..c515c497
--- /dev/null
+++ b/keystone/content/xsd/atom/atom.xsd
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
+ targetNamespace="http://www.w3.org/2005/Atom"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
+
+ <xs:simpleType name="relation">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="alternate" />
+ <xs:enumeration value="appendix" />
+ <xs:enumeration value="archives" />
+ <xs:enumeration value="author" />
+ <xs:enumeration value="bookmark" />
+ <xs:enumeration value="chapter" />
+ <xs:enumeration value="contents" />
+ <xs:enumeration value="copyright" />
+ <xs:enumeration value="current" />
+ <xs:enumeration value="describedby" />
+ <xs:enumeration value="edit" />
+ <xs:enumeration value="edit-media" />
+ <xs:enumeration value="first" />
+ <xs:enumeration value="glossary" />
+ <xs:enumeration value="help" />
+ <xs:enumeration value="hub" />
+ <xs:enumeration value="icon" />
+ <xs:enumeration value="index" />
+ <xs:enumeration value="last" />
+ <xs:enumeration value="latest-version" />
+ <xs:enumeration value="license" />
+ <xs:enumeration value="monitor" />
+ <xs:enumeration value="monitor-group" />
+ <xs:enumeration value="next" />
+ <xs:enumeration value="next-arvhice" />
+ <xs:enumeration value="nofollow" />
+ <xs:enumeration value="payment" />
+ <xs:enumeration value="predecessor-version" />
+ <xs:enumeration value="prefetch" />
+ <xs:enumeration value="prev" />
+ <xs:enumeration value="previous" />
+ <xs:enumeration value="prev-archive" />
+ <xs:enumeration value="replies" />
+ <xs:enumeration value="search" />
+ <xs:enumeration value="section" />
+ <xs:enumeration value="self" />
+ <xs:enumeration value="service" />
+ <xs:enumeration value="start" />
+ <xs:enumeration value="stylesheet" />
+ <xs:enumeration value="subsection" />
+ <xs:enumeration value="successor-version" />
+ <xs:enumeration value="up" />
+ <xs:enumeration value="version-history" />
+ <xs:enumeration value="via" />
+ <xs:enumeration value="working-copy" />
+ <xs:enumeration value="working-copy-of" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="link" type="atom:link" />
+
+ <xs:complexType name="link">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>See section 3.4 of the ATOM RFC <html:a href="http://tools.ietf.org/html/rfc4287">RFC4287</html:a></html:p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="rel" use="required" type="atom:relation">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>TODO(Jorge)</html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="type" use="optional" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>TODO(Jorge)</html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="href" use="required" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>TODO(Jorge)</html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>TODO(Jorge)</html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="title" use="optional" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>TODO(Jorge)</html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute ref="xml:base" />
+ <xs:attribute ref="xml:lang" />
+ </xs:complexType>
+</xs:schema>
diff --git a/keystone/content/xsd/atom/xml.xsd b/keystone/content/xsd/atom/xml.xsd
new file mode 100644
index 00000000..aea7d0db
--- /dev/null
+++ b/keystone/content/xsd/atom/xml.xsd
@@ -0,0 +1,287 @@
+<?xml version='1.0'?>
+<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns ="http://www.w3.org/1999/xhtml"
+ xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ <div>
+ <h1>About the XML namespace</h1>
+
+ <div class="bodytext">
+ <p>
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+ </p>
+ <p>
+ See <a href="http://www.w3.org/XML/1998/namespace.html">
+ http://www.w3.org/XML/1998/namespace.html</a> and
+ <a href="http://www.w3.org/TR/REC-xml">
+ http://www.w3.org/TR/REC-xml</a> for information
+ about this namespace.
+ </p>
+ <p>
+ Note that local names in this namespace are intended to be
+ defined only by the World Wide Web Consortium or its subgroups.
+ The names currently defined in this namespace are listed below.
+ They should not be used with conflicting semantics by any Working
+ Group, specification, or document instance.
+ </p>
+ <p>
+ See further below in this document for more information about <a
+ href="#usage">how to refer to this schema document from your own
+ XSD schema documents</a> and about <a href="#nsversioning">the
+ namespace-versioning policy governing this schema document</a>.
+ </p>
+ </div>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+ <xs:annotation>
+ <xs:documentation>
+ <div>
+
+ <h3>lang (as an attribute name)</h3>
+ <p>
+ denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.</p>
+
+ </div>
+ <div>
+ <h4>Notes</h4>
+ <p>
+ Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility.
+ </p>
+ <p>
+ See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
+ http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
+ and the IANA language subtag registry at
+ <a href="http://www.iana.org/assignments/language-subtag-registry">
+ http://www.iana.org/assignments/language-subtag-registry</a>
+ for further information.
+ </p>
+ <p>
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.
+ </p>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:language">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+ <xs:annotation>
+ <xs:documentation>
+ <div>
+
+ <h3>space (as an attribute name)</h3>
+ <p>
+ denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.</p>
+
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
+ <xs:documentation>
+ <div>
+
+ <h3>base (as an attribute name)</h3>
+ <p>
+ denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.</p>
+
+ <p>
+ See <a
+ href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
+ for information about this attribute.
+ </p>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="id" type="xs:ID">
+ <xs:annotation>
+ <xs:documentation>
+ <div>
+
+ <h3>id (as an attribute name)</h3>
+ <p>
+ denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ This name is reserved by virtue of its definition in the
+ xml:id specification.</p>
+
+ <p>
+ See <a
+ href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
+ for information about this attribute.
+ </p>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+ <xs:annotation>
+ <xs:documentation>
+ <div>
+
+ <h3>Father (in any context at all)</h3>
+
+ <div class="bodytext">
+ <p>
+ denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+ </p>
+ <blockquote>
+ <p>
+ In appreciation for his vision, leadership and
+ dedication the W3C XML Plenary on this 10th day of
+ February, 2000, reserves for Jon Bosak in perpetuity
+ the XML name "xml:Father".
+ </p>
+ </blockquote>
+ </div>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>
+ <div xml:id="usage" id="usage">
+ <h2><a name="usage">About this schema document</a></h2>
+
+ <div class="bodytext">
+ <p>
+ This schema defines attributes and an attribute group suitable
+ for use by schemas wishing to allow <code>xml:base</code>,
+ <code>xml:lang</code>, <code>xml:space</code> or
+ <code>xml:id</code> attributes on elements they define.
+ </p>
+ <p>
+ To enable this, such a schema must import this schema for
+ the XML namespace, e.g. as follows:
+ </p>
+ <pre>
+ &lt;schema . . .>
+ . . .
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ </pre>
+ <p>
+ or
+ </p>
+ <pre>
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+ </pre>
+ <p>
+ Subsequently, qualified reference to any of the attributes or the
+ group defined below will have the desired effect, e.g.
+ </p>
+ <pre>
+ &lt;type . . .>
+ . . .
+ &lt;attributeGroup ref="xml:specialAttrs"/>
+ </pre>
+ <p>
+ will define a type which will schema-validate an instance element
+ with any of those attributes.
+ </p>
+ </div>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>
+ <div id="nsversioning" xml:id="nsversioning">
+ <h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
+ <div class="bodytext">
+ <p>
+ In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ <a href="http://www.w3.org/2009/01/xml.xsd">
+ http://www.w3.org/2009/01/xml.xsd</a>.
+ </p>
+ <p>
+ At the date of issue it can also be found at
+ <a href="http://www.w3.org/2001/xml.xsd">
+ http://www.w3.org/2001/xml.xsd</a>.
+ </p>
+ <p>
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML
+ Schema itself, or with the XML namespace itself. In other words,
+ if the XML Schema or XML namespaces change, the version of this
+ document at <a href="http://www.w3.org/2001/xml.xsd">
+ http://www.w3.org/2001/xml.xsd
+ </a>
+ will change accordingly; the version at
+ <a href="http://www.w3.org/2009/01/xml.xsd">
+ http://www.w3.org/2009/01/xml.xsd
+ </a>
+ will not change.
+ </p>
+ <p>
+ Previous dated (and unchanging) versions of this schema
+ document are at:
+ </p>
+ <ul>
+ <li><a href="http://www.w3.org/2009/01/xml.xsd">
+ http://www.w3.org/2009/01/xml.xsd</a></li>
+ <li><a href="http://www.w3.org/2007/08/xml.xsd">
+ http://www.w3.org/2007/08/xml.xsd</a></li>
+ <li><a href="http://www.w3.org/2004/10/xml.xsd">
+ http://www.w3.org/2004/10/xml.xsd</a></li>
+ <li><a href="http://www.w3.org/2001/03/xml.xsd">
+ http://www.w3.org/2001/03/xml.xsd</a></li>
+ </ul>
+ </div>
+ </div>
+ </xs:documentation>
+ </xs:annotation>
+
+</xs:schema>
+
diff --git a/keystone/content/xsd/endpoints.xsd b/keystone/content/xsd/endpoints.xsd
new file mode 100644
index 00000000..7044e173
--- /dev/null
+++ b/keystone/content/xsd/endpoints.xsd
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:idm="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+
+ <!-- Import ATOM specific schema definitions -->
+ <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
+ schemaLocation="atom/atom.xsd" />
+
+ <element name="endpointTemplates" type="idm:EndpointTemplateList">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of Endpoint Templates.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <element name="endpointTemplate" type="idm:EndpointTemplate">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ An Endpoint Template.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ <element name="endpoint" type="idm:Endpoint">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ An Endpoint.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ <element name="endpoints" type="idm:EndpointList">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of Endpoints.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <!-- Complex Types -->
+ <complexType name="EndpointTemplate">
+ <attribute name="id" type="xsd:int" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ An ID uniquely identifying the Endpoint Template.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="serviceName" type="xsd:string" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The service name of Endpoint Template.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="region" type="xsd:string" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The region of Endpoint Template.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="publicURL" type="xsd:anyURI" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The public URL to access represented service.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="internalURL" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The internal version of the public URL.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="adminURL" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The admin URL.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="global" type="xsd:boolean" default="false" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ If true the Endpoint Template is automatically part of every account.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="enabled" type="xsd:boolean" default="true" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ True if the Endpoint Template is enabled (active).
+ A Endpoint Template cannot be added if it's disabled or inactive (false).
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Endpoint">
+ <attribute name="id" type="xsd:int" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ An ID uniquely identifying the Endpoint.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="href" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A hyperlink reference to the URL Endpoint Template.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="EndpointTemplateList">
+ <sequence>
+ <element name="endpointTemplate" type="idm:EndpointTemplate" minOccurs="0" maxOccurs="unbounded"/>
+ <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="EndpointList">
+ <sequence>
+ <element name="endpoint" type="idm:Endpoint" minOccurs="0" maxOccurs="unbounded"/>
+ <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>
+</schema>
diff --git a/keystone/content/xsd/extensions.xsd b/keystone/content/xsd/extensions.xsd
new file mode 100644
index 00000000..a942f0a1
--- /dev/null
+++ b/keystone/content/xsd/extensions.xsd
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
+ targetNamespace="http://docs.openstack.org/common/api/v1.0"
+ xmlns:ext="http://docs.openstack.org/common/api/v1.0"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <!-- Import ATOM specific schema definitions -->
+ <xsd:import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" />
+
+ <xsd:element name="extensions" type="ext:Extensions"/>
+ <xsd:element name="extension" type="ext:Extension"/>
+
+ <xsd:complexType name="Extensions">
+ <xsd:sequence>
+ <xsd:element name="extension" type="ext:Extension" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="Extension">
+ <xsd:sequence>
+ <xsd:element name="description" type="xsd:string" minOccurs="1" />
+ <xsd:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="alias" type="ext:Alias" use="required"/>
+ <xsd:attribute name="updated" type="xsd:dateTime" use="optional"/>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ <xsd:assert vc:minVersion="1.1" test="atom:link[@rel='describedby']">
+ <xsd:annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ There should be at least one atom link
+ with a describedby relation.
+ </p>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:assert>
+ </xsd:complexType>
+
+ <xsd:simpleType name="Alias">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="\w+\-\w+" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+</xsd:schema>
diff --git a/keystone/content/xsd/fault.xsd b/keystone/content/xsd/fault.xsd
new file mode 100644
index 00000000..6725e3a4
--- /dev/null
+++ b/keystone/content/xsd/fault.xsd
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+ <!-- Fault Elements -->
+ <element name="identityFault" type="identity:IdentityFault"/>
+ <element name="serviceUnavailable" type="identity:ServiceUnavailableFault"/>
+ <element name="badRequest" type="identity:BadRequestFault"/>
+ <element name="unauthorized" type="identity:UnauthorizedFault"/>
+ <element name="overLimit" type="identity:OverLimitFault"/>
+ <element name="userDisabled" type="identity:UserDisabledFault"/>
+ <element name="forbidden" type="identity:ForbiddenFault"/>
+ <element name="itemNotFound" type="identity:ItemNotFoundFault"/>
+ <element name="tenantConflict" type="identity:TenantConflictFault"/>
+
+ <!-- Fault Types -->
+ <complexType name="IdentityFault">
+ <sequence>
+ <element name="message" type="xsd:string">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A human readable message that is appropriate for display
+ to the end user.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ <element name="details" type="xsd:string" minOccurs="0">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The optional &lt;details&gt; element may contain useful
+ information for tracking down errors (e.g a stack
+ trace). This information may or may not be appropriate
+ for display to an end user.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="code" type="xsd:int" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The HTTP status code associated with the current fault.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ServiceUnavailableFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="BadRequestFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UnauthorizedFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UserDisabledFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ForbiddenFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ItemNotFoundFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="TenantConflictFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="OverLimitFault">
+ <complexContent>
+ <extension base="identity:IdentityFault">
+ <attribute name="retryAt" type="xsd:dateTime" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ An optional dateTime denoting when an operation should
+ be retried.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+
+</schema>
diff --git a/keystone/content/xsd/roles.xsd b/keystone/content/xsd/roles.xsd
new file mode 100755
index 00000000..aad0b901
--- /dev/null
+++ b/keystone/content/xsd/roles.xsd
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+
+ <!-- Import ATOM specific schema definitions -->
+ <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
+ schemaLocation="atom/atom.xsd" />
+
+ <!-- Elements -->
+ <element name="roles" type="identity:RoleList" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of roles.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <element name="role" type="identity:Role" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A role.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+
+ <element name="roleRefs" type="identity:RoleRefList" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of roles refs.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <element name="roleRef" type="identity:RoleRef" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A role reference.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+
+ <!-- Complex Types -->
+ <complexType name="Role">
+ <attribute name="id" type="xsd:string" use="required"/>
+ <attribute name="description" type="xsd:string" use="optional"/>
+ <attribute name="serviceId" type="xsd:string" use="optional"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="RoleList">
+ <sequence>
+ <element name="role" type="identity:Role" minOccurs="0" maxOccurs="unbounded"/>
+ <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="RoleRef">
+ <attribute name="id" type="xsd:int" use="required"/>
+ <attribute name="tenantId" type="xsd:string" use="required" />
+ <attribute name="href" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A hyperlink refrence to the role URL.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="RoleRefList">
+ <sequence>
+ <element name="role" type="identity:RoleRef" minOccurs="0" maxOccurs="unbounded"/>
+ <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>
+</schema> \ No newline at end of file
diff --git a/keystone/content/xsd/services.xsd b/keystone/content/xsd/services.xsd
new file mode 100644
index 00000000..e9ba70e4
--- /dev/null
+++ b/keystone/content/xsd/services.xsd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+
+ <!-- Import ATOM specific schema definitions -->
+ <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
+ schemaLocation="atom/atom.xsd" />
+
+ <!-- Elements -->
+ <element name="services" type="identity:ServiceList" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of services.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <element name="service" type="identity:Service" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A service.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+
+ <!-- Complex Types -->
+ <complexType name="Service">
+ <attribute name="id" type="xsd:string" use="required"/>
+ <attribute name="description" type="xsd:string" use="optional"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ServiceList">
+ <sequence>
+ <element name="service" type="identity:Service" minOccurs="0" maxOccurs="unbounded"/>
+ <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>
+</schema> \ No newline at end of file
diff --git a/keystone/content/xsd/tenant.xsd b/keystone/content/xsd/tenant.xsd
new file mode 100644
index 00000000..26ef15fe
--- /dev/null
+++ b/keystone/content/xsd/tenant.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+ <!-- Import ATOM specific schema definitions -->
+ <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
+ schemaLocation="atom/atom.xsd" />
+
+ <!-- Elements -->
+ <element name="tenant" type="identity:Tenant" />
+ <element name="tenants" type="identity:Tenants" />
+
+ <!-- Complex Types -->
+ <complexType name="Tenants">
+ <sequence>
+ <element name="tenant" type="identity:Tenant" 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="Tenant">
+ <sequence>
+ <element name="description" type="xsd:string"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="enabled" type="xsd:boolean" use="optional" default="true"/>
+ <attribute name="id" type="xsd:string" use="optional"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+</schema>
diff --git a/keystone/content/xsd/token.xsd b/keystone/content/xsd/token.xsd
new file mode 100644
index 00000000..759b8de7
--- /dev/null
+++ b/keystone/content/xsd/token.xsd
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+ <include schemaLocation="roles.xsd"/>
+ <!-- Elements -->
+ <element name="passwordCredentials" type="identity:PasswordCredentials"/>
+ <element name="auth" type="identity:AuthData"/>
+
+ <!-- Complex Types -->
+ <complexType name="Credentials" abstract="true" />
+ <complexType name="PasswordCredentials">
+ <complexContent>
+ <extension base="identity:Credentials">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="password" type="xsd:string" use="required" />
+ <attribute name="username" type="xsd:string" use="required" />
+ <attribute name="tenantId" type="xsd:string" use="optional" />
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="AuthData">
+ <sequence>
+ <element name="token" type="identity:Token"/>
+ <element name="user" type="identity:UserForAuthData"/>
+ <element name="serviceCatalog" type="identity:ServiceCatalog"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Token">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="expires" type="xsd:dateTime" use="required"/>
+ <attribute name="id" type="xsd:string" use="required"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="UserForAuthData">
+ <sequence>
+ <element name="groups" type="identity:Groups" />
+ <element name="roleRefs" type="identity:RoleRefList" />
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="tenantId" type="xsd:string"/>
+ <attribute name="username" type="xsd:string"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Groups">
+ <sequence>
+ <element name="group" type="identity:Group" maxOccurs="1000"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Group">
+ <attribute name="id" type="xsd:string" use="required"/>
+ <attribute name="tenantId" type="xsd:string" use="optional"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ServiceCatalog">
+ <sequence>
+ <element name="service" type="identity:Service" minOccurs="1" maxOccurs="unbounded">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of services.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ </sequence>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+ <complexType name="Service">
+ <sequence>
+ <element name="endpoint" type="identity:EndpointForService" minOccurs="1" maxOccurs="unbounded">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A list of endpoints.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+ </sequence>
+ <attribute name="name" type="xsd:ID" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The service name.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="EndpointForService">
+ <attribute name="region" type="xsd:string" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The airport code of the region where the endpoint
+ lives.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="publicURL" type="xsd:anyURI" use="required">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The publically accessible service URL.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="internalURL" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A service URL, accessible only within the
+ Rackspace Cloud.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <attribute name="adminURL" type="xsd:anyURI" use="optional">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ A service URL used for administration. This may expose
+ additional functionality not found in the public and
+ internal URL.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </attribute>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+</schema>
+
diff --git a/keystone/content/xsd/user.xsd b/keystone/content/xsd/user.xsd
new file mode 100755
index 00000000..991a1fb4
--- /dev/null
+++ b/keystone/content/xsd/user.xsd
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
+
+<!-- (C) 2010 Rackspace Hosting, All Rights Reserved -->
+
+<schema
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ targetNamespace="http://docs.openstack.org/identity/api/v2.0"
+>
+
+ <!-- Import ATOM specific schema definitions -->
+ <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
+ schemaLocation="atom/atom.xsd" />
+
+ <element name="users" type="identity:UserList" >
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <p>
+ A list of Users.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <element name="user" type="identity:User">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <p>
+ A Keystone User.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </element>
+
+ <!-- Complex Types -->
+ <complexType name="User">
+ <attribute name="id" type="xsd:ID" use="optional"/>
+ <attribute name="password" type="xsd:string" use="optional"/>
+ <attribute name="tenantId" type="xsd:string" use="optional"/>
+ <attribute name="email" type="xsd:string" use="optional"/>
+ <attribute name="enabled" type="xsd:boolean" default="true" use="optional"/>
+ <anyAttribute namespace="##other" processContents="lax"/>
+ </complexType>
+
+ <complexType name="UserWithOnlyEnabled">
+ <complexContent>
+ <restriction base="identity:User">
+ <attribute name="id" type="xsd:ID" use="prohibited"/>
+ <attribute name="password" type="xsd:string" use="prohibited"/>
+ <attribute name="tenantId" type="xsd:string" use="prohibited"/>
+ <attribute name="email" type="xsd:string" use="prohibited"/>
+ <attribute name="enabled" type="xsd:boolean" use="required"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UserWithOnlyPassword">
+ <complexContent>
+ <restriction base="identity:User">
+ <attribute name="id" type="xsd:ID" use="prohibited"/>
+ <attribute name="tenantId" type="xsd:string" use="prohibited"/>
+ <attribute name="email" type="xsd:string" use="prohibited"/>
+ <attribute name="enabled" type="xsd:boolean" use="prohibited"/>
+ <attribute name="password" type="xsd:string" use="required"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UserWithOnlyTenant">
+ <complexContent>
+ <restriction base="identity:User">
+ <attribute name="id" type="xsd:ID" use="prohibited"/>
+ <attribute name="email" type="xsd:string" use="prohibited"/>
+ <attribute name="enabled" type="xsd:boolean" use="prohibited"/>
+ <attribute name="password" type="xsd:string" use="prohibited"/>
+ <attribute name="tenantId" type="xsd:string" use="required"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UserList">
+ <sequence>
+ <element name="user" type="identity:User" minOccurs="0" maxOccurs="unbounded"/>
+ <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>
+
+</schema>
diff --git a/keystone/content/xsd/version.xsd b/keystone/content/xsd/version.xsd
new file mode 100644
index 00000000..6b2403bd
--- /dev/null
+++ b/keystone/content/xsd/version.xsd
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
+ targetNamespace="http://docs.openstack.org/common/api/v1.0"
+ xmlns:vers="http://docs.openstack.org/common/api/v1.0"
+ xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <!-- Import ATOM specific schema definitions -->
+ <xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom/atom.xsd" />
+
+ <!-- Multiple choices -->
+ <xs:element name="choices" type="vers:VersionChoiceList" />
+
+ <!-- Versioning -->
+ <xs:element name="versions" type="vers:VersionChoiceList" />
+ <xs:element name="version" type="vers:VersionChoice" vc:minVersion="1.0" vc:maxVersion="1.1"/>
+ <xs:element name="version" type="vers:VersionChoiceRoot" vc:minVersion="1.1"/>
+
+ <!-- Types -->
+ <xs:simpleType name="VersionStatus">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ The VersionStatus type describes a service's operational status.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="DEPRECATED" />
+ <xs:enumeration value="ALPHA" />
+ <xs:enumeration value="BETA" />
+ <xs:enumeration value="CURRENT" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="VersionChoiceList">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A version choice list outlines a collection of service version choices.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:sequence>
+ <xs:element name="version" type="vers:VersionChoice" minOccurs="1" maxOccurs="unbounded" />
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ <xs:assert vc:minVersion="1.1" test="every $v in vers:version satisfies $v/atom:link[@rel='self']">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ In version lists, every single version must
+ contain at least one self link.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:assert>
+ </xs:complexType>
+
+ <xs:complexType name="VersionChoiceRoot" vc:minVersion="1.1">
+ <xs:complexContent>
+ <xs:extension base="vers:VersionChoice">
+ <xs:assert test="atom:link[@rel='describedby']">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ When used as a root element, a version choice
+ must contain at least one describedby link.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:assert>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="VersionChoice">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A version choice contains relevant information about an available service
+ that a user can then use to target a specific version of the service. Note
+ that both the descriptive media types and the atom link references are
+ not manditory and are offered as message enrichment elements rather
+ than message requirements.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:sequence>
+ <xs:element name="media-types" type="vers:MediaTypeList" minOccurs="0" maxOccurs="1" />
+ <xs:element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+
+ <xs:attribute name="id" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ The ID of a version choice represents the service version's unique
+ identifier. This ID is guaranteed to be unique only among the
+ service version choices outlined in the VersionChoiceList.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="status" type="vers:VersionStatus" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A version choice's status describes the current operational state of
+ the given service version. The operational status is captured in a
+ simple type enumeration called VersionStatus.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="updated" type="xs:dateTime" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A version choice's updated attribute describes
+ the time when the version was updated. The
+ time should be updated anytime
+ <html:strong>anything</html:strong> in the
+ version has changed: documentation,
+ extensions, bug fixes.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="MediaTypeList">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A MediaTypeList outlines a collection of valid media types for a given
+ service version.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:sequence>
+ <xs:element name="media-type" type="vers:MediaType" minOccurs="1" maxOccurs="unbounded" />
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="MediaType">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ A MediaType describes what content types the service version understands.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="base" type="xs:string" use="optional" default="">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ The base of a given media type describes the simple MIME type
+ that then a more complicated media type can be derived from. These
+ types are basic and provide no namespace or version specific
+ data are are only provided as a convenience. Because of this the
+ base attribute is declared as optional.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="type" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ <html:p>
+ The type attribute of a MediaType describes the MIME specific
+ identifier of the media type in question. This identifier should include
+ a vendor namespace (
+ <html:a href="http://tools.ietf.org/html/rfc2048">See RFC 2048</html:a>)
+ as well as a version suffix.
+ </html:p>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/keystone/controllers/staticfiles.py b/keystone/controllers/staticfiles.py
index a311e450..4057956c 100644
--- a/keystone/controllers/staticfiles.py
+++ b/keystone/controllers/staticfiles.py
@@ -1,3 +1,20 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010 OpenStack LLC.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
from webob import Response
from keystone import utils
@@ -25,11 +42,11 @@ class StaticFilesController(wsgi.Controller):
@utils.wrap_error
def get_xsd_contract(self, req, xsd):
resp = Response()
- return template.static_file(resp, req, "/xsd/" + xsd,
+ return template.static_file(resp, req, "content/xsd/" + xsd,
root=utils.get_app_root(), mimetype="application/xml")
@utils.wrap_error
def get_xsd_atom_contract(self, req, xsd):
resp = Response()
- return template.static_file(resp, req, "/xsd/atom/" + xsd,
+ return template.static_file(resp, req, "content/xsd/atom/" + xsd,
root=utils.get_app_root(), mimetype="application/xml")
diff --git a/keystone/routers/admin.py b/keystone/routers/admin.py
index 293b38fc..c1a02455 100755
--- a/keystone/routers/admin.py
+++ b/keystone/routers/admin.py
@@ -1,3 +1,20 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010 OpenStack LLC.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
import routes
from keystone.common import wsgi
diff --git a/keystone/routers/service.py b/keystone/routers/service.py
index ea4865d0..2a9e4182 100644
--- a/keystone/routers/service.py
+++ b/keystone/routers/service.py
@@ -1,3 +1,20 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010 OpenStack LLC.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
import routes
from keystone.common import wsgi
@@ -49,11 +66,11 @@ class ServiceApi(wsgi.Router):
conditions=dict(method=["GET"]))
mapper.connect("/xsd/{xsd}",
controller=static_files_controller,
- action="get_pdf_contract",
+ action="get_xsd_contract",
conditions=dict(method=["GET"]))
mapper.connect("/xsd/atom/{xsd}",
controller=static_files_controller,
- action="get_pdf_contract",
+ action="get_xsd_atom_contract",
conditions=dict(method=["GET"]))
super(ServiceApi, self).__init__(mapper)
diff --git a/keystone/test/functional/test_static_files.py b/keystone/test/functional/test_static_files.py
index 1765e33e..092fd85a 100644
--- a/keystone/test/functional/test_static_files.py
+++ b/keystone/test/functional/test_static_files.py
@@ -11,11 +11,13 @@ class TestStaticFiles(KeystoneTestCase):
r = self.admin_request(path='/identity.wadl')
self.assertTrue('xml' in r.getheader('Content-Type'))
-# def test_xsd_contract(self):
-# self.admin_request(path='/xsd/something')
+ def test_xsd_contract(self):
+ r = self.admin_request(path='/xsd/api.xsd')
+ self.assertTrue('xml' in r.getheader('Content-Type'))
-# def test_xsd_atom_contract(self):
-# self.admin_request(path='/xsd/atom/something')
+ def test_xsd_atom_contract(self):
+ r = self.admin_request(path='/xsd/atom/atom.xsd')
+ self.assertTrue('xml' in r.getheader('Content-Type'))
if __name__ == '__main__':