diff options
| author | Sai Krishna <saikrishna1511@gmail.com> | 2011-04-28 17:13:27 +0530 |
|---|---|---|
| committer | Sai Krishna <saikrishna1511@gmail.com> | 2011-04-28 17:13:27 +0530 |
| commit | 112f06fd9377d4e6964f8e0ee447f60267920cc0 (patch) | |
| tree | f58b93c34d26c369108eb6d9484aaa3bd47a0f64 /docs/guide | |
| parent | efd7eb952a478ba968a60daed0dacd52ffe67b89 (diff) | |
| download | keystone-112f06fd9377d4e6964f8e0ee447f60267920cc0.tar.gz keystone-112f06fd9377d4e6964f8e0ee447f60267920cc0.tar.xz keystone-112f06fd9377d4e6964f8e0ee447f60267920cc0.zip | |
Adding First kestone repo
Diffstat (limited to 'docs/guide')
55 files changed, 3180 insertions, 0 deletions
diff --git a/docs/guide/pom.xml b/docs/guide/pom.xml new file mode 100644 index 00000000..ec944cf4 --- /dev/null +++ b/docs/guide/pom.xml @@ -0,0 +1,99 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.rackspace.idm</groupId> + <artifactId>docs</artifactId> + <version>0.0.1-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>docs</name> + <url>http://maven.apache.org</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>2.1.12</version> + </dependency> + <dependency> + <groupId>com.thoughtworks.xstream</groupId> + <artifactId>xstream</artifactId> + <version>1.3.1</version> + </dependency> + <dependency> + <groupId>org.codehaus.jettison</groupId> + <artifactId>jettison</artifactId> + <version>1.1</version> + </dependency> + </dependencies> + <build> + <resources> + <resource> + <directory>target/docbkx/pdf</directory> + <excludes> + <exclude>**/*.fo</exclude> + </excludes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>com.rackspace.cloud.api</groupId> + <artifactId>clouddocs-maven-plugin</artifactId> + <version>1.0.4-SNAPSHOT</version> + <executions> + <execution> + <goals> + <goal>generate-pdf</goal> + <goal>generate-webhelp</goal> + </goals> + <phase>generate-sources</phase> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.docbook</groupId> + <artifactId>docbook-xml</artifactId> + <version>4.4</version> + <scope>runtime</scope> + </dependency> + </dependencies> + <configuration> + <xincludeSupported>true</xincludeSupported> + </configuration> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>Rackspace Research Repositories</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>rackspace-research</id> + <name>Rackspace Research Repository</name> + <url>http://maven.research.rackspacecloud.com/content/groups/public/</url> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>rackspace-research</id> + <name>Rackspace Research Repository</name> + <url>http://maven.research.rackspacecloud.com/content/groups/public/</url> + </pluginRepository> + </pluginRepositories> + </profile> +</profiles> +</project> diff --git a/docs/guide/src/docbkx/idm.wadl b/docs/guide/src/docbkx/idm.wadl new file mode 100644 index 00000000..39135b71 --- /dev/null +++ b/docs/guide/src/docbkx/idm.wadl @@ -0,0 +1,355 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<application xmlns="http://wadl.dev.java.net/2009/02" + xmlns:idm="http://docs.openstack.org/idm/api/v1.0" + xmlns:capi="http://docs.openstack.org/common/api/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xsi:schemaLocation="http://docs.openstack.org/idm/api/v1.0 + xsd/api.xsd + http://docs.openstack.org/common/api/v1.0 + xsd/api-common.xsd + "> + + <grammars> + <include href="xsd/api.xsd"/> + <include href="xsd/api-common.xsd"/> + </grammars> + + <!-- We should use SSL in production --> + <resources base="http://localhost:8080"> + <resource id="version" path="v1.0"> + <method href="#getVersionInfo"/> + <resource id="extensions" path="extensions"> + <method href="#getExtensions"/> + <resource id="alias" path="{alias}"> + <param name="alias" style="template" type="xsd:string"/> + <method href="#getExtension"/> + </resource> + </resource> + <resource id="token" path="token"> + <method href="#authenticate" /> + <resource id="tokenId" path="{tokenId}"> + <param name="X-Auth-Token" style="header" type="xsd:string" required="true"/> + <param name="tokenId" style="template" type="xsd:string"/> + <method href="#validateToken"/> + <method href="#revokeToken"/> + </resource> + </resource> + <resource id="tenants" path="tenants"> + <param name="X-Auth-Token" style="header" type="xsd:string" required="true"/> + <method href="#getTenants" /> + <method href="#createTenant" /> + <resource id="tenantId" path="{tenantId}"> + <param name="tenantId" style="template" type="xsd:string"/> + <method href="#getTenant" /> + <method href="#updateTenant" /> + <method href="#deleteTenant" /> + </resource> + </resource> + </resource> + </resources> + + <!-- Extensions --> + <method name="GET" id="getExtensions"> + <response status="200 203"> + <representation mediaType="application/xml" element="capi:extensions"/> + <representation mediaType="application/json"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="GET" id="getExtension"> + <response status="200 203"> + <representation mediaType="application/xml" element="capi:extension"/> + <representation mediaType="application/json"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <!-- Version Info --> + <method name="GET" id="getVersionInfo"> + <response status="200 203"> + <representation mediaType="application/xml" element="capi:version"/> + <representation mediaType="application/json"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <!-- Token Operations --> + <method name="POST" id="authenticate"> + <request> + <representation mediaType="application/xml" element="idm:passwordCredentials"/> + <representation mediaType="application/json"/> + </request> + <response status="200 203"> + <representation mediaType="application/xml" element="idm:auth"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:userDisabled"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="401 403 400 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="GET" id="validateToken"> + <request> + <param name="belongsTo" style="query" + required="false" type="xsd:string"/> + </request> + <response status="200 203"> + <representation mediaType="application/xml" element="idm:auth"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + <representation mediaType="application/xml" element="idm:userDisabled"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 401 403 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="DELETE" id="revokeToken"> + <response status="204"/> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 401 403 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <!-- Tenant Operations --> + <method name="GET" id="getTenants"> + <request> + <param name="marker" style="query" + required="false" type="xsd:string"/> + <param name="limit" style="query" + required="false" type="xsd:int"/> + </request> + <response status="200 203"> + <representation mediaType="application/xml" element="idm:tenants"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 401 403 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="POST" id="createTenant"> + <request> + <representation mediaType="application/xml" element="idm:tenant"/> + <representation mediaType="application/json"/> + </request> + <response status="201"> + <representation mediaType="application/xml" element="idm:tenant"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="409"> + <representation mediaType="application/xml" element="idm:tenantConflict"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="401 403 400 409 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="GET" id="getTenant"> + <response status="200 203"> + <representation mediaType="application/xml" element="idm:tenant"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 401 403 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="PUT" id="updateTenant"> + <request> + <representation mediaType="application/xml" element="idm:tenant"/> + <representation mediaType="application/json"/> + </request> + <response status="200"> + <representation mediaType="application/xml" element="idm:tenant"/> + <representation mediaType="application/json"/> + </response> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="401 403 404 400 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + + <method name="DELETE" id="deleteTenant"> + <response status="204"/> + <response status="401"> + <representation mediaType="application/xml" element="idm:unauthorized"/> + </response> + <response status="403"> + <representation mediaType="application/xml" element="idm:forbidden"/> + </response> + <response status="400"> + <representation mediaType="application/xml" element="idm:badRequest"/> + </response> + <response status="404"> + <representation mediaType="application/xml" element="idm:itemNotFound"/> + </response> + <response status="500"> + <representation mediaType="application/xml" element="idm:idmFault"/> + </response> + <response status="503"> + <representation mediaType="application/xml" element="idm:serviceUnavailable"/> + </response> + <response status="400 401 403 404 500 503"> + <representation mediaType="application/json"/> + </response> + </method> + +</application> diff --git a/docs/guide/src/docbkx/idmdevguide.xml b/docs/guide/src/docbkx/idmdevguide.xml new file mode 100644 index 00000000..4b279cef --- /dev/null +++ b/docs/guide/src/docbkx/idmdevguide.xml @@ -0,0 +1,1018 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE book [<!-- Some useful entities borrowed from HTML --> + <!ENTITY ndash "–"> + <!ENTITY mdash "—"> + <!ENTITY hellip "…"> + + <!-- Useful for describing APIs --> + <!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'> + <!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'> + <!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'> + <!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'> + + + <!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook"> + <imageobject> + <imagedata fileref="img/Check_mark_23x20_02.svg" + format="SVG" scale="60"/> + </imageobject> + </inlinemediaobject>'> + <!ENTITY CODES 'Normal Response Code(s):'> + <!ENTITY ERROR_CODES 'Error Response Code(s):'> + <!ENTITY NO_REQUEST '<para xmlns="http://docbook.org/ns/docbook"> + This operation does not require a request body.</para>'> + <!ENTITY LONG_URI_REFHEAD ' + <thead xmlns="http://docbook.org/ns/docbook"> + <tr> + <td colspan="1">Verb</td> + <td colspan="4">URI</td> + <td colspan="3">Description</td> + </tr> + </thead>'> + <!ENTITY URI_REFHEAD ' + <thead xmlns="http://docbook.org/ns/docbook"> + <tr> + <td colspan="1">Verb</td> + <td colspan="1">URI</td> + <td colspan="4">Description</td> + </tr> + </thead>'> +]> +<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook" version="5.0" status="draft"> + <title>Cloud Identity Developer Guide</title> + <info> + <author> + <personname> + <firstname/> + <surname/> + </personname> + <affiliation> + <orgname>Rackspace Cloud</orgname> + </affiliation> + </author> + <copyright> + <year>2010</year> + <year>2011</year> + <holder>Rackspace Hosting, Inc.</holder> + </copyright> + <releaseinfo>API v1.0</releaseinfo> + <productname>Cloud Identity</productname> + <pubdate>2011-04-23</pubdate> + <legalnotice role="apache2"> + <annotation> + <remark>Copyright details are filled in by the template.</remark> + </annotation> + </legalnotice> + <abstract> + <para> + This document is intended for software developers interested + in developing applications which utilize the Cloud Identity + Service for authentication. This document also includes + details on how to integrate services with the Cloud Identity + Service. + </para> + </abstract> + </info> + <chapter> + <title>Overview</title> + <para> + The Cloud Identity Service allows applications to obtain + tokens that can be used to access OpenStack resources. This + document is intended for software developers interested in + developing applications which utilize the Cloud Identity + Service for authentication. This document also includes + details on how to integrate services with the Cloud Identity + Service. + </para> + <para> + This Guide assumes the reader is familiar with RESTful web + services, HTTP/1.1, and JSON and/or XML serialization formats. + </para> + </chapter> + <chapter> + <title>Concepts</title> + <para> + The Cloud Identity Service has several key concepts that are + important to understand: + </para> + <section> + <title>Token</title> + <para> + A token is an arbitrary bit of text that is used to access + resources. Each token has a scope which describes which + resources are accessible with it. A token may be + revoked at anytime and is valid for a finite duration. + </para> + </section> + <section> + <title>Tenant</title> + <para> + Depending on the operator, a tenant may map to a customer, + account, organization, or project. + </para> + </section> + <section> + <title>User</title> + <para> + Users have a login and may be assigned tokens to access + resources. + </para> + </section> + <section> + <title>Group</title> + <para> + A group of users. Global groups are managed by + operators. They are used to organize and assign privileges + to a group of related users. For example, an operator may + create a "delinquent" group, which will assign limited + privileges to users who have past due bills. + </para> + </section> + </chapter> + <chapter> + <title>General API Information</title> + <para>The IdM API is implemented using a RESTful web service interface. All requests to + authenticate and operate against the IdM API are performed using SSL over HTTP (HTTPS) on TCP + port 443.</para> + <section> + <title>Request/Response Types</title> + <para> The IdM API supports both the JSON and XML data serialization formats. The request + format is specified using the <code>Content-Type</code> header and is required for + operations that have a request body. The response format can be specified in requests using + either the <code>Accept</code> header or adding an <code>.xml</code> or <code>.json</code> + extension to the request URI. Note that it is possible for a response to be serialized using + a format different from the request (see example below). If no response format is specified, + JSON is the default. If conflicting formats are specified using both an <code>Accept</code> + header and a query extension, the query extension takes precedence.</para> + <table rules="all"> + <caption>Response Types</caption> + <thead> + <tr> + <td>Format</td> + <td>Accept Header</td> + <td>Query Extension</td> + <td>Default</td> + </tr> + </thead> + <tbody> + <tr> + <td>JSON</td> + <td>application/json</td> + <td>.json</td> + <td>Yes</td> + </tr> + <tr> + <td>XML</td> + <td>application/xml</td> + <td>.xml</td> + <td>No</td> + </tr> + </tbody> + </table> + <example> + <title>JSON Request with Headers</title> + <programlisting language="xml"> +<xi:include href="samples/samplerequestheader.json" parse="text"/> +</programlisting> + <programlisting language="xml"> +<xi:include href="samples/auth_credentials.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>XML Response with Headers</title> + <programlisting language="xml"> +<xi:include href="samples/sampleresponseheader.json" parse="text"/> +</programlisting> + <programlisting language="xml"> +<xi:include href="samples/auth.xml" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Content Compression</title> + <para>Request and response body data my be encoded with gzip compression in order to + accelerate interactive performance of API calls and responses. This is controlled using the + <code>Accept-Encoding</code> header on the request from the client and indicated by the + <code>Content-Encoding</code> header in the server response. Unless the header is + explicitly set, encoding defaults to disabled.</para> + <table rules="all"> + <caption>Compression Headers</caption> + <thead> + <tr> + <td>Header Type</td> + <td>Name</td> + <td>Value</td> + </tr> + </thead> + <tbody> + <tr> + <td>HTTP/1.1 Request</td> + <td>Accept-Encoding</td> + <td>gzip</td> + </tr> + <tr> + <td>HTTP/1.1 Response</td> + <td>Content-Encoding</td> + <td>gzip</td> + </tr> + </tbody> + </table> + </section> + <section> + <title>Paginated Collections</title> + <para> + To reduce load on the service, list operations will + return a maximum number of items at a time. The + maximum number of items returned is determined by the + IDM provider. To navigate the collection, the + parameters <parameter>limit</parameter> and + <parameter>marker</parameter> can be set in the URI + (e.g.?<parameter>limit</parameter>=100&<parameter>marker</parameter>=1234). + The <parameter>marker</parameter> parameter is the ID + of the last item in the previous list. Items are + sorted by update time. When an update time is not + available they are sorted by ID. The + <parameter>limit</parameter> parameter sets the page + size. Both parameters are optional. If the client + requests a <parameter>limit</parameter> beyond that + which is supported by the deployment an overLimit + (<errorcode>413</errorcode>) fault may be thrown. A + marker with an invalid ID will return an itemNotFound + (<errorcode>404</errorcode>) fault. + </para> + <note> + <para> + Paginated collections never return itemNotFound + (<errorcode>404</errorcode>) faults when the + collection is empty — clients should expect + an empty collection. + </para> + </note> + <para> + For convenience, collections contain atom "next" and + "previous" links. The first page in the list will not + contain a "previous" link, the last page in the list + will not contain a "next" link. The following examples + illustrate three pages in a collection of tenants. The + first page was retrieved via a &GET; to + http://idm.api.openstack.org/v1.0/1234/tenants?limit=1. + In these examples, the <parameter>limit</parameter> + parameter sets the page size to a single item. + Subsequent "next" and "previous" links will honor the + initial page size. Thus, a client may follow links to + traverse a paginated collection without having to + input the <parameter>marker</parameter> parameter. + </para> + <example> + <title>Tenant Collection, First Page: XML</title> + <programlisting language="xml"> +<xi:include href="samples/tenants-1.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Tenant Collection, First Page: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/tenants-1.json" parse="text"/></programlisting> + </example> + <example> + <title>Tenant Collection, Second Page: XML</title> + <programlisting language="xml"> +<xi:include href="samples/tenants-2.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Tenant Collection, Second Page: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/tenants-2.json" parse="text"/></programlisting> + </example> + <example> + <title>Tenant Collection, Last Page: XML</title> + <programlisting language="xml"> +<xi:include href="samples/tenants-3.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Tenant Collection, Last Page: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/tenants-3.json" parse="text"/></programlisting> + </example> + <para> + In the JSON representation, paginated collections contain + a <property>values</property> property that contains the + items in the collections. Links are accessed via the + <property>links</property> property. The approach allows + for extensibility of both the collection members and of + the paginated collection itself. It also allows + collections to be embedded in other objects as illustrated + below. Here, a subset of grups are presented within a + user. Clients must follow the "next" link to continue to + retrive additonal groups belonging to a user. + </para> + <example> + <title>Paginated Groups in a User: XML</title> + <programlisting language="xml"> +<xi:include href="samples/getuser-1.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Paginated Groups in an User: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/getuser-1.json" parse="text"/></programlisting> + </example> + </section> + <section> + <title>Versions</title> + <para> + The OpenStack IDM API uses both a URI and a MIME + type versioning scheme. In the URI scheme, the first + element of the path contains the target version + identifier (e.g. https://idm.api.openstack.org/ + v1.0/…). The MIME type versioning scheme uses + HTTP content negotiation where the <code>Accept</code> + or <code>Content-Type</code> headers contains a MIME + type that identifies the version + (application/vnd.openstack.idm-v1.1+xml). A + version MIME type is always linked to a base MIME type + (application/xml or application/json). If conflicting + versions are specified using both an HTTP header and a + URI, the URI takes precedence. + </para> + <example> + <title>Request with MIME type versioning</title> + <literallayout class="monospaced"> +GET /tenants HTTP/1.1 +Host: idm.api.openstack.org +Accept: application/vnd.openstack.idm-v1.1+xml +X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb + </literallayout> + </example> + <example> + <title>Request with URI versioning</title> + <literallayout class="monospaced"> +GET /v1.1/tenants HTTP/1.1 +Host: idm.api.openstack.org +Accept: application/xml +X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb + </literallayout> + </example> + <note> + <para> + The MIME type versioning approach allows for the + creating of permanent links, because the version + scheme is not specified in the URI path: + https://api.idm.openstack.org/tenants/12234. + </para> + </note> + <para> + If a request is made without a version specified in + the URI or via HTTP headers, then a multiple-choices + response (<returnvalue>300</returnvalue>) will follow + providing links and MIME types to available versions. + </para> + <example> + <title>Multiple Choices Response: XML</title> + <programlisting language="xml"> +<xi:include href="samples/choices.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Multiple Choices Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/choices.json" parse="text"/></programlisting> + </example> + <para> + New features and functionality that do not break + API-compatibility will be introduced in the current + version of the API as extensions (see below) and the + URI and MIME types will remain unchanged. Features or + functionality changes that would necessitate a break + in API-compatibility will require a new version, which + will result in URI and MIME type version being updated + accordingly. When new API versions are released, older + versions will be marked as + <code>DEPRECATED</code>. Providers should work with + developers and partners to ensure there is adequate + time to migrate to the new version before deprecated + versions are discontinued. + </para> + <para> + Your application can programmatically determine + available API versions by performing a &GET; on the + root URL (i.e. with the version and everything to the + right of it truncated) returned from the + authentication system. Note that an Atom + representation of the versions resources is supported + when issuing a request with the <code>Accept</code> + header containing application/atom+xml or by adding a + .atom to the request URI. This allows standard Atom + clients to track version changes. + </para> + <example> + <title>Versions List Request</title> + <literallayout class="monospaced"> +GET HTTP/1.1 +Host: idm.api.openstack.org + </literallayout> + </example> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; badRequest + (<errorcode>400</errorcode>), idmFault + (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + <example> + <title>Versions List Response: XML</title> + <programlisting language="xml"> +<xi:include href="samples/versions.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Versions List Response: Atom</title> + <programlisting language="xml"> +<xi:include href="samples/versions-atom.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Versions List Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/versions.json" parse="text"/></programlisting> + </example> + <para> + You can also obtain additional information about a + specific version by performing a &GET; on the base + version URL + (e.g. https://idm.api.openstack.org/v1.1/). + Version request URLs should always end with a trailing + slash (/). If the slash is omitted, the server may + respond with a <returnvalue>302</returnvalue> + redirection request. Format extensions may be placed + after the slash + (e.g. https://idm.api.openstack.org/v1.1/.xml). Note + that this is a special case that does not hold true + for other API requests. In general, requests such as + /tenants.xml and /tenants/.xml are handled + equivalently. + </para> + <example> + <title>Version Details Request</title> + <literallayout class="monospaced"> +GET HTTP/1.1 +Host: idm.api.openstack.org/v1.1/ + </literallayout> + </example> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; badRequest + (<errorcode>400</errorcode>), idmFault + (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + <example> + <title>Version Details Response: XML</title> + <programlisting language="xml"> +<xi:include href="samples/version.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Version Details Response: Atom</title> + <programlisting language="xml"> +<xi:include href="samples/version-atom.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Version Details Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/version.json" parse="text"/></programlisting> + </example> + <para> + The detailed version response contains pointers to + both a human-readable and a machine-processable + description of the API service. The machine-processable description is written in the Web + Application Description Language (WADL). + </para> + <note> + <para>If there is a discrepancy between the two specifications, the WADL is + authoritative as it contains the most accurate and up-to-date description of the + API service. </para> + </note> + </section> + <section> + <title>Extensions</title> + <para> + The OpenStack IDM API is extensible. Extensions + serve two purposes: They allow the introduction of new + features in the API without requiring a version change + and they allow the introduction of vendor specific + niche functionality. Applications can programmatically + determine what extensions are available by performing + a &GET; on the /extensions URI. Note that this is a + versioned request — that is, an extension + available in one API version may not be available in + another. + </para> + <informaltable rules="all"> + <thead> + <tr> + <td colspan="1">Verb</td> + <td colspan="2">URI</td> + <td colspan="3">Description</td> + </tr> + </thead> + <tbody> + <tr> + <td colspan="1">&GET;</td> + <td colspan="2">/extensions</td> + <td colspan="3">Returns a list of available extensions</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; badRequest + (<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + <para> + Each extension is identified by two unique identifiers, a + <property>namespace</property> and an + <property>alias</property>. Additionally an extension + contains documentation links in various formats. + </para> + <example> + <title>Extensions Response: XML</title> + <programlisting language="xml"> +<xi:include href="samples/extensions.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Extensions Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/extensions.json" parse="text"/></programlisting> + </example> + <para> + Extensions may also be queried individually by their + unique alias. This provides the simplest method of + checking if an extension is available as an unavailable + extension will issue an itemNotFound + (<errorcode>404</errorcode>) response. + </para> + <informaltable rules="all"> + <thead> + <tr> + <td colspan="1">Verb</td> + <td colspan="2">URI</td> + <td colspan="3">Description</td> + </tr> + </thead> + <tbody> + <tr> + <td colspan="1">&GET;</td> + <td colspan="2">/extensions/<parameter>alias</parameter></td> + <td colspan="3">Return details of a single extension</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; itemNotFound + (<errorcode>404</errorcode>), badRequest + (<errorcode>400</errorcode>), idmFault + (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + <example> + <title>Extension Response: xml</title> + <programlisting language="xml"> +<xi:include href="samples/extension.xml" parse="text"/> + </programlisting> + </example> + <example> + <title>Extensions Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/extension.json" parse="text"/></programlisting> + </example> + <para> + Extensions may define new data types, parameters, actions, + headers, states, and resources. In XML, additional + elements and attributes may be defined. These elements + must be defined in the extension's namespace. In JSON, the + alias must be used. The volumes element in the <xref + linkend="UserEXT" xrefstyle="template: Examples %n"/> and + <xref linkend="UserEXTJ" xrefstyle="select: labelnumber"/> + is defined in the <code>RS-META</code> namespace. Extended + headers are always prefixed with <code>X-</code> followed + by the alias and a dash: (<code>X-RS-META-HEADER1</code>). + Parameters must be prefixed with the extension alias + followed by a colon. + </para> + <important> + <para> + Applications should be prepared to ignore response + data that contains extension elements. Also, + applications should also verify that an extension is + available before submitting an extended request. + </para> + </important> + <example xml:id="UserEXT"> + <title>Extended User Response: XML</title> + <programlisting language="xml"> +<xi:include href="samples/ext-getuser.xml" parse="text"/> + </programlisting> + </example> + <example xml:id="UserEXTJ"> + <title>Extended User Response: JSON</title> + <programlisting language="javascript"><xi:include + href="samples/ext-getuser.json" parse="text"/></programlisting> + </example> + </section> + <section> + <title>Faults</title> + <para>When an error occurs the system will return an HTTP error response code denoting the + type of error. The system will also return additional information about the fault in the + body of the response. </para> + <example> + <title>XML Fault Response</title> + <programlisting language="xml"> +<xi:include href="samples/idm_fault.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Fault Response</title> + <programlisting language="javascript"> +<xi:include href="samples/idm_fault.json" parse="text"/> +</programlisting> + </example> + <para>The error code is returned in the body of the response for convenience. The message + section returns a human readable message. The details section is optional and may contain + useful information for tracking down an error (e.g a stack trace). </para> + <para>The root element of the fault (e.g. idmFault) may change depending on the type of error. + The following is an example of an itemNotFound error. </para> + <example> + <title>XML Not Found Fault</title> + <programlisting language="xml"> +<xi:include href="samples/item_not_found.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Not Found Fault</title> + <programlisting language="javascript"> +<xi:include href="samples/item_not_found.json" parse="text"/> +</programlisting> + </example> + <para> The following is a list of possible fault types along with their associated error + codes. </para> + <table rules="all"> + <caption>Fault Types</caption> + <thead> + <tr> + <td>Fault Element</td> + <td>Associated Error Code</td> + <td>Expected in All Requests</td> + </tr> + </thead> + <tbody> + <tr align="center"> + <td>idmFault</td> + <td>500, 400</td> + <td> &CHECK; </td> + </tr> + <tr align="center"> + <td>serviceUnavailable</td> + <td>503</td> + <td> &CHECK; </td> + </tr> + <tr align="center"> + <td>badRequest</td> + <td>400</td> + <td> &CHECK; </td> + </tr> + <tr align="center"> + <td>unauthorized</td> + <td>401</td> + <td> &CHECK; </td> + </tr> + <tr align="center"> + <td>overLimit</td> + <td>413</td> + <td/> + </tr> + <tr align="center"> + <td>userDisabled</td> + <td>403</td> + <td/> + </tr> + <tr align="center"> + <td>forbidden</td> + <td>403</td> + <td/> + </tr> + <tr align="center"> + <td>itemNotFound</td> + <td>404</td> + <td/> + </tr> + <tr align="center"> + <td>tenantConflict</td> + <td>409</td> + <td/> + </tr> + </tbody> + </table> + <para>From an XML schema perspective, all API faults are extensions of the base fault type + <type>idmFault</type>. When working with a system that binds XML to actual classes (such + as JAXB), one should be capable of using <type>idmFault</type> as a “catch-all” if + there's no interest in distinguishing between individual fault types. </para> + </section> + </chapter> + <chapter> + <title>Service Developer Operations</title> + <section> + <title>Overview</title> + <para>The operations described in this chapter allow service developers to get and validate + access tokens, manage users, and manage tenants. </para> + </section> + <section> + <title>Token Operations</title> + <section> + <title>Authenticate</title> + <informaltable rules="all"> + &URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &POST; </td> + <td colspan="1">/token</td> + <td colspan="4">Authenticate to generate a token.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), userDisabled + (<errorcode>403</errorcode>), badRequest (<errorcode>400</errorcode>), idmFault + (<errorcode>500</errorcode>), serviceUnavailable(<errorcode>503</errorcode>)</simpara> + <para> + TenantID is optional and may be used to specify that a + token should be returned that has access for resources + that particular tenant. + </para> + <example> + <title>XML Auth Request</title> + <programlisting language="xml"> + <xi:include href="samples/auth_credentials.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Auth Request</title> + <programlisting language="javascript"> +<xi:include href="samples/auth_credentials.json" parse="text"/> +</programlisting> + </example> + <example> + <title>XML Auth Response</title> + <programlisting language="xml"> +<xi:include href="samples/auth.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Auth Response</title> + <programlisting language="javascript"> +<xi:include href="samples/auth.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Validate Token</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &GET; </td> + <td colspan="4" + >/token/<parameter>tokenId</parameter>?belongsTo=<parameter>tenantId</parameter></td> + <td colspan="3">Check that a token is valid and that it belongs to a particular user + and return the permissions relevant to a particular client.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), forbidden + (<returnvalue>403</returnvalue>), userDisabled(<returnvalue>403</returnvalue>), + badRequest (<errorcode>400</errorcode>), itemNotFound (<errorcode>404</errorcode>), + idmFault(<returnvalue>500</returnvalue>), + serviceUnavailable(<returnvalue>503</returnvalue>)</simpara> + &NO_REQUEST; + <para> + Valid tokens will exist in the + /token/<parameter>tokenId</parameter> path and invalid + tokens will not. In other words, a user should expect an + itemNotFound (<errorcode>404</errorcode>) fault for an + invalid token. + </para> + <example> + <title>XML Validate Token Response</title> + <programlisting language="xml"> +<xi:include href="samples/validatetoken.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Validate Token Response</title> + <programlisting language="javascript"> +<xi:include href="samples/validatetoken.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Revoke Token</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &DELETE; </td> + <td colspan="4">/token/<parameter>tokenId</parameter></td> + <td colspan="3"> Revoke an existing token.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>204</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), forbidden + (<returnvalue>403</returnvalue>), userDisabled(<returnvalue>403</returnvalue>), + badRequest (<errorcode>400</errorcode>), itemNotFound (<errorcode>404</errorcode>), + idmFault(<returnvalue>500</returnvalue>), + serviceUnavailable(<returnvalue>503</returnvalue>)</simpara> + &NO_REQUEST; + </section> + </section> + <section> + <title>Tenant Operations </title> + <section> + <title>Create a Tenant</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &POST; </td> + <td colspan="4">/tenants</td> + <td colspan="3">Create a tenant</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>201</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), + forbidden(<errorcode>403</errorcode>), + badRequest (<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + <example> + <title>XML Tenant Create Request</title> + <programlisting language="xml"> +<xi:include href="samples/tenant.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenant Create Request</title> + <programlisting language="javascript"> +<xi:include href="samples/tenant.json" parse="text"/> +</programlisting> + </example> + <example> + <title>XML Tenant Create Response</title> + <programlisting language="xml"> +<xi:include href="samples/tenant.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenant Create Response</title> + <programlisting language="javascript"> +<xi:include href="samples/tenant.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Get Tenants</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &GET; </td> + <td colspan="4">/tenants</td> + <td colspan="3">Get a list of tenants.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), + forbidden(<errorcode>403</errorcode>), overLimit(<errorcode>413</errorcode>), + badRequest (<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + <para> + The operation returns a list of tenants. The list may be + filtered to return only those tenants which the caller has + access to. + </para> + &NO_REQUEST; + <example> + <title>XML Tenants Response</title> + <programlisting language="xml"> +<xi:include href="samples/tenants.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenants Response</title> + <programlisting language="javascript"> +<xi:include href="samples/tenants.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Get a Tenant</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &GET; </td> + <td colspan="4">/tenants/<parameter>tenantId</parameter></td> + <td colspan="3">Get a tenant.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), + forbidden(<errorcode>403</errorcode>), itemNotFound(<errorcode>404</errorcode>), + badRequest (<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + <example> + <title>XML Tenant Response</title> + <programlisting language="xml"> +<xi:include href="samples/tenant.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenant Response</title> + <programlisting language="javascript"> +<xi:include href="samples/tenant.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Update a Tenant</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &PUT; </td> + <td colspan="4">/tenants/<parameter>tenantId</parameter></td> + <td colspan="3">Update a tenant..</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>200</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), + forbidden(<errorcode>403</errorcode>), itemNotFound(<errorcode>404</errorcode>), + badRequest (<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + <example> + <title>XML Tenant Update Request</title> + <programlisting language="xml"> +<xi:include href="samples/tenantlock.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenant Update Request</title> + <programlisting language="javascript"> +<xi:include href="samples/tenantlock.json" parse="text"/> +</programlisting> + </example> + <example> + <title>XML Tenant Update Response</title> + <programlisting language="xml"> +<xi:include href="samples/updatedtenant.xml" parse="text"/> +</programlisting> + </example> + <example> + <title>JSON Tenant Update Response</title> + <programlisting language="javascript"> +<xi:include href="samples/updatedtenant.json" parse="text"/> +</programlisting> + </example> + </section> + <section> + <title>Delete a Tenant</title> + <informaltable rules="all"> + &LONG_URI_REFHEAD; + <tbody> + <tr> + <td colspan="1"> &DELETE; </td> + <td colspan="4">/tenants/<parameter>tenantId</parameter></td> + <td colspan="3">Delete a Tenant.</td> + </tr> + </tbody> + </informaltable> + <simpara>&CODES;<returnvalue>204</returnvalue></simpara> + <simpara>&ERROR_CODES; unauthorized (<errorcode>401</errorcode>), badRequest + (<errorcode>400</errorcode>), forbidden (<errorcode>403</errorcode>), itemNotFound + (<errorcode>404</errorcode>), idmFault (<errorcode>500</errorcode>), + serviceUnavailable(<errorcode>503</errorcode>)</simpara> + &NO_REQUEST; + </section> + </section> + </chapter> +</book> diff --git a/docs/guide/src/docbkx/img/Check_mark_23x20_02.svg b/docs/guide/src/docbkx/img/Check_mark_23x20_02.svg new file mode 100644 index 00000000..3051a2f9 --- /dev/null +++ b/docs/guide/src/docbkx/img/Check_mark_23x20_02.svg @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="19.21315" + height="18.294994" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.45" + sodipodi:modified="true" + version="1.0"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="7.9195959" + inkscape:cx="17.757032" + inkscape:cy="7.298821" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="984" + inkscape:window-height="852" + inkscape:window-x="148" + inkscape:window-y="66" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-192.905,-516.02064)"> + <path + style="fill:#000000" + d="M 197.67968,534.31563 C 197.40468,534.31208 196.21788,532.53719 195.04234,530.37143 L 192.905,526.43368 L 193.45901,525.87968 C 193.76371,525.57497 194.58269,525.32567 195.27896,525.32567 L 196.5449,525.32567 L 197.18129,527.33076 L 197.81768,529.33584 L 202.88215,523.79451 C 205.66761,520.74678 208.88522,517.75085 210.03239,517.13691 L 212.11815,516.02064 L 207.90871,520.80282 C 205.59351,523.43302 202.45735,527.55085 200.93947,529.95355 C 199.42159,532.35625 197.95468,534.31919 197.67968,534.31563 z " + id="path2223" /> + </g> +</svg> diff --git a/docs/guide/src/docbkx/samples/auth.json b/docs/guide/src/docbkx/samples/auth.json new file mode 100644 index 00000000..fa56c131 --- /dev/null +++ b/docs/guide/src/docbkx/samples/auth.json @@ -0,0 +1,19 @@ +{ + "auth" : { + "token": { + "id": "ab48a9efdfedb23ty3494", + "expires": "2010-11-01T03:32:15-05:00" + }, + "user" : { + "groups": { + "group": [ + { + "tenantId" : "1234", + "id": "Admin" + } + ]}, + "username": "jqsmith", + "tenantId": "1234" + } + } +} diff --git a/docs/guide/src/docbkx/samples/auth.xml b/docs/guide/src/docbkx/samples/auth.xml new file mode 100644 index 00000000..df8d69d0 --- /dev/null +++ b/docs/guide/src/docbkx/samples/auth.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<auth xmlns="http://docs.openstack.org/idm/api/v1.0"> + <token expires="2010-11-01T03:32:15-05:00" + id="ab48a9efdfedb23ty3494"/> + <user tenantId="1245" username="jqsmith"> + <groups> + <group tenantId="1245" id="Admin"/> + </groups> + </user> +</auth> diff --git a/docs/guide/src/docbkx/samples/auth_credentials.json b/docs/guide/src/docbkx/samples/auth_credentials.json new file mode 100644 index 00000000..67b06304 --- /dev/null +++ b/docs/guide/src/docbkx/samples/auth_credentials.json @@ -0,0 +1,7 @@ +{ + "passwordCredentials" : { + "username" : "test_user", + "password" : "a86850deb2742ec3cb41518e26aa2d89", + "tenantId" : "77654" + } +} diff --git a/docs/guide/src/docbkx/samples/auth_credentials.xml b/docs/guide/src/docbkx/samples/auth_credentials.xml new file mode 100644 index 00000000..fbdf5633 --- /dev/null +++ b/docs/guide/src/docbkx/samples/auth_credentials.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<passwordCredentials + xmlns="http://docs.openstack.org/idm/api/v1.0" + password="P@ssword1" username="testuser" + tenantId="77654"/> diff --git a/docs/guide/src/docbkx/samples/choices.json b/docs/guide/src/docbkx/samples/choices.json new file mode 100644 index 00000000..6b0b2607 --- /dev/null +++ b/docs/guide/src/docbkx/samples/choices.json @@ -0,0 +1,50 @@ +{ + "choices" : { + "values" : [ + { + "id" : "v1.0", + "status" : "DEPRECATED", + "links": [ + { + "rel" : "self", + "href" : "http://idm.api.openstack.org/v1.0/tenants/12" + } + ], + "media-types": { + "values" : [ + { + "base" : "application/xml", + "type" : "application/vnd.openstack.idm-v1.0+xml" + }, + { + "base" : "application/json", + "type" : "application/vnd.openstack.idm-v1.0+json" + } + ] + } + }, + { + "id" : "v1.1", + "status" : "CURRENT", + "links": [ + { + "rel" : "self", + "href" : "http://idm.api.openstack.org/v1.1/tenants/12" + } + ], + "media-types": { + "values" : [ + { + "base" : "application/xml", + "type" : "application/vnd.openstack.idm-v1.1+xml" + }, + { + "base" : "application/json", + "type" : "application/vnd.openstack.idm-v1.1+json" + } + ] + } + } + ] + } +} diff --git a/docs/guide/src/docbkx/samples/choices.xml b/docs/guide/src/docbkx/samples/choices.xml new file mode 100644 index 00000000..a9a91ece --- /dev/null +++ b/docs/guide/src/docbkx/samples/choices.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<choices xmlns="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + + <version id="v1.0" status="DEPRECATED"> + <media-types> + <media-type base="application/xml" + type="application/vnd.openstack.idm-v1.0+xml"/> + <media-type base="application/json" + type="application/vnd.openstack.idm-v1.0+json"/> + </media-types> + + <atom:link rel="self" + href="http://idm.api.openstack.org/v1.0/tenants/12"/> + </version> + + <version id="v1.1" status="CURRENT"> + <media-types> + <media-type base="application/xml" + type="application/vnd.openstack.idm-v1.1+xml"/> + <media-type base="application/json" + type="application/vnd.openstack.idm-v1.1+json"/> + </media-types> + + <atom:link rel="self" + href="http://idm.api.openstack.org/v1.1/tenants/12"/> + </version> +</choices> diff --git a/docs/guide/src/docbkx/samples/ext-getuser.json b/docs/guide/src/docbkx/samples/ext-getuser.json new file mode 100644 index 00000000..03f74dda --- /dev/null +++ b/docs/guide/src/docbkx/samples/ext-getuser.json @@ -0,0 +1,21 @@ +{"user": + { + "groups": { + "values": [ + { + "tenantId" : "1234", + "id": "Admin" + } + ]}, + "id": "jqsmith", + "tenantId": "1234", + "email": "john.smith@example.org", + "enabled": true, + "RS-META:metadata" : { + "values" : { + "MetaKey1" : "MetaValue1", + "MetaKey2" : "MetaValue2" + } + }, + } +} diff --git a/docs/guide/src/docbkx/samples/ext-getuser.xml b/docs/guide/src/docbkx/samples/ext-getuser.xml new file mode 100644 index 00000000..07c185b1 --- /dev/null +++ b/docs/guide/src/docbkx/samples/ext-getuser.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<user xmlns="http://docs.openstack.org/idm/api/v1.0" + enabled="true" email="john.smith@example.org" + tenantId="1234" id="jqsmith"> + <groups> + <group tenantId="1234" id="Admin"/> + </groups> + <metadata + xmlns="http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0"> + <meta key="MetaKey1">MetaValue1</meta> + <meta key="MetaKey2">MetaValue2</meta> + </metadata> +</user> diff --git a/docs/guide/src/docbkx/samples/extension.json b/docs/guide/src/docbkx/samples/extension.json new file mode 100644 index 00000000..1d7e8bb3 --- /dev/null +++ b/docs/guide/src/docbkx/samples/extension.json @@ -0,0 +1,21 @@ +{ + "extension" : { + "name" : "User Metadata Extension", + "namespace" : "http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0", + "alias" : "RS-META", + "updated" : "2011-01-12T11:22:33-06:00", + "description" : "Allows associating arbritrary metadata with a user.", + "links" : [ + { + "rel" : "describedby", + "type" : "application/pdf", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-meta-20111201.pdf" + }, + { + "rel" : "describedby", + "type" : "application/vnd.sun.wadl+xml", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-cbs.wadl" + } + ] + } +} diff --git a/docs/guide/src/docbkx/samples/extension.xml b/docs/guide/src/docbkx/samples/extension.xml new file mode 100644 index 00000000..8d932f49 --- /dev/null +++ b/docs/guide/src/docbkx/samples/extension.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<extension xmlns="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom" + name="User Metadata Extension" + namespace="http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0" + alias="RS-META" + updated="2011-01-12T11:22:33-06:00"> + + <description> + Allows associating arbritrary metadata with a user. + </description> + + <atom:link rel="describedby" + type="application/pdf" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-meta-20111201.pdf"/> + <atom:link rel="describedby" + type="application/vnd.sun.wadl+xml" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-meta.wadl"/> + +</extension> + + diff --git a/docs/guide/src/docbkx/samples/extensions.json b/docs/guide/src/docbkx/samples/extensions.json new file mode 100644 index 00000000..11064a90 --- /dev/null +++ b/docs/guide/src/docbkx/samples/extensions.json @@ -0,0 +1,44 @@ +{ + "extensions" : { + "values" : [ + { + "name" : "Reset Password Extension", + "namespace" : "http://docs.rackspacecloud.com/idm/api/ext/rpe/v1.0", + "alias" : "RS-RPE", + "updated" : "2011-01-22T13:25:27-06:00", + "description" : "Adds the capability to reset a user's password. The user is emailed when the password has been reset.", + "links" : [ + { + "rel" : "describedby", + "type" : "application/pdf", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-rpe-20111111.pdf" + }, + { + "rel" : "describedby", + "type" : "application/vnd.sun.wadl+xml", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-rpe.wadl" + } + ] + }, + { + "name" : "User Metadata Extension", + "namespace" : "http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0", + "alias" : "RS-META", + "updated" : "2011-01-12T11:22:33-06:00", + "description" : "Allows associating arbritrary metadata with a user.", + "links" : [ + { + "rel" : "describedby", + "type" : "application/pdf", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-meta-20111201.pdf" + }, + { + "rel" : "describedby", + "type" : "application/vnd.sun.wadl+xml", + "href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-meta.wadl" + } + ] + } + ] + } +} diff --git a/docs/guide/src/docbkx/samples/extensions.xml b/docs/guide/src/docbkx/samples/extensions.xml new file mode 100644 index 00000000..ddd7e173 --- /dev/null +++ b/docs/guide/src/docbkx/samples/extensions.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<extensions xmlns="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + <extension + name="Reset Password Extension" + namespace="http://docs.rackspacecloud.com/idm/api/ext/rpe/v1.0" + alias="RS-RPE" + updated="2011-01-22T13:25:27-06:00"> + + <description> + Adds the capability to reset a user's password. The user is + emailed when the password has been reset. + </description> + + <atom:link rel="describedby" + type="application/pdf" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-rpe-20111111.pdf"/> + <atom:link rel="describedby" + type="application/vnd.sun.wadl+xml" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-rpe.wadl"/> + </extension> + <extension + name="User Metadata Extension" + namespace="http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0" + alias="RS-META" + updated="2011-01-12T11:22:33-06:00"> + <description> + Allows associating arbritrary metadata with a user. + </description> + + <atom:link rel="describedby" + type="application/pdf" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-meta-20111201.pdf"/> + <atom:link rel="describedby" + type="application/vnd.sun.wadl+xml" + href="http://docs.rackspacecloud.com/idm/api/ext/idm-meta.wadl"/> + </extension> +</extensions> diff --git a/docs/guide/src/docbkx/samples/getuser-1.json b/docs/guide/src/docbkx/samples/getuser-1.json new file mode 100644 index 00000000..544d4600 --- /dev/null +++ b/docs/guide/src/docbkx/samples/getuser-1.json @@ -0,0 +1,29 @@ +{"user": + { + "groups": { + "values": [ + { + "tenantId" : "1234", + "id": "Admin" + }, + { + "tenantId" : "1234", + "id" : "DBUser" + }, + { + "id" : "Super" + } + ], + "links" : [ + { + "rel" : "next", + "href" : "http://idm.api.openstack.org/v1.0/1234/tenants/1234/users/jqsmith/groups?marker=Super" + } + ] + }, + "id": "jqsmith", + "tenantId": "1234", + "email": "john.smith@example.org", + "enabled": true + } +} diff --git a/docs/guide/src/docbkx/samples/getuser-1.xml b/docs/guide/src/docbkx/samples/getuser-1.xml new file mode 100644 index 00000000..2b513072 --- /dev/null +++ b/docs/guide/src/docbkx/samples/getuser-1.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<user xmlns="http://docs.openstack.org/idm/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom" + enabled="true" email="john.smith@example.org" + tenantId="1234" id="jqsmith"> + <groups> + <group tenantId="1234" id="Admin"/> + <group tenantId="1234" id="DBUser"/> + <group id="Super"/> + <atom:link + rel="next" + href="http://idm.api.openstack.org/v1.0/1234/tenants/1234/users/jqsmith/groups?marker=Super"/> + </groups> +</user> diff --git a/docs/guide/src/docbkx/samples/idm_fault.json b/docs/guide/src/docbkx/samples/idm_fault.json new file mode 100644 index 00000000..84e3908e --- /dev/null +++ b/docs/guide/src/docbkx/samples/idm_fault.json @@ -0,0 +1,7 @@ +{"idmFault": + { + "message": "Fault", + "details": "Error Details...", + "code": 500 + } +}
\ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/idm_fault.xml b/docs/guide/src/docbkx/samples/idm_fault.xml new file mode 100644 index 00000000..e0f695f2 --- /dev/null +++ b/docs/guide/src/docbkx/samples/idm_fault.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<idmFault xmlns="http://docs.openstack.org/idm/api/v1.0" + code="500"> + <message>Fault</message> + <details>Error Details...</details> +</idmFault> diff --git a/docs/guide/src/docbkx/samples/item_not_found.json b/docs/guide/src/docbkx/samples/item_not_found.json new file mode 100644 index 00000000..dda88a59 --- /dev/null +++ b/docs/guide/src/docbkx/samples/item_not_found.json @@ -0,0 +1,7 @@ +{"itemNotFound": + { + "message": "Item not found.", + "details": "Error Details...", + "code": 404 + } +}
\ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/item_not_found.xml b/docs/guide/src/docbkx/samples/item_not_found.xml new file mode 100644 index 00000000..f967b76a --- /dev/null +++ b/docs/guide/src/docbkx/samples/item_not_found.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<itemNotFound xmlns="http://docs.openstack.org/idm/api/v1.0" + code="404"> + <message>Item not found.</message> + <details>Error Details...</details> +</itemNotFound> diff --git a/docs/guide/src/docbkx/samples/samplerequestheader.json b/docs/guide/src/docbkx/samples/samplerequestheader.json new file mode 100644 index 00000000..a4647076 --- /dev/null +++ b/docs/guide/src/docbkx/samples/samplerequestheader.json @@ -0,0 +1,4 @@ +POST /v1.0/token HTTP/1.1 +Host: idm.api.rackspace.com +Content-Type: application/json +Accept: application/xml
\ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/sampleresponseheader.json b/docs/guide/src/docbkx/samples/sampleresponseheader.json new file mode 100644 index 00000000..0b08f684 --- /dev/null +++ b/docs/guide/src/docbkx/samples/sampleresponseheader.json @@ -0,0 +1,5 @@ +HTTP/1.1 200 OKAY +Date: Mon, 12 Nov 2010 15:55:01 GMT +Server: Apache +Content-Length: +Content-Type: application/xml; charset=UTF-8
\ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/tenant.json b/docs/guide/src/docbkx/samples/tenant.json new file mode 100644 index 00000000..7ff7ce32 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenant.json @@ -0,0 +1,7 @@ +{"tenant": + { + "id": "1234", + "description": "A description ...", + "enabled": true + } +} diff --git a/docs/guide/src/docbkx/samples/tenant.xml b/docs/guide/src/docbkx/samples/tenant.xml new file mode 100644 index 00000000..ea6a63dc --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenant.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" + enabled="true" id="1234"> + <description>A description...</description> +</tenant> diff --git a/docs/guide/src/docbkx/samples/tenantlock.json b/docs/guide/src/docbkx/samples/tenantlock.json new file mode 100644 index 00000000..584c21a4 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenantlock.json @@ -0,0 +1,5 @@ +{"tenant": + { + "description": "A NEW description..." + } +}
\ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/tenantlock.xml b/docs/guide/src/docbkx/samples/tenantlock.xml new file mode 100644 index 00000000..9d7081d4 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenantlock.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenant xmlns="http://docs.openstack.org/idm/api/v1.0"> + <description>A NEW description...</description> +</tenant> diff --git a/docs/guide/src/docbkx/samples/tenants-1.json b/docs/guide/src/docbkx/samples/tenants-1.json new file mode 100644 index 00000000..6f45f1c8 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-1.json @@ -0,0 +1,16 @@ +{ +"tenants": { + "values" : [ + { + "id": "1234", + "description": "A description ...", + "enabled": true + } + ], + "links" : [ + { + "rel" : "next", + "href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234" + } + ] +} diff --git a/docs/guide/src/docbkx/samples/tenants-1.xml b/docs/guide/src/docbkx/samples/tenants-1.xml new file mode 100644 index 00000000..67101816 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-1.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenants xmlns="http://docs.openstack.org/idm/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + <tenant enabled="true" id="1234"> + <description>A description...</description> + </tenant> + <atom:link + rel="next" + href="http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234"/> +</tenants> diff --git a/docs/guide/src/docbkx/samples/tenants-2.json b/docs/guide/src/docbkx/samples/tenants-2.json new file mode 100644 index 00000000..7cb3ca6b --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-2.json @@ -0,0 +1,20 @@ +{ +"tenants": { + "values" : [ + { + "id": "3645", + "description": "A description ...", + "enabled": true + } + ], + "links" : [ + { + "rel" : "next", + "href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=3645" + }, + { + "rel" : "previous", + "href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1" + } + ] +} diff --git a/docs/guide/src/docbkx/samples/tenants-2.xml b/docs/guide/src/docbkx/samples/tenants-2.xml new file mode 100644 index 00000000..7be4f537 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-2.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenants xmlns="http://docs.openstack.org/idm/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + <tenant enabled="true" id="3645"> + <description>A description...</description> + </tenant> + <atom:link + rel="previous" + href="http://idm.api.openstack.org/v1.0/1234/tenants?limit=1"/> + <atom:link + rel="next" + href="http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=3645"/> +</tenants> diff --git a/docs/guide/src/docbkx/samples/tenants-3.json b/docs/guide/src/docbkx/samples/tenants-3.json new file mode 100644 index 00000000..febcf225 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-3.json @@ -0,0 +1,16 @@ +{ +"tenants": { + "values" : [ + { + "id": "9999", + "description": "A description ...", + "enabled": true + } + ], + "links" : [ + { + "rel" : "previous", + "href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234" + } + ] +} diff --git a/docs/guide/src/docbkx/samples/tenants-3.xml b/docs/guide/src/docbkx/samples/tenants-3.xml new file mode 100644 index 00000000..5e5b49fa --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants-3.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenants xmlns="http://docs.openstack.org/idm/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + <tenant enabled="true" id="9999"> + <description>A description...</description> + </tenant> + <atom:link + rel="previous" + href="http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234"/> +</tenants> diff --git a/docs/guide/src/docbkx/samples/tenants.json b/docs/guide/src/docbkx/samples/tenants.json new file mode 100644 index 00000000..7fb848f7 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants.json @@ -0,0 +1,15 @@ +{"tenants": { + "values" : [ + { + "id": "1234", + "description": "A description ...", + "enabled": true + }, + { + "id": "3456", + "description": "A description ...", + "enabled": true + } + ] +} +} diff --git a/docs/guide/src/docbkx/samples/tenants.xml b/docs/guide/src/docbkx/samples/tenants.xml new file mode 100644 index 00000000..9b503ce2 --- /dev/null +++ b/docs/guide/src/docbkx/samples/tenants.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenants xmlns="http://docs.openstack.org/idm/api/v1.0"> + <tenant enabled="true" id="1234"> + <description>A description...</description> + </tenant> + <tenant enabled="true" id="3645"> + <description>A description...</description> + </tenant> +</tenants> diff --git a/docs/guide/src/docbkx/samples/updatedtenant.json b/docs/guide/src/docbkx/samples/updatedtenant.json new file mode 100644 index 00000000..05df6a3a --- /dev/null +++ b/docs/guide/src/docbkx/samples/updatedtenant.json @@ -0,0 +1,7 @@ +{"tenant": + { + "id": "1234", + "description": "A NEW description...", + "enabled": true + } +} diff --git a/docs/guide/src/docbkx/samples/updatedtenant.xml b/docs/guide/src/docbkx/samples/updatedtenant.xml new file mode 100644 index 00000000..8bcce9bf --- /dev/null +++ b/docs/guide/src/docbkx/samples/updatedtenant.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" + enabled="true" id="1234"> + <description>A NEW description...</description> +</tenant> diff --git a/docs/guide/src/docbkx/samples/validatetoken.json b/docs/guide/src/docbkx/samples/validatetoken.json new file mode 100644 index 00000000..c4721873 --- /dev/null +++ b/docs/guide/src/docbkx/samples/validatetoken.json @@ -0,0 +1,19 @@ +{ + "auth" : { + "token": { + "id": "ab48a9efdfedb23ty3494", + "expires": "2010-11-01T03:32:15-05:00" + }, + "user" : { + "groups": { + "group": [ + { + "tenantId" : "1234", + "name": "Admin" + } + ]}, + "username": "jqsmith", + "tenantId": "1234", + } + } +} diff --git a/docs/guide/src/docbkx/samples/validatetoken.xml b/docs/guide/src/docbkx/samples/validatetoken.xml new file mode 100644 index 00000000..b091c7af --- /dev/null +++ b/docs/guide/src/docbkx/samples/validatetoken.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<auth xmlns="http://docs.openstack.org/idm/api/v1.0"> + <token expires="2010-11-01T03:32:15-05:00" + id="ab48a9efdfedb23ty3494"/> + <user tenantId="1245" username="jqsmith"> + <groups> + <group tenantId="1245" name="Admin"/> + </groups> + </user> +</auth> diff --git a/docs/guide/src/docbkx/samples/version-atom.xml b/docs/guide/src/docbkx/samples/version-atom.xml new file mode 100644 index 00000000..8cf3dc88 --- /dev/null +++ b/docs/guide/src/docbkx/samples/version-atom.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <title type="text">About This Version</title> + <updated>2011-01-21T11:33:21-06:00</updated> + <id>http://idm.api.openstack.org/v1.0/</id> + <author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author> + <link rel="self" href="http://idm.api.openstack.org/v1.0/"/> + <entry> + <id>http://idm.api.openstack.org/v1.0/</id> + <title type="text">Version v1.0</title> + <updated>2011-01-21T11:33:21-06:00</updated> + <link rel="self" href="http://idm.api.openstack.org/v1.0/"/> + <link rel="describedby" type="application/pdf" + href="http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf"/> + <link rel="describedby" type="application/vnd.sun.wadl+xml" + href="http://docs.rackspacecloud.com/idm/api/v1.0/application.wadl"/> + <content type="text">Version v1.0 CURRENT (2011-01-21T11:33:21-06:00)</content> + </entry> +</feed> diff --git a/docs/guide/src/docbkx/samples/version.json b/docs/guide/src/docbkx/samples/version.json new file mode 100644 index 00000000..74bae5bd --- /dev/null +++ b/docs/guide/src/docbkx/samples/version.json @@ -0,0 +1,33 @@ +{ + "version" : { + "id" : "v1.0", + "status" : "CURRENT", + "updated" : "2011-01-21T11:33:21-06:00", + "links": [ + { + "rel" : "self", + "href" : "http://idm.api.openstack.org/v1.0/" + }, + { + "rel" : "describedby", + "type" : "application/pdf", + "href" : "http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf" + }, + { + "rel" : "describedby", + "type" : "application/vnd.sun.wadl+xml", + "href" : "http://docs.rackspacecloud.com/idm/api/v1.0/application.wadl" + } + ], + "media-types": [ + { + "base" : "application/xml", + "type" : "application/vnd.openstack.idm-v1.0+xml" + }, + { + "base" : "application/json", + "type" : "application/vnd.openstack.idm-v1.0+json" + } + ] + } +} diff --git a/docs/guide/src/docbkx/samples/version.xml b/docs/guide/src/docbkx/samples/version.xml new file mode 100644 index 00000000..4f499322 --- /dev/null +++ b/docs/guide/src/docbkx/samples/version.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<version xmlns="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom" + id="v1.0" status="CURRENT" updated="2011-01-21T11:33:21-06:00"> + + <media-types> + <media-type base="application/xml" + type="application/vnd.openstack.idm-v1.0+xml"/> + <media-type base="application/json" + type="application/vnd.openstack.idm-v1.0+json"/> + </media-types> + + <atom:link rel="self" + href="http://idm.api.openstack.org/v1.0/"/> + + <atom:link rel="describedby" + type="application/pdf" + href="http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf" /> + + <atom:link rel="describedby" + type="application/vnd.sun.wadl+xml" + href="http://docs.rackspacecloud.com/idm/api/v1.0/application.wadl" /> +</version> diff --git a/docs/guide/src/docbkx/samples/versions-atom.xml b/docs/guide/src/docbkx/samples/versions-atom.xml new file mode 100644 index 00000000..e75cf416 --- /dev/null +++ b/docs/guide/src/docbkx/samples/versions-atom.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <title type="text">Available API Versions</title> + <updated>2010-12-12T18:30:02.25Z</updated> + <id>http://idm.api.openstack.org/</id> + <author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author> + <link rel="self" href="http://idm.api.openstack.org/"/> + <entry> + <id>http://idm.api.openstack.org/v1.1/</id> + <title type="text">Version v1.1</title> + <updated>2010-12-12T18:30:02.25Z</updated> + <link rel="self" href="http://idm.api.openstack.org/v1.1/"/> + <content type="text">Version v1.1 CURRENT (2010-12-12T18:30:02.25Z)</content> + </entry> + <entry> + <id>http://idm.api.openstack.org/v1.0/</id> + <title type="text">Version v1.0</title> + <updated>2009-10-09T11:30:00Z</updated> + <link rel="self" href="http://idm.api.openstack.org/v1.0/"/> + <content type="text">Version v1.0 DEPRECATED (2009-10-09T11:30:00Z)</content> + </entry> +</feed> diff --git a/docs/guide/src/docbkx/samples/versions.json b/docs/guide/src/docbkx/samples/versions.json new file mode 100644 index 00000000..330a26e9 --- /dev/null +++ b/docs/guide/src/docbkx/samples/versions.json @@ -0,0 +1,28 @@ +{ + "versions" : { + "values" : [ + { + "id" : "v1.0", + "status" : "DEPRECATED", + "updated" : "2009-10-09T11:30:00Z", + "links": [ + { + "rel" : "self", + "href" : "http://idm.api.openstack.org/v1.0/" + } + ] + }, + { + "id" : "v1.1", + "status" : "CURRENT", + "updated" : "2010-12-12T18:30:02.25Z", + "links": [ + { + "rel" : "self", + "href" : "http://idm.api.openstack.org/v1.1/" + } + ] + } + ] + } +} diff --git a/docs/guide/src/docbkx/samples/versions.xml b/docs/guide/src/docbkx/samples/versions.xml new file mode 100644 index 00000000..7c3b1535 --- /dev/null +++ b/docs/guide/src/docbkx/samples/versions.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<versions xmlns="http://docs.openstack.org/common/api/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom"> + + <version id="v1.0" status="DEPRECATED" + updated="2009-10-09T11:30:00Z"> + <atom:link rel="self" + href="http://idm.api.openstack.org/v1.0/"/> + </version> + + <version id="v1.1" status="CURRENT" + updated="2010-12-12T18:30:02.25Z"> + <atom:link rel="self" + href="http://idm.api.openstack.org/v1.1/"/> + </version> + +</versions> diff --git a/docs/guide/src/docbkx/xsd/api-common.xsd b/docs/guide/src/docbkx/xsd/api-common.xsd new file mode 100644 index 00000000..5e8ebeda --- /dev/null +++ b/docs/guide/src/docbkx/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/docs/guide/src/docbkx/xsd/api.xsd b/docs/guide/src/docbkx/xsd/api.xsd new file mode 100644 index 00000000..eaa11c17 --- /dev/null +++ b/docs/guide/src/docbkx/xsd/api.xsd @@ -0,0 +1,14 @@ +<?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/idm/api/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://docs.openstack.org/idm/api/v1.0" +> + <include schemaLocation="token.xsd"/> + <include schemaLocation="tenant.xsd"/> + <include schemaLocation="fault.xsd"/> +</schema> diff --git a/docs/guide/src/docbkx/xsd/atom/atom.xsd b/docs/guide/src/docbkx/xsd/atom/atom.xsd new file mode 100644 index 00000000..a619efaa --- /dev/null +++ b/docs/guide/src/docbkx/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</html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="type" use="optional" type="xs:string"> + <xs:annotation> + <xs:documentation> + <html:p>TODO</html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="href" use="required" type="xs:anyURI"> + <xs:annotation> + <xs:documentation> + <html:p>TODO</html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN"> + <xs:annotation> + <xs:documentation> + <html:p>TODO</html:p> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="title" use="optional" type="xs:string"> + <xs:annotation> + <xs:documentation> + <html:p>TODO</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/docs/guide/src/docbkx/xsd/atom/xml.xsd b/docs/guide/src/docbkx/xsd/atom/xml.xsd new file mode 100644 index 00000000..aea7d0db --- /dev/null +++ b/docs/guide/src/docbkx/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> + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + </pre> + <p> + or + </p> + <pre> + <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> + <type . . .> + . . . + <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/docs/guide/src/docbkx/xsd/extensions.xsd b/docs/guide/src/docbkx/xsd/extensions.xsd new file mode 100644 index 00000000..a942f0a1 --- /dev/null +++ b/docs/guide/src/docbkx/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/docs/guide/src/docbkx/xsd/fault.xsd b/docs/guide/src/docbkx/xsd/fault.xsd new file mode 100644 index 00000000..8701b9f7 --- /dev/null +++ b/docs/guide/src/docbkx/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:idm="http://docs.openstack.org/idm/api/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://docs.openstack.org/idm/api/v1.0" +> + <!-- Fault Elements --> + <element name="idmFault" type="idm:IDMFault"/> + <element name="serviceUnavailable" type="idm:ServiceUnavailableFault"/> + <element name="badRequest" type="idm:BadRequestFault"/> + <element name="unauthorized" type="idm:UnauthorizedFault"/> + <element name="overLimit" type="idm:OverLimitFault"/> + <element name="userDisabled" type="idm:UserDisabledFault"/> + <element name="forbidden" type="idm:ForbiddenFault"/> + <element name="itemNotFound" type="idm:ItemNotFoundFault"/> + <element name="tenantConflict" type="idm:TenantConflictFault"/> + + <!-- Fault Types --> + <complexType name="IDMFault"> + <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 <details> 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="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="BadRequestFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="UnauthorizedFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="UserDisabledFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="ForbiddenFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="ItemNotFoundFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="TenantConflictFault"> + <complexContent> + <extension base="idm:IDMFault"> + </extension> + </complexContent> + </complexType> + + <complexType name="OverLimitFault"> + <complexContent> + <extension base="idm:IDMFault"> + <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/docs/guide/src/docbkx/xsd/tenant.xsd b/docs/guide/src/docbkx/xsd/tenant.xsd new file mode 100644 index 00000000..2e4854fb --- /dev/null +++ b/docs/guide/src/docbkx/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:idm="http://docs.openstack.org/idm/api/v1.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/idm/api/v1.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="idm:Tenant" /> + <element name="tenants" type="idm:Tenants" /> + + <!-- Complex Types --> + <complexType name="Tenants"> + <sequence> + <element name="tenant" type="idm: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/docs/guide/src/docbkx/xsd/token.xsd b/docs/guide/src/docbkx/xsd/token.xsd new file mode 100644 index 00000000..80bcb029 --- /dev/null +++ b/docs/guide/src/docbkx/xsd/token.xsd @@ -0,0 +1,72 @@ +<?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/idm/api/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://docs.openstack.org/idm/api/v1.0" +> + <!-- Elements --> + <element name="passwordCredentials" type="idm:PasswordCredentials"/> + <element name="auth" type="idm:AuthData"/> + + <!-- Complex Types --> + <complexType name="Credentials" abstract="true" /> + <complexType name="PasswordCredentials"> + <complexContent> + <extension base="idm: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="idm:Token"/> + <element name="user" type="idm:User"/> + <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="User"> + <sequence> + <element name="groups" type="idm:Groups" /> + <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="idm: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> +</schema> diff --git a/docs/guide/src/docbkx/xsd/version.xsd b/docs/guide/src/docbkx/xsd/version.xsd new file mode 100644 index 00000000..6b2403bd --- /dev/null +++ b/docs/guide/src/docbkx/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> |
