Move to v2.0
This commit is contained in:
parent
6b7db2ec2c
commit
34265788bb
|
@ -7,4 +7,4 @@ keystone.db
|
|||
*.log
|
||||
*.pid
|
||||
pidfile
|
||||
|
||||
*.komodoproject
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
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>
|
||||
<groupId>org.openstack.identity</groupId>
|
||||
<artifactId>docs</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?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:identity="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:capi="http://docs.openstack.org/common/api/v2.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
|
||||
xsi:schemaLocation="http://docs.openstack.org/identity/api/v2.0
|
||||
xsd/api.xsd
|
||||
http://docs.openstack.org/common/api/v1.0
|
||||
http://docs.openstack.org/common/api/v2.0
|
||||
xsd/api-common.xsd
|
||||
">
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
<!-- We should use SSL in production -->
|
||||
<resources base="http://localhost:8080">
|
||||
<resource id="version" path="v1.0">
|
||||
<resource id="version" path="v2.0">
|
||||
<method href="#getVersionInfo"/>
|
||||
<resource id="extensions" path="extensions">
|
||||
<method href="#getExtensions"/>
|
||||
|
@ -57,13 +57,13 @@
|
|||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -76,16 +76,16 @@
|
|||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -99,13 +99,13 @@
|
|||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -115,27 +115,27 @@
|
|||
<!-- Token Operations -->
|
||||
<method name="POST" id="authenticate">
|
||||
<request>
|
||||
<representation mediaType="application/xml" element="idm:passwordCredentials"/>
|
||||
<representation mediaType="application/xml" element="identity:passwordCredentials"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</request>
|
||||
<response status="200 203">
|
||||
<representation mediaType="application/xml" element="idm:auth"/>
|
||||
<representation mediaType="application/xml" element="identity:auth"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:userDisabled"/>
|
||||
<representation mediaType="application/xml" element="identity:userDisabled"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="401 403 400 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -148,27 +148,27 @@
|
|||
required="false" type="xsd:string"/>
|
||||
</request>
|
||||
<response status="200 203">
|
||||
<representation mediaType="application/xml" element="idm:auth"/>
|
||||
<representation mediaType="application/xml" element="identity:auth"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="idm:userDisabled"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:userDisabled"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 401 403 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -178,22 +178,22 @@
|
|||
<method name="DELETE" id="revokeToken">
|
||||
<response status="204"/>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 401 403 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -209,26 +209,26 @@
|
|||
required="false" type="xsd:int"/>
|
||||
</request>
|
||||
<response status="200 203">
|
||||
<representation mediaType="application/xml" element="idm:tenants"/>
|
||||
<representation mediaType="application/xml" element="identity:tenants"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 401 403 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -237,30 +237,30 @@
|
|||
|
||||
<method name="POST" id="createTenant">
|
||||
<request>
|
||||
<representation mediaType="application/xml" element="idm:tenant"/>
|
||||
<representation mediaType="application/xml" element="identity:tenant"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</request>
|
||||
<response status="201">
|
||||
<representation mediaType="application/xml" element="idm:tenant"/>
|
||||
<representation mediaType="application/xml" element="identity:tenant"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="409">
|
||||
<representation mediaType="application/xml" element="idm:tenantConflict"/>
|
||||
<representation mediaType="application/xml" element="identity:tenantConflict"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="401 403 400 409 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -269,26 +269,26 @@
|
|||
|
||||
<method name="GET" id="getTenant">
|
||||
<response status="200 203">
|
||||
<representation mediaType="application/xml" element="idm:tenant"/>
|
||||
<representation mediaType="application/xml" element="identity:tenant"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 401 403 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -297,30 +297,30 @@
|
|||
|
||||
<method name="PUT" id="updateTenant">
|
||||
<request>
|
||||
<representation mediaType="application/xml" element="idm:tenant"/>
|
||||
<representation mediaType="application/xml" element="identity:tenant"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</request>
|
||||
<response status="200">
|
||||
<representation mediaType="application/xml" element="idm:tenant"/>
|
||||
<representation mediaType="application/xml" element="identity:tenant"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="401 403 404 400 500 503">
|
||||
<representation mediaType="application/json"/>
|
||||
|
@ -330,22 +330,22 @@
|
|||
<method name="DELETE" id="deleteTenant">
|
||||
<response status="204"/>
|
||||
<response status="401">
|
||||
<representation mediaType="application/xml" element="idm:unauthorized"/>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
</response>
|
||||
<response status="403">
|
||||
<representation mediaType="application/xml" element="idm:forbidden"/>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
</response>
|
||||
<response status="400">
|
||||
<representation mediaType="application/xml" element="idm:badRequest"/>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
</response>
|
||||
<response status="404">
|
||||
<representation mediaType="application/xml" element="idm:itemNotFound"/>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
</response>
|
||||
<response status="500">
|
||||
<representation mediaType="application/xml" element="idm:idmFault"/>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
</response>
|
||||
<response status="503">
|
||||
<representation mediaType="application/xml" element="idm:serviceUnavailable"/>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
</response>
|
||||
<response status="400 401 403 404 500 503">
|
||||
<representation mediaType="application/json"/>
|
|
@ -42,7 +42,7 @@
|
|||
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>
|
||||
<title>Keystone Developer Guide</title>
|
||||
<info>
|
||||
<author>
|
||||
<personname>
|
||||
|
@ -50,16 +50,16 @@
|
|||
<surname/>
|
||||
</personname>
|
||||
<affiliation>
|
||||
<orgname>Rackspace Cloud</orgname>
|
||||
<orgname>OpenStack</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2010</year>
|
||||
<year>2011</year>
|
||||
<holder>Rackspace Hosting, Inc.</holder>
|
||||
<holder>OpenStack</holder>
|
||||
</copyright>
|
||||
<releaseinfo>API v1.0</releaseinfo>
|
||||
<productname>Cloud Identity</productname>
|
||||
<releaseinfo>API v2.0</releaseinfo>
|
||||
<productname>Keystone - OpenStack Identity</productname>
|
||||
<pubdate>2011-04-23</pubdate>
|
||||
<legalnotice role="apache2">
|
||||
<annotation>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<chapter>
|
||||
<title>Overview</title>
|
||||
<para>
|
||||
The Cloud Identity Service allows applications to obtain
|
||||
The Keystone 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
|
||||
|
@ -95,7 +95,7 @@
|
|||
<chapter>
|
||||
<title>Concepts</title>
|
||||
<para>
|
||||
The Cloud Identity Service has several key concepts that are
|
||||
The Keystone Identity Service has several key concepts that are
|
||||
important to understand:
|
||||
</para>
|
||||
<section>
|
||||
|
@ -121,6 +121,14 @@
|
|||
resources.
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Role</title>
|
||||
<para>
|
||||
A role that an identity is associated with that allows it
|
||||
to perform certain operations. Roles are managed by services
|
||||
and operators. Tenant administrators may assign roles to users.
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Group</title>
|
||||
<para>
|
||||
|
@ -134,12 +142,12 @@
|
|||
</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
|
||||
<para>The Keystone API is implemented using a RESTful web service interface. All requests to
|
||||
authenticate and operate against the Keystone 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
|
||||
<para> The Keystone 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>
|
||||
|
@ -258,7 +266,7 @@
|
|||
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.
|
||||
http://identity.api.openstack.org/v2.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
|
||||
|
@ -326,15 +334,15 @@
|
|||
<section>
|
||||
<title>Versions</title>
|
||||
<para>
|
||||
The OpenStack IDM API uses both a URI and a MIME
|
||||
The OpenStack Identity 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
|
||||
identifier (e.g. https://identity.api.openstack.org/
|
||||
v2.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
|
||||
(application/vnd.openstack.identity-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
|
||||
|
@ -344,8 +352,8 @@
|
|||
<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
|
||||
Host: identity.api.openstack.org
|
||||
Accept: application/vnd.openstack.identity-v1.1+xml
|
||||
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
||||
</literallayout>
|
||||
</example>
|
||||
|
@ -353,7 +361,7 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
|||
<title>Request with URI versioning</title>
|
||||
<literallayout class="monospaced">
|
||||
GET /v1.1/tenants HTTP/1.1
|
||||
Host: idm.api.openstack.org
|
||||
Host: identity.api.openstack.org
|
||||
Accept: application/xml
|
||||
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
||||
</literallayout>
|
||||
|
@ -363,7 +371,7 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
|||
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.
|
||||
https://api.identity.openstack.org/tenants/12234.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
|
@ -414,12 +422,12 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
|||
<title>Versions List Request</title>
|
||||
<literallayout class="monospaced">
|
||||
GET HTTP/1.1
|
||||
Host: idm.api.openstack.org
|
||||
Host: identity.api.openstack.org
|
||||
</literallayout>
|
||||
</example>
|
||||
<simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara>
|
||||
<simpara>&ERROR_CODES; badRequest
|
||||
(<errorcode>400</errorcode>), idmFault
|
||||
(<errorcode>400</errorcode>), identityFault
|
||||
(<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
|
@ -444,13 +452,13 @@ Host: idm.api.openstack.org
|
|||
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/).
|
||||
(e.g. https://identity.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
|
||||
(e.g. https://identity.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
|
||||
|
@ -460,12 +468,12 @@ Host: idm.api.openstack.org
|
|||
<title>Version Details Request</title>
|
||||
<literallayout class="monospaced">
|
||||
GET HTTP/1.1
|
||||
Host: idm.api.openstack.org/v1.1/
|
||||
Host: identity.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>400</errorcode>), identityFault
|
||||
(<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
|
@ -530,7 +538,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
</informaltable>
|
||||
<simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara>
|
||||
<simpara>&ERROR_CODES; badRequest
|
||||
(<errorcode>400</errorcode>), idmFault (<errorcode>500</errorcode>),
|
||||
(<errorcode>400</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
<para>
|
||||
|
@ -576,7 +584,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<simpara>&CODES;<returnvalue>200</returnvalue>, <returnvalue>203</returnvalue></simpara>
|
||||
<simpara>&ERROR_CODES; itemNotFound
|
||||
(<errorcode>404</errorcode>), badRequest
|
||||
(<errorcode>400</errorcode>), idmFault
|
||||
(<errorcode>400</errorcode>), identityFault
|
||||
(<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
|
@ -633,19 +641,19 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<example>
|
||||
<title>XML Fault Response</title>
|
||||
<programlisting language="xml">
|
||||
<xi:include href="samples/idm_fault.xml" parse="text"/>
|
||||
<xi:include href="samples/identity_fault.xml" parse="text"/>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>JSON Fault Response</title>
|
||||
<programlisting language="javascript">
|
||||
<xi:include href="samples/idm_fault.json" parse="text"/>
|
||||
<xi:include href="samples/identity_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.
|
||||
<para>The root element of the fault (e.g. identityFault) 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>
|
||||
|
@ -672,7 +680,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr align="center">
|
||||
<td>idmFault</td>
|
||||
<td>identityFault</td>
|
||||
<td>500, 400</td>
|
||||
<td> &CHECK; </td>
|
||||
</tr>
|
||||
|
@ -719,8 +727,8 @@ Host: idm.api.openstack.org/v1.1/
|
|||
</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
|
||||
<type>identityFault</type>. When working with a system that binds XML to actual classes (such
|
||||
as JAXB), one should be capable of using <type>identityFault</type> as a “catch-all” if
|
||||
there's no interest in distinguishing between individual fault types. </para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
@ -747,7 +755,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
</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>403</errorcode>), badRequest (<errorcode>400</errorcode>), identityFault
|
||||
(<errorcode>500</errorcode>), serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
<para>
|
||||
TenantID is optional and may be used to specify that a
|
||||
|
@ -797,7 +805,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
identityFault(<returnvalue>500</returnvalue>),
|
||||
serviceUnavailable(<returnvalue>503</returnvalue>)</simpara>
|
||||
&NO_REQUEST;
|
||||
<para>
|
||||
|
@ -836,7 +844,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
identityFault(<returnvalue>500</returnvalue>),
|
||||
serviceUnavailable(<returnvalue>503</returnvalue>)</simpara>
|
||||
&NO_REQUEST;
|
||||
</section>
|
||||
|
@ -858,7 +866,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
badRequest (<errorcode>400</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
<example>
|
||||
<title>XML Tenant Create Request</title>
|
||||
|
@ -900,7 +908,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
badRequest (<errorcode>400</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
<para>
|
||||
The operation returns a list of tenants. The list may be
|
||||
|
@ -936,7 +944,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
badRequest (<errorcode>400</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
<example>
|
||||
|
@ -967,7 +975,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
badRequest (<errorcode>400</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
<example>
|
||||
<title>XML Tenant Update Request</title>
|
||||
|
@ -1009,7 +1017,7 @@ Host: idm.api.openstack.org/v1.1/
|
|||
<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>),
|
||||
(<errorcode>404</errorcode>), identityFault (<errorcode>500</errorcode>),
|
||||
serviceUnavailable(<errorcode>503</errorcode>)</simpara>
|
||||
&NO_REQUEST;
|
||||
</section>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<auth xmlns="http://docs.openstack.org/idm/api/v1.0">
|
||||
<auth xmlns="http://docs.openstack.org/identity/api/v2.0">
|
||||
<token expires="2010-11-01T03:32:15-05:00"
|
||||
id="ab48a9efdfedb23ty3494"/>
|
||||
<user tenantId="1245" username="jqsmith">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<passwordCredentials
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
password="P@ssword1" username="testuser"
|
||||
tenantId="77654"/>
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/tenants/12"
|
||||
"href" : "http://identity.api.openstack.org/v2.0"
|
||||
}
|
||||
],
|
||||
"media-types": {
|
||||
"values" : [
|
||||
{
|
||||
"base" : "application/xml",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+xml"
|
||||
"type" : "application/vnd.openstack.identity-v1.0+xml"
|
||||
},
|
||||
{
|
||||
"base" : "application/json",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+json"
|
||||
"type" : "application/vnd.openstack.identity-v1.0+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -29,18 +29,40 @@
|
|||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://idm.api.openstack.org/v1.1/tenants/12"
|
||||
"href" : "http://identity.api.openstack.org/v1.1"
|
||||
}
|
||||
],
|
||||
"media-types": {
|
||||
"values" : [
|
||||
{
|
||||
"base" : "application/xml",
|
||||
"type" : "application/vnd.openstack.idm-v1.1+xml"
|
||||
"type" : "application/vnd.openstack.identity-v1.1+xml"
|
||||
},
|
||||
{
|
||||
"base" : "application/json",
|
||||
"type" : "application/vnd.openstack.idm-v1.1+json"
|
||||
"type" : "application/vnd.openstack.identity-v1.1+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id" : "v2.0",
|
||||
"status" : "CURRENT",
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://identity.api.openstack.org/v2.0"
|
||||
}
|
||||
],
|
||||
"media-types": {
|
||||
"values" : [
|
||||
{
|
||||
"base" : "application/xml",
|
||||
"type" : "application/vnd.openstack.identity-v2.0+xml"
|
||||
},
|
||||
{
|
||||
"base" : "application/json",
|
||||
"type" : "application/vnd.openstack.identity-v2.0+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,24 +6,24 @@
|
|||
<version id="v1.0" status="DEPRECATED">
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
type="application/vnd.openstack.idm-v1.0+xml"/>
|
||||
type="application/vnd.openstack.identity-v2.0+xml"/>
|
||||
<media-type base="application/json"
|
||||
type="application/vnd.openstack.idm-v1.0+json"/>
|
||||
type="application/vnd.openstack.identity-v2.0+json"/>
|
||||
</media-types>
|
||||
|
||||
<atom:link rel="self"
|
||||
href="http://idm.api.openstack.org/v1.0/tenants/12"/>
|
||||
href="http://identity.api.openstack.org/v2.0"/>
|
||||
</version>
|
||||
|
||||
<version id="v1.1" status="CURRENT">
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
type="application/vnd.openstack.idm-v1.1+xml"/>
|
||||
type="application/vnd.openstack.identity-v1.1+xml"/>
|
||||
<media-type base="application/json"
|
||||
type="application/vnd.openstack.idm-v1.1+json"/>
|
||||
type="application/vnd.openstack.identity-v1.1+json"/>
|
||||
</media-types>
|
||||
|
||||
<atom:link rel="self"
|
||||
href="http://idm.api.openstack.org/v1.1/tenants/12"/>
|
||||
href="http://identity.api.openstack.org/v1.1"/>
|
||||
</version>
|
||||
</choices>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.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">
|
||||
xmlns="http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0">
|
||||
<meta key="MetaKey1">MetaValue1</meta>
|
||||
<meta key="MetaKey2">MetaValue2</meta>
|
||||
</metadata>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extension" : {
|
||||
"name" : "User Metadata Extension",
|
||||
"namespace" : "http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0",
|
||||
"namespace" : "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
|
||||
"alias" : "RS-META",
|
||||
"updated" : "2011-01-12T11:22:33-06:00",
|
||||
"description" : "Allows associating arbritrary metadata with a user.",
|
||||
|
@ -9,12 +9,12 @@
|
|||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/pdf",
|
||||
"href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-meta-20111201.pdf"
|
||||
"href" : "http://docs.rackspacecloud.com/idm/api/ext/identity-meta-20111201.pdf"
|
||||
},
|
||||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/vnd.sun.wadl+xml",
|
||||
"href" : "http://docs.rackspacecloud.com/idm/api/ext/idm-cbs.wadl"
|
||||
"href" : "http://docs.rackspacecloud.com/identity/api/ext/identity-cbs.wadl"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<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"
|
||||
namespace="http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0"
|
||||
alias="RS-META"
|
||||
updated="2011-01-12T11:22:33-06:00">
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
{
|
||||
"name" : "User Metadata Extension",
|
||||
"namespace" : "http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0",
|
||||
"namespace" : "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
|
||||
"alias" : "RS-META",
|
||||
"updated" : "2011-01-12T11:22:33-06:00",
|
||||
"description" : "Allows associating arbritrary metadata with a user.",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</extension>
|
||||
<extension
|
||||
name="User Metadata Extension"
|
||||
namespace="http://docs.rackspacecloud.com/idm/api/ext/meta/v1.0"
|
||||
namespace="http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0"
|
||||
alias="RS-META"
|
||||
updated="2011-01-12T11:22:33-06:00">
|
||||
<description>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"links" : [
|
||||
{
|
||||
"rel" : "next",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/1234/tenants/1234/users/jqsmith/groups?marker=Super"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/1234/tenants/1234/users/jqsmith/groups?marker=Super"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
enabled="true" email="john.smith@example.org"
|
||||
tenantId="1234" id="jqsmith">
|
||||
|
@ -9,6 +9,6 @@
|
|||
<group id="Super"/>
|
||||
<atom:link
|
||||
rel="next"
|
||||
href="http://idm.api.openstack.org/v1.0/1234/tenants/1234/users/jqsmith/groups?marker=Super"/>
|
||||
href="http://identity.api.openstack.org/v2.0/1234/tenants/1234/users/jqsmith/groups?marker=Super"/>
|
||||
</groups>
|
||||
</user>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<idmFault xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<idmFault xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
code="500">
|
||||
<message>Fault</message>
|
||||
<details>Error Details...</details>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<itemNotFound xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<itemNotFound xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
code="404">
|
||||
<message>Item not found.</message>
|
||||
<details>Error Details...</details>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
POST /v1.0/token HTTP/1.1
|
||||
Host: idm.api.rackspace.com
|
||||
Host: identity.api.rackspace.com
|
||||
Content-Type: application/json
|
||||
Accept: application/xml
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
enabled="true" id="1234">
|
||||
<description>A description...</description>
|
||||
</tenant>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0">
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0">
|
||||
<description>A NEW description...</description>
|
||||
</tenant>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"links" : [
|
||||
{
|
||||
"rel" : "next",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=1234"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenants xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<tenants xmlns="http://docs.openstack.org/identity/api/v2.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"/>
|
||||
href="http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=1234"/>
|
||||
</tenants>
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
"links" : [
|
||||
{
|
||||
"rel" : "next",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=3645"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=3645"
|
||||
},
|
||||
{
|
||||
"rel" : "previous",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/1234/tenants?limit=1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenants xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<tenants xmlns="http://docs.openstack.org/identity/api/v2.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"/>
|
||||
href="http://identity.api.openstack.org/v2.0/1234/tenants?limit=1"/>
|
||||
<atom:link
|
||||
rel="next"
|
||||
href="http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=3645"/>
|
||||
href="http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=3645"/>
|
||||
</tenants>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"links" : [
|
||||
{
|
||||
"rel" : "previous",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/1234/tenants?limit=1&marker=1234"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=1234"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenants xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<tenants xmlns="http://docs.openstack.org/identity/api/v2.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"/>
|
||||
href="http://identity.api.openstack.org/v2.0/1234/tenants?limit=1&marker=1234"/>
|
||||
</tenants>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenants xmlns="http://docs.openstack.org/idm/api/v1.0">
|
||||
<tenants xmlns="http://docs.openstack.org/identity/api/v2.0">
|
||||
<tenant enabled="true" id="1234">
|
||||
<description>A description...</description>
|
||||
</tenant>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0"
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0"
|
||||
enabled="true" id="1234">
|
||||
<description>A NEW description...</description>
|
||||
</tenant>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<auth xmlns="http://docs.openstack.org/idm/api/v1.0">
|
||||
<auth xmlns="http://docs.openstack.org/identity/api/v2.0">
|
||||
<token expires="2010-11-01T03:32:15-05:00"
|
||||
id="ab48a9efdfedb23ty3494"/>
|
||||
<user tenantId="1245" username="jqsmith">
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
<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>
|
||||
<id>http://identity.api.openstack.org/v2.0/</id>
|
||||
<author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author>
|
||||
<link rel="self" href="http://idm.api.openstack.org/v1.0/"/>
|
||||
<link rel="self" href="http://identity.api.openstack.org/v2.0/"/>
|
||||
<entry>
|
||||
<id>http://idm.api.openstack.org/v1.0/</id>
|
||||
<id>http://identity.api.openstack.org/v2.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="self" href="http://identity.api.openstack.org/v2.0/"/>
|
||||
<link rel="describedby" type="application/pdf"
|
||||
href="http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf"/>
|
||||
href="http://docs.rackspacecloud.com/identity/api/v2.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"/>
|
||||
href="http://docs.rackspacecloud.com/identity/api/v2.0/application.wadl"/>
|
||||
<content type="text">Version v1.0 CURRENT (2011-01-21T11:33:21-06:00)</content>
|
||||
</entry>
|
||||
</feed>
|
||||
|
|
|
@ -6,27 +6,27 @@
|
|||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/"
|
||||
},
|
||||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/pdf",
|
||||
"href" : "http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf"
|
||||
"href" : "http://docs.rackspacecloud.com/identity/api/v2.0/idm-devguide-20110125.pdf"
|
||||
},
|
||||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/vnd.sun.wadl+xml",
|
||||
"href" : "http://docs.rackspacecloud.com/idm/api/v1.0/application.wadl"
|
||||
"href" : "http://docs.rackspacecloud.com/identity/api/v2.0/application.wadl"
|
||||
}
|
||||
],
|
||||
"media-types": [
|
||||
{
|
||||
"base" : "application/xml",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+xml"
|
||||
"type" : "application/vnd.openstack.identity-v2.0+xml"
|
||||
},
|
||||
{
|
||||
"base" : "application/json",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+json"
|
||||
"type" : "application/vnd.openstack.identity-v2.0+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
type="application/vnd.openstack.idm-v1.0+xml"/>
|
||||
type="application/vnd.openstack.identity-v2.0+xml"/>
|
||||
<media-type base="application/json"
|
||||
type="application/vnd.openstack.idm-v1.0+json"/>
|
||||
type="application/vnd.openstack.identity-v2.0+json"/>
|
||||
</media-types>
|
||||
|
||||
<atom:link rel="self"
|
||||
href="http://idm.api.openstack.org/v1.0/"/>
|
||||
href="http://identity.api.openstack.org/v2.0/"/>
|
||||
|
||||
<atom:link rel="describedby"
|
||||
type="application/pdf"
|
||||
href="http://docs.rackspacecloud.com/idm/api/v1.0/idm-devguide-20110125.pdf" />
|
||||
href="http://docs.rackspacecloud.com/identity/api/v2.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" />
|
||||
href="http://docs.rackspacecloud.com/identity/api/v2.0/application.wadl" />
|
||||
</version>
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
<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>
|
||||
<id>http://identity.api.openstack.org/</id>
|
||||
<author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author>
|
||||
<link rel="self" href="http://idm.api.openstack.org/"/>
|
||||
<link rel="self" href="http://identity.api.openstack.org/"/>
|
||||
<entry>
|
||||
<id>http://idm.api.openstack.org/v1.1/</id>
|
||||
<id>http://identity.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/"/>
|
||||
<link rel="self" href="http://identity.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>
|
||||
<id>http://identity.api.openstack.org/v2.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/"/>
|
||||
<link rel="self" href="http://identity.api.openstack.org/v2.0/"/>
|
||||
<content type="text">Version v1.0 DEPRECATED (2009-10-09T11:30:00Z)</content>
|
||||
</entry>
|
||||
</feed>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://idm.api.openstack.org/v1.0/"
|
||||
"href" : "http://identity.api.openstack.org/v2.0/"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
|||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://idm.api.openstack.org/v1.1/"
|
||||
"href" : "http://identity.api.openstack.org/v1.1/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<version id="v1.0" status="DEPRECATED"
|
||||
updated="2009-10-09T11:30:00Z">
|
||||
<atom:link rel="self"
|
||||
href="http://idm.api.openstack.org/v1.0/"/>
|
||||
href="http://identity.api.openstack.org/v2.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/"/>
|
||||
href="http://identity.api.openstack.org/v1.1/"/>
|
||||
</version>
|
||||
|
||||
</versions>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:idm="http://docs.openstack.org/idm/api/v1.0"
|
||||
xmlns:idm="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/idm/api/v1.0"
|
||||
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
|
||||
>
|
||||
<include schemaLocation="token.xsd"/>
|
||||
<include schemaLocation="tenant.xsd"/>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:idm="http://docs.openstack.org/idm/api/v1.0"
|
||||
xmlns:idm="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/idm/api/v1.0"
|
||||
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
|
||||
>
|
||||
<!-- Fault Elements -->
|
||||
<element name="idmFault" type="idm:IDMFault"/>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:idm="http://docs.openstack.org/idm/api/v1.0"
|
||||
xmlns:idm="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
targetNamespace="http://docs.openstack.org/idm/api/v1.0"
|
||||
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
|
||||
>
|
||||
<!-- Import ATOM specific schema definitions -->
|
||||
<import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:idm="http://docs.openstack.org/idm/api/v1.0"
|
||||
xmlns:idm="http://docs.openstack.org/identity/api/v2.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/idm/api/v1.0"
|
||||
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
|
||||
>
|
||||
<!-- Elements -->
|
||||
<element name="passwordCredentials" type="idm:PasswordCredentials"/>
|
||||
|
|
|
@ -28,7 +28,7 @@ def get_auth_token(username, password, tenant):
|
|||
"password": password,
|
||||
"tenantId": "1"}}
|
||||
conn = httplib.HTTPConnection("localhost:8080")
|
||||
conn.request("POST", "/v1.0/token", json.dumps(params), headers=headers)
|
||||
conn.request("POST", "/v2.0/token", json.dumps(params), headers=headers)
|
||||
response = conn.getresponse()
|
||||
data = response.read()
|
||||
ret = data
|
||||
|
|
|
@ -184,7 +184,7 @@ class AuthProtocol(object):
|
|||
"tenantId": "1"}}
|
||||
conn = httplib.HTTPConnection("%s:%s" \
|
||||
% (self.auth_host, self.auth_port))
|
||||
conn.request("POST", "/v1.0/token", json.dumps(params), \
|
||||
conn.request("POST", "/v2.0/token", json.dumps(params), \
|
||||
headers=headers)
|
||||
response = conn.getresponse()
|
||||
data = response.read()
|
||||
|
@ -226,7 +226,7 @@ class AuthProtocol(object):
|
|||
# "X-Auth-Token": admin_token}
|
||||
# we're using a test token from the ini file for now
|
||||
conn = http_connect(self.auth_host, self.auth_port, 'GET',
|
||||
'/v1.0/token/%s' % claims, headers=headers)
|
||||
'/v2.0/token/%s' % claims, headers=headers)
|
||||
resp = conn.getresponse()
|
||||
data = resp.read()
|
||||
conn.close()
|
||||
|
@ -252,7 +252,7 @@ class AuthProtocol(object):
|
|||
# "X-Auth-Token": admin_token}
|
||||
# we're using a test token from the ini file for now
|
||||
conn = http_connect(self.auth_host, self.auth_port, 'GET',
|
||||
'/v1.0/token/%s' % self.claims, headers=headers)
|
||||
'/v2.0/token/%s' % self.claims, headers=headers)
|
||||
resp = conn.getresponse()
|
||||
data = resp.read()
|
||||
conn.close()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<extensions xmlns="http://docs.openstack.org/common/api/v1.0"
|
||||
<extensions xmlns="http://docs.openstack.org/common/api/v2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
</extensions>
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
"version" : {
|
||||
"id" : "v1.0",
|
||||
"id" : "v2.0",
|
||||
"status" : "{{VERSION_STATUS}}",
|
||||
"updated" : "{{VERSION_DATE}}",
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v1.0/"
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v2.0/"
|
||||
},
|
||||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/pdf",
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v1.0/idmdevguide.pdf"
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v2.0/identitydevguide.pdf"
|
||||
},
|
||||
{
|
||||
"rel" : "describedby",
|
||||
"type" : "application/vnd.sun.wadl+xml",
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v1.0/identity.wadl"
|
||||
"href" : "http://{{HOST}}:{{PORT}}/v2.0/identity.wadl"
|
||||
}
|
||||
],
|
||||
"media-types": [
|
||||
{
|
||||
"base" : "application/xml",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+xml"
|
||||
"type" : "application/vnd.openstack.identity-v2.0+xml"
|
||||
},
|
||||
{
|
||||
"base" : "application/json",
|
||||
"type" : "application/vnd.openstack.idm-v1.0+json"
|
||||
"type" : "application/vnd.openstack.identity-v2.0+json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<version xmlns="http://docs.openstack.org/common/api/v1.0"
|
||||
<version xmlns="http://docs.openstack.org/common/api/v2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
id="v1.0" status="{{VERSION_STATUS}}" updated="{{VERSION_DATE}}">
|
||||
id="v2.0" status="{{VERSION_STATUS}}" updated="{{VERSION_DATE}}">
|
||||
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
type="application/vnd.openstack.idm-v1.0+xml"/>
|
||||
type="application/vnd.openstack.identity-v2.0+xml"/>
|
||||
<media-type base="application/json"
|
||||
type="application/vnd.openstack.idm-v1.0+json"/>
|
||||
type="application/vnd.openstack.identity-v2.0+json"/>
|
||||
</media-types>
|
||||
|
||||
<atom:link rel="self"
|
||||
href="http://{{HOST}}:{{PORT}}/v1.0/"/>
|
||||
href="http://{{HOST}}:{{PORT}}/v2.0/"/>
|
||||
|
||||
<atom:link rel="describedby"
|
||||
type="application/pdf"
|
||||
href="http://{{HOST}}:{{PORT}}/v1.0/idmdevguide.pdf" />
|
||||
href="http://{{HOST}}:{{PORT}}/v2.0/identitydevguide.pdf" />
|
||||
|
||||
<atom:link rel="describedby"
|
||||
type="application/vnd.sun.wadl+xml"
|
||||
href="http://{{HOST}}:{{PORT}}/v1.0/identity.wadl" />
|
||||
href="http://{{HOST}}:{{PORT}}/v2.0/identity.wadl" />
|
||||
</version>
|
||||
|
|
|
@ -26,8 +26,8 @@ import keystone.db.sqlalchemy.api as db_api
|
|||
import keystone.db.sqlalchemy.models as db_models
|
||||
|
||||
|
||||
class IDMService(object):
|
||||
"This is the logical implemenation of the IDM service"
|
||||
class IdentityService(object):
|
||||
"This is the logical implemenation of the Identity service"
|
||||
|
||||
#
|
||||
# Token Operations
|
||||
|
@ -60,11 +60,11 @@ class IDMService(object):
|
|||
dtoken.user_id = duser.id
|
||||
|
||||
if not duser.tenants:
|
||||
raise fault.IDMFault("Strange: user %s is not associated "
|
||||
raise fault.IdentityFault("Strange: user %s is not associated "
|
||||
"with a tenant!" % duser.id)
|
||||
user = db_api.user_get_by_tenant(duser.id, credentials.tenant_id)
|
||||
if not credentials.tenant_id and user:
|
||||
raise fault.IDMFault("Error: user %s is not associated "
|
||||
raise fault.IdentityFault("Error: user %s is not associated "
|
||||
"with a tenant! %s" % (duser.id,
|
||||
credentials.tenant_id))
|
||||
dtoken.tenant_id = credentials.tenant_id
|
||||
|
@ -837,11 +837,11 @@ class IDMService(object):
|
|||
gs.append(auth.Group(dgroup.id, dgroup.tenant_id))
|
||||
groups = auth.Groups(gs, [])
|
||||
if len(duser.tenants) == 0:
|
||||
raise fault.IDMFault("Strange: user %s is not associated "
|
||||
raise fault.IdentityFault("Strange: user %s is not associated "
|
||||
"with a tenant!" % duser.id)
|
||||
if not dtoken.tenant_id and \
|
||||
db_api.user_get_by_tenant(duser.id, dtoken.tenant_id):
|
||||
raise fault.IDMFault("Error: user %s is not associated "
|
||||
raise fault.IdentityFault("Error: user %s is not associated "
|
||||
"with a tenant! %s" % (duser.id,
|
||||
dtoken.tenant_id))
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class PasswordCredentials(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}"
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}"
|
||||
"passwordCredentials")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting passwordCredentials")
|
||||
|
@ -108,7 +108,7 @@ class User(object):
|
|||
|
||||
|
||||
class AuthData(object):
|
||||
"Authentation Infor returned upon successful login."
|
||||
"Authentation Information returned upon successful login."
|
||||
|
||||
def __init__(self, token, user):
|
||||
self.token = token
|
||||
|
@ -116,7 +116,7 @@ class AuthData(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("auth",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
token = etree.Element("token",
|
||||
expires=self.token.expires.isoformat())
|
||||
token.set("id", self.token.token_id)
|
||||
|
|
|
@ -17,7 +17,7 @@ import json
|
|||
from lxml import etree
|
||||
|
||||
|
||||
class IDMFault(Exception):
|
||||
class IdentityFault(Exception):
|
||||
"Base Exception type for all auth exceptions"
|
||||
|
||||
def __init__(self, msg, details=None, code=500):
|
||||
|
@ -25,7 +25,7 @@ class IDMFault(Exception):
|
|||
self.code = code
|
||||
self.msg = msg
|
||||
self.details = details
|
||||
self.key = "idmFault"
|
||||
self.key = "IdentityFault"
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
|
@ -33,7 +33,7 @@ class IDMFault(Exception):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element(self.key,
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
dom.set("code", str(self.code))
|
||||
msg = etree.Element("message")
|
||||
msg.text = self.msg
|
||||
|
@ -55,7 +55,7 @@ class IDMFault(Exception):
|
|||
return json.dumps(ret)
|
||||
|
||||
|
||||
class ServiceUnavailableFault(IDMFault):
|
||||
class ServiceUnavailableFault(IdentityFault):
|
||||
"The auth service is unavailable"
|
||||
|
||||
def __init__(self, msg, details=None, code=503):
|
||||
|
@ -63,7 +63,7 @@ class ServiceUnavailableFault(IDMFault):
|
|||
self.key = "serviceUnavailable"
|
||||
|
||||
|
||||
class BadRequestFault(IDMFault):
|
||||
class BadRequestFault(IdentityFault):
|
||||
"Bad user request"
|
||||
|
||||
def __init__(self, msg, details=None, code=400):
|
||||
|
@ -71,7 +71,7 @@ class BadRequestFault(IDMFault):
|
|||
self.key = "badRequest"
|
||||
|
||||
|
||||
class UnauthorizedFault(IDMFault):
|
||||
class UnauthorizedFault(IdentityFault):
|
||||
"User is unauthorized"
|
||||
|
||||
def __init__(self, msg, details=None, code=401):
|
||||
|
@ -79,7 +79,7 @@ class UnauthorizedFault(IDMFault):
|
|||
self.key = "unauthorized"
|
||||
|
||||
|
||||
class ForbiddenFault(IDMFault):
|
||||
class ForbiddenFault(IdentityFault):
|
||||
"The user is forbidden"
|
||||
|
||||
def __init__(self, msg, details=None, code=403):
|
||||
|
@ -87,7 +87,7 @@ class ForbiddenFault(IDMFault):
|
|||
self.key = "forbidden"
|
||||
|
||||
|
||||
class ItemNotFoundFault(IDMFault):
|
||||
class ItemNotFoundFault(IdentityFault):
|
||||
"The item is not found"
|
||||
|
||||
def __init__(self, msg, details=None, code=404):
|
||||
|
@ -95,7 +95,7 @@ class ItemNotFoundFault(IDMFault):
|
|||
self.key = "itemNotFound"
|
||||
|
||||
|
||||
class TenantDisabledFault(IDMFault):
|
||||
class TenantDisabledFault(IdentityFault):
|
||||
"The tenant is disabled"
|
||||
|
||||
def __init__(self, msg, details=None, code=403):
|
||||
|
@ -103,7 +103,7 @@ class TenantDisabledFault(IDMFault):
|
|||
self.key = "tenantDisabled"
|
||||
|
||||
|
||||
class TenantConflictFault(IDMFault):
|
||||
class TenantConflictFault(IdentityFault):
|
||||
"The tenant already exists?"
|
||||
|
||||
def __init__(self, msg, details=None, code=409):
|
||||
|
@ -111,7 +111,7 @@ class TenantConflictFault(IDMFault):
|
|||
self.key = "tenantConflict"
|
||||
|
||||
|
||||
class TenantGroupConflictFault(IDMFault):
|
||||
class TenantGroupConflictFault(IdentityFault):
|
||||
"The tenant Group already exists?"
|
||||
|
||||
def __init__(self, msg, details=None, code=409):
|
||||
|
@ -119,7 +119,7 @@ class TenantGroupConflictFault(IDMFault):
|
|||
self.key = "tenantGroupConflict"
|
||||
|
||||
|
||||
class OverlimitFault(IDMFault):
|
||||
class OverlimitFault(IdentityFault):
|
||||
"A limit has been exceeded"
|
||||
|
||||
def __init__(self, msg, details=None, code=409, retry_at=None):
|
||||
|
@ -129,7 +129,7 @@ class OverlimitFault(IDMFault):
|
|||
self.key = "overLimit"
|
||||
|
||||
|
||||
class UserConflictFault(IDMFault):
|
||||
class UserConflictFault(IdentityFault):
|
||||
"The User already exists?"
|
||||
|
||||
def __init__(self, msg, details=None, code=409):
|
||||
|
@ -137,7 +137,7 @@ class UserConflictFault(IDMFault):
|
|||
self.key = "userConflict"
|
||||
|
||||
|
||||
class UserDisabledFault(IDMFault):
|
||||
class UserDisabledFault(IdentityFault):
|
||||
"The user is disabled"
|
||||
|
||||
def __init__(self, msg, details=None, code=403):
|
||||
|
@ -145,7 +145,7 @@ class UserDisabledFault(IDMFault):
|
|||
self.key = "userDisabled"
|
||||
|
||||
|
||||
class EmailConflictFault(IDMFault):
|
||||
class EmailConflictFault(IdentityFault):
|
||||
"The Email already exists?"
|
||||
|
||||
def __init__(self, msg, details=None, code=409):
|
||||
|
@ -153,7 +153,7 @@ class EmailConflictFault(IDMFault):
|
|||
self.key = "emailConflict"
|
||||
|
||||
|
||||
class UserGroupConflictFault(IDMFault):
|
||||
class UserGroupConflictFault(IdentityFault):
|
||||
"The user already exists in group?"
|
||||
|
||||
def __init__(self, msg, details=None, code=409):
|
||||
|
|
|
@ -33,7 +33,7 @@ class Tenant(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}tenant")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}tenant")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting Tenant")
|
||||
tenant_id = root.get("id")
|
||||
|
@ -44,7 +44,7 @@ class Tenant(object):
|
|||
set_enabled = False
|
||||
else:
|
||||
raise fault.BadRequestFault("Bad enabled attribute!")
|
||||
desc = root.find("{http://docs.openstack.org/idm/api/v1.0}"
|
||||
desc = root.find("{http://docs.openstack.org/identity/api/v2.0}"
|
||||
"description")
|
||||
if desc == None:
|
||||
raise fault.BadRequestFault("Expecting Tenant Description")
|
||||
|
@ -77,7 +77,7 @@ class Tenant(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("tenant",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0",
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0",
|
||||
enabled=string.lower(str(self.enabled)))
|
||||
if self.tenant_id:
|
||||
dom.set("id", self.tenant_id)
|
||||
|
@ -110,7 +110,7 @@ class Tenants(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("tenants")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/idm/api/v1.0")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/identity/api/v2.0")
|
||||
|
||||
for t in self.values:
|
||||
dom.append(t.to_dom())
|
||||
|
@ -142,7 +142,7 @@ class Group(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}group")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}group")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting Group")
|
||||
group_id = root.get("id")
|
||||
|
@ -152,7 +152,7 @@ class Group(object):
|
|||
else:
|
||||
tenant_id = None
|
||||
|
||||
desc = root.find("{http://docs.openstack.org/idm/api/v1.0}"
|
||||
desc = root.find("{http://docs.openstack.org/identity/api/v2.0}"
|
||||
"description")
|
||||
if desc == None:
|
||||
raise fault.BadRequestFault("Expecting Group Description")
|
||||
|
@ -188,7 +188,7 @@ class Group(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("group",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
if self.group_id:
|
||||
dom.set("id", self.group_id)
|
||||
if self.tenant_id:
|
||||
|
@ -223,7 +223,7 @@ class Groups(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("groups")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/idm/api/v1.0")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/identity/api/v2.0")
|
||||
|
||||
for t in self.values:
|
||||
dom.append(t.to_dom())
|
||||
|
@ -251,12 +251,12 @@ class GlobalGroup(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}group")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}group")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting Group")
|
||||
group_id = root.get("id")
|
||||
|
||||
desc = root.find("{http://docs.openstack.org/idm/api/v1.0}"
|
||||
desc = root.find("{http://docs.openstack.org/identity/api/v2.0}"
|
||||
"description")
|
||||
if desc == None:
|
||||
raise fault.BadRequestFault("Expecting Group Description")
|
||||
|
@ -287,7 +287,7 @@ class GlobalGroup(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("group",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
if self.group_id:
|
||||
dom.set("id", self.group_id)
|
||||
|
||||
|
@ -320,7 +320,7 @@ class GlobalGroups(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("groups")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/idm/api/v1.0")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/identity/api/v2.0")
|
||||
|
||||
for t in self.values:
|
||||
dom.append(t.to_dom())
|
||||
|
@ -354,7 +354,7 @@ class User(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("user",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
if self.group_id != None:
|
||||
dom.set("group_id", self.group_id)
|
||||
if self.user_id:
|
||||
|
@ -394,7 +394,7 @@ class Users(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("users")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/idm/api/v1.0")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/identity/api/v2.0")
|
||||
|
||||
for t in self.values:
|
||||
dom.append(t.to_dom())
|
||||
|
|
|
@ -33,7 +33,7 @@ class User(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}user")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}user")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting User")
|
||||
user_id = root.get("id")
|
||||
|
@ -95,7 +95,7 @@ class User(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("user",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
if self.email:
|
||||
dom.set("email", self.email)
|
||||
if self.tenant_id:
|
||||
|
@ -143,7 +143,7 @@ class User_Update(object):
|
|||
try:
|
||||
dom = etree.Element("root")
|
||||
dom.append(etree.fromstring(xml_str))
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}user")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}user")
|
||||
if root == None:
|
||||
raise fault.BadRequestFault("Expecting User")
|
||||
user_id = root.get("id")
|
||||
|
@ -200,7 +200,7 @@ class User_Update(object):
|
|||
|
||||
def to_dom(self):
|
||||
dom = etree.Element("user",
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0")
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0")
|
||||
if self.email:
|
||||
dom.set("email", self.email)
|
||||
if self.tenant_id:
|
||||
|
@ -251,7 +251,7 @@ class Users(object):
|
|||
|
||||
def to_xml(self):
|
||||
dom = etree.Element("users")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/idm/api/v1.0")
|
||||
dom.set(u"xmlns", "http://docs.openstack.org/identity/api/v2.0")
|
||||
for t in self.values:
|
||||
dom.append(t.to_dom())
|
||||
for t in self.links:
|
||||
|
|
|
@ -70,7 +70,7 @@ logger = logging.getLogger('keystone.server')
|
|||
VERSION_STATUS = "ALPHA"
|
||||
VERSION_DATE = "2011-04-23T00:00:00Z"
|
||||
|
||||
service = serv.IDMService()
|
||||
service = serv.IdentityService()
|
||||
|
||||
|
||||
#
|
||||
|
@ -101,12 +101,12 @@ def wrap_error(func):
|
|||
try:
|
||||
return func(*args, **kwargs)
|
||||
except Exception as err:
|
||||
if isinstance(err, fault.IDMFault):
|
||||
if isinstance(err, fault.IdentityFault):
|
||||
return send_error(err.code, kwargs['req'], err)
|
||||
else:
|
||||
logging.exception(err)
|
||||
return send_error(500, kwargs['req'],
|
||||
fault.IDMFault("Unhandled error", str(err)))
|
||||
fault.IdentityFault("Unhandled error", str(err)))
|
||||
return check_error
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ def get_normalized_request_content(model, req):
|
|||
elif req.content_type == "application/json":
|
||||
ret = model.from_json(req.body)
|
||||
else:
|
||||
raise fault.IDMFault("I don't understand the content type ", code=415)
|
||||
raise fault.IdentityFault("I don't understand the content type ", code=415)
|
||||
return ret
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ class StaticFilesController(wsgi.Controller):
|
|||
@wrap_error
|
||||
def get_pdf_contract(self, req):
|
||||
resp = Response()
|
||||
return template.static_file(resp, req, "content/idmdevguide.pdf",
|
||||
return template.static_file(resp, req, "content/identiitydevguide.pdf",
|
||||
root=get_app_root(),
|
||||
mimetype="application/pdf")
|
||||
|
||||
|
@ -582,154 +582,154 @@ class KeystoneAPI(wsgi.Router):
|
|||
|
||||
# Token Operations
|
||||
auth_controller = AuthController(options)
|
||||
mapper.connect("/v1.0/token", controller=auth_controller,
|
||||
mapper.connect("/v2.0/token", controller=auth_controller,
|
||||
action="authenticate")
|
||||
mapper.connect("/v1.0/token/{token_id}", controller=auth_controller,
|
||||
mapper.connect("/v2.0/token/{token_id}", controller=auth_controller,
|
||||
action="validate_token",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/token/{token_id}", controller=auth_controller,
|
||||
mapper.connect("/v2.0/token/{token_id}", controller=auth_controller,
|
||||
action="delete_token",
|
||||
conditions=dict(method=["DELETE"]))
|
||||
|
||||
# Tenant Operations
|
||||
tenant_controller = TenantController(options)
|
||||
mapper.connect("/v1.0/tenants", controller=tenant_controller,
|
||||
mapper.connect("/v2.0/tenants", controller=tenant_controller,
|
||||
action="create_tenant", conditions=dict(method=["POST"]))
|
||||
mapper.connect("/v1.0/tenants", controller=tenant_controller,
|
||||
mapper.connect("/v2.0/tenants", controller=tenant_controller,
|
||||
action="get_tenants", conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}",
|
||||
controller=tenant_controller,
|
||||
action="get_tenant", conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}",
|
||||
controller=tenant_controller,
|
||||
action="update_tenant", conditions=dict(method=["PUT"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}",
|
||||
controller=tenant_controller,
|
||||
action="delete_tenant", conditions=dict(method=["DELETE"]))
|
||||
|
||||
# Tenant Group Operations
|
||||
|
||||
mapper.connect("/v1.0/tenant/{tenant_id}/groups",
|
||||
mapper.connect("/v2.0/tenant/{tenant_id}/groups",
|
||||
controller=tenant_controller,
|
||||
action="create_tenant_group",
|
||||
conditions=dict(method=["POST"]))
|
||||
mapper.connect("/v1.0/tenant/{tenant_id}/groups",
|
||||
mapper.connect("/v2.0/tenant/{tenant_id}/groups",
|
||||
controller=tenant_controller,
|
||||
action="get_tenant_groups",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
mapper.connect("/v2.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
controller=tenant_controller,
|
||||
action="get_tenant_group",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
mapper.connect("/v2.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
controller=tenant_controller,
|
||||
action="update_tenant_group",
|
||||
conditions=dict(method=["PUT"]))
|
||||
mapper.connect("/v1.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
mapper.connect("/v2.0/tenant/{tenant_id}/groups/{group_id}",
|
||||
controller=tenant_controller,
|
||||
action="delete_tenant_group",
|
||||
conditions=dict(method=["DELETE"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/groups/{group_id}/users",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/groups/{group_id}/users",
|
||||
controller=tenant_controller,
|
||||
action="get_users_tenant_group",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect(
|
||||
"/v1.0/tenants/{tenant_id}/groups/{group_id}/users/{user_id}",
|
||||
"/v2.0/tenants/{tenant_id}/groups/{group_id}/users/{user_id}",
|
||||
controller=tenant_controller,
|
||||
action="add_user_tenant_group",
|
||||
conditions=dict(method=["PUT"]))
|
||||
mapper.connect(
|
||||
"/v1.0/tenants/{tenant_id}/groups/{group_id}/users/{user_id}",
|
||||
"/v2.0/tenants/{tenant_id}/groups/{group_id}/users/{user_id}",
|
||||
controller=tenant_controller,
|
||||
action="delete_user_tenant_group",
|
||||
conditions=dict(method=["DELETE"]))
|
||||
|
||||
# User Operations
|
||||
user_controller = UserController(options)
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users",
|
||||
controller=user_controller,
|
||||
action="create_user",
|
||||
conditions=dict(method=["POST"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users",
|
||||
controller=user_controller,
|
||||
action="get_tenant_users",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}/groups",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}/groups",
|
||||
controller=user_controller,
|
||||
action="get_user_groups",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}",
|
||||
controller=user_controller,
|
||||
action="get_user",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}",
|
||||
controller=user_controller,
|
||||
action="update_user",
|
||||
conditions=dict(method=["PUT"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}",
|
||||
controller=user_controller,
|
||||
action="delete_user",
|
||||
conditions=dict(method=["DELETE"]))
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}/password",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}/password",
|
||||
controller=user_controller,
|
||||
action="set_user_password",
|
||||
conditions=dict(method=["PUT"]))
|
||||
|
||||
# Test this, test failed
|
||||
mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}/enabled",
|
||||
mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}/enabled",
|
||||
controller=user_controller,
|
||||
action="set_user_enabled",
|
||||
conditions=dict(method=["PUT"]))
|
||||
|
||||
#Global Groups
|
||||
groups_controller = GroupsController(options)
|
||||
mapper.connect("/v1.0/groups", controller=groups_controller,
|
||||
mapper.connect("/v2.0/groups", controller=groups_controller,
|
||||
action="create_group", conditions=dict(method=["POST"]))
|
||||
mapper.connect("/v1.0/groups", controller=groups_controller,
|
||||
mapper.connect("/v2.0/groups", controller=groups_controller,
|
||||
action="get_groups", conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}", controller=groups_controller,
|
||||
mapper.connect("/v2.0/groups/{group_id}", controller=groups_controller,
|
||||
action="get_group", conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}", controller=groups_controller,
|
||||
mapper.connect("/v2.0/groups/{group_id}", controller=groups_controller,
|
||||
action="update_group", conditions=dict(method=["PUT"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}", controller=groups_controller,
|
||||
mapper.connect("/v2.0/groups/{group_id}", controller=groups_controller,
|
||||
action="delete_group", conditions=dict(method=["DELETE"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}/users",
|
||||
mapper.connect("/v2.0/groups/{group_id}/users",
|
||||
controller=groups_controller,
|
||||
action="get_users_global_group",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}/users/{user_id}",
|
||||
mapper.connect("/v2.0/groups/{group_id}/users/{user_id}",
|
||||
controller=groups_controller,
|
||||
action="add_user_global_group",
|
||||
conditions=dict(method=["PUT"]))
|
||||
mapper.connect("/v1.0/groups/{group_id}/users/{user_id}",
|
||||
mapper.connect("/v2.0/groups/{group_id}/users/{user_id}",
|
||||
controller=groups_controller,
|
||||
action="delete_user_global_group",
|
||||
conditions=dict(method=["DELETE"]))
|
||||
|
||||
# Miscellaneous Operations
|
||||
version_controller = VersionController(options)
|
||||
mapper.connect("/v1.0/", controller=version_controller,
|
||||
mapper.connect("/v2.0/", controller=version_controller,
|
||||
action="get_version_info",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0", controller=version_controller,
|
||||
mapper.connect("/v2.0", controller=version_controller,
|
||||
action="get_version_info",
|
||||
conditions=dict(method=["GET"]))
|
||||
|
||||
# Static Files Controller
|
||||
static_files_controller = StaticFilesController(options)
|
||||
mapper.connect("/v1.0/idmdevguide.pdf",
|
||||
mapper.connect("/v2.0/idmdevguide.pdf",
|
||||
controller=static_files_controller,
|
||||
action="get_pdf_contract",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/identity.wadl",
|
||||
mapper.connect("/v2.0/identity.wadl",
|
||||
controller=static_files_controller,
|
||||
action="get_identity_wadl",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/xsd/{xsd}",
|
||||
mapper.connect("/v2.0/xsd/{xsd}",
|
||||
controller=static_files_controller,
|
||||
action="get_pdf_contract",
|
||||
conditions=dict(method=["GET"]))
|
||||
mapper.connect("/v1.0/xsd/atom/{xsd}",
|
||||
mapper.connect("/v2.0/xsd/atom/{xsd}",
|
||||
controller=static_files_controller,
|
||||
action="get_pdf_contract",
|
||||
conditions=dict(method=["GET"]))
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,7 @@ class TestAuth(unittest.TestCase):
|
|||
|
||||
pwd_xml = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="secret" username="disabled" \
|
||||
/>'
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class authentication_test(unittest.TestCase):
|
|||
headers={"Content-Type": "application/json"})
|
||||
content = json.loads(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -57,7 +57,7 @@ class authentication_test(unittest.TestCase):
|
|||
url = '%stoken' % utils.URL
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="secrete" username="disabled" \
|
||||
/>'
|
||||
resp, content = header.request(url, "POST", body=body,
|
||||
|
@ -65,7 +65,7 @@ class authentication_test(unittest.TestCase):
|
|||
"ACCEPT": "application/xml"})
|
||||
content = etree.fromstring(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -80,7 +80,7 @@ class authentication_test(unittest.TestCase):
|
|||
headers={"Content-Type": "application/json"})
|
||||
content = json.loads(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -91,7 +91,7 @@ class authentication_test(unittest.TestCase):
|
|||
url = '%stoken' % utils.URL
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="secrete" username-w="disabled" \
|
||||
/>'
|
||||
resp, content = header.request(url, "POST", body=body,
|
||||
|
@ -99,7 +99,7 @@ class authentication_test(unittest.TestCase):
|
|||
"ACCEPT": "application/xml"})
|
||||
content = etree.fromstring(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
|
|
@ -10,7 +10,7 @@ import json
|
|||
from lxml import etree
|
||||
|
||||
|
||||
URL = 'http://localhost:8080/v1.0/'
|
||||
URL = 'http://localhost:8080/v2.0/'
|
||||
|
||||
|
||||
def get_token(user, pswd, kind='', tenant_id=None):
|
||||
|
@ -102,7 +102,7 @@ def create_global_group_xml(groupid, auth_token):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?>\
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A Description of the group</description>\
|
||||
</group>' % groupid
|
||||
resp, content = header.request(url, "POST", body=body,
|
||||
|
@ -137,19 +137,19 @@ def get_token_xml(user, pswd, type='', tenant_id=None):
|
|||
if tenant_id:
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="%s" username="%s" \
|
||||
tenantId="%s"/> ' % (pswd, user, tenant_id)
|
||||
else:
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="%s" username="%s" /> ' % (pswd, user)
|
||||
resp, content = header.request(url, "POST", body=body,
|
||||
headers={"Content-Type": "application/xml",
|
||||
"ACCEPT": "application/xml"})
|
||||
dom = etree.fromstring(content)
|
||||
root = dom.find("{http://docs.openstack.org/idm/api/v1.0}token")
|
||||
root = dom.find("{http://docs.openstack.org/identity/api/v2.0}token")
|
||||
token_root = root.attrib
|
||||
token = str(token_root['id'])
|
||||
if type == 'token':
|
||||
|
@ -172,7 +172,7 @@ def create_tenant_xml(tenantid, auth_token):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants' % (URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % tenantid
|
||||
|
@ -187,7 +187,7 @@ def create_tenant_group_xml(groupid, tenantid, auth_token):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenant/%s/groups' % (URL, tenantid)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % groupid
|
||||
|
@ -247,7 +247,7 @@ def create_user_xml(tenantid, userid, auth_token):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users' % (URL, tenantid)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="joetest@rackspace.com" \
|
||||
tenantId="%s" id="%s" \
|
||||
enabled="true" password="secrete"/>' % (tenantid, userid)
|
||||
|
@ -459,7 +459,7 @@ def handle_user_resp(self, content, respvalue, resptype):
|
|||
self.id = content.get("id")
|
||||
|
||||
if respvalue == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif respvalue == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class create_global_group_test(global_group_test):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(respG['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(respG['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(respG['status']) not in (200, 201):
|
||||
|
@ -56,7 +56,7 @@ class create_global_group_test(global_group_test):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(respG['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(respG['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -69,7 +69,7 @@ class create_global_group_test(global_group_test):
|
|||
respG, contentG = utils.create_global_group(self.global_group,
|
||||
str(self.auth_token))
|
||||
if int(respG['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(respG['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(respG['status']))
|
||||
|
@ -81,7 +81,7 @@ class create_global_group_test(global_group_test):
|
|||
str(self.auth_token))
|
||||
contentG = etree.fromstring(contentG)
|
||||
if int(respG['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(respG['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(respG['status']))
|
||||
|
@ -97,7 +97,7 @@ class create_global_group_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -106,7 +106,7 @@ class create_global_group_test(global_group_test):
|
|||
h = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % self.global_group
|
||||
|
@ -115,7 +115,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": self.token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -130,7 +130,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": \
|
||||
self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -139,7 +139,7 @@ class create_global_group_test(global_group_test):
|
|||
h = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A description...</description> \
|
||||
</group>' % self.globaltenant
|
||||
resp, content = h.request(url, "POST", body=body,
|
||||
|
@ -147,7 +147,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -160,7 +160,7 @@ class create_global_group_test(global_group_test):
|
|||
resp, content = h.request(url, "POST", body=json.dumps(body),
|
||||
headers={"Content-Type": "application/json"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -169,14 +169,14 @@ class create_global_group_test(global_group_test):
|
|||
h = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A description...</description> \
|
||||
</group>' % self.global_group
|
||||
resp, content = h.request(url, "POST", body=body,
|
||||
headers={"Content-Type": "application/xml",
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -191,7 +191,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": \
|
||||
self.disabled_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -200,7 +200,7 @@ class create_global_group_test(global_group_test):
|
|||
h = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A description...</description> \
|
||||
</group>' % self.global_group
|
||||
resp, content = h.request(url, "POST", body=body,
|
||||
|
@ -208,7 +208,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": self.disabled_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -222,7 +222,7 @@ class create_global_group_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": 'nonexsitingtoken'})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -231,7 +231,7 @@ class create_global_group_test(global_group_test):
|
|||
h = httplib2.Http(".cache")
|
||||
url = '%sgroups' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A description...</description> \
|
||||
</group>' % self.global_group
|
||||
resp, content = h.request(url, "POST", body=body,
|
||||
|
@ -239,7 +239,7 @@ class create_global_group_test(global_group_test):
|
|||
"X-Auth-Token": 'nonexsitingtoken',
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -259,7 +259,7 @@ class get_global_groups_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -274,7 +274,7 @@ class get_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -289,7 +289,7 @@ class get_global_groups_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -305,7 +305,7 @@ class get_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -321,7 +321,7 @@ class get_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": \
|
||||
self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -337,7 +337,7 @@ class get_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -355,7 +355,7 @@ class get_global_group_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -371,7 +371,7 @@ class get_global_group_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -386,7 +386,7 @@ class get_global_group_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -402,7 +402,7 @@ class get_global_group_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -422,7 +422,7 @@ class update_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
body = json.loads(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -437,7 +437,7 @@ class update_global_groups_test(global_group_test):
|
|||
|
||||
url = '%sgroups/%s' % (utils.URL, self.global_group)
|
||||
data = u'<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A NEW description...</description> \
|
||||
</group>' % (self.global_group)
|
||||
#test for Content-Type = application/json
|
||||
|
@ -447,9 +447,9 @@ class update_global_groups_test(global_group_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
body = etree.fromstring(content)
|
||||
desc = body.find("{http://docs.openstack.org/idm/api/v1.0}description")
|
||||
desc = body.find("{http://docs.openstack.org/identity/api/v2.0}description")
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -469,7 +469,7 @@ class update_global_groups_test(global_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -480,7 +480,7 @@ class update_global_groups_test(global_group_test):
|
|||
str(self.auth_token))
|
||||
url = '%sgroups/%s' % (utils.URL, self.global_group)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description_bad>A NEW description...</description> \
|
||||
</group>' % (self.global_group)
|
||||
#test for Content-Type = application/json
|
||||
|
@ -489,7 +489,7 @@ class update_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -514,7 +514,7 @@ class update_global_groups_test(global_group_test):
|
|||
str(self.auth_token))
|
||||
url = '%sgroups/NonexistingID' % (utils.URL)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="NonexistingID"> \
|
||||
<description_bad>A NEW description...</description> \
|
||||
</group>'
|
||||
|
@ -524,7 +524,7 @@ class update_global_groups_test(global_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -602,7 +602,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(respG['status']) not in (200, 201):
|
||||
|
@ -619,7 +619,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(respG['status']) not in (200, 201):
|
||||
|
@ -639,7 +639,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(respG['status']))
|
||||
|
@ -658,7 +658,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(respG['status']))
|
||||
|
@ -674,7 +674,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(respG['status']))
|
||||
|
@ -690,7 +690,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(respG['status']))
|
||||
|
@ -706,7 +706,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
str(self.disabled_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -721,7 +721,7 @@ class add_user_global_group_test(unittest.TestCase):
|
|||
self.user,
|
||||
str(self.disabled_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -762,7 +762,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(respG['status']))
|
||||
|
@ -779,7 +779,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
respG, contentG = utils.get_user_global_group_xml(self.global_group,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(respG['status']))
|
||||
|
@ -798,7 +798,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
str(self.token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(respG['status']))
|
||||
|
@ -816,7 +816,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
str(self.token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(respG['status']))
|
||||
|
@ -834,7 +834,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
str(self.disabled_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -851,7 +851,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
respG, contentG = utils.get_user_global_group_xml(self.global_group,
|
||||
str(self.disabled_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -869,7 +869,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
str(self.exp_auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -886,7 +886,7 @@ class get_users_tenant_group_test(unittest.TestCase):
|
|||
respG, contentG = utils.get_user_global_group_xml(self.global_group,
|
||||
str(self.exp_auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(respG['status']))
|
||||
|
@ -929,7 +929,7 @@ class delete_users_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(204, int(respG['status']))
|
||||
|
@ -947,7 +947,7 @@ class delete_users_global_group_test(unittest.TestCase):
|
|||
self.user,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(204, int(respG['status']))
|
||||
|
@ -968,7 +968,7 @@ class delete_users_global_group_test(unittest.TestCase):
|
|||
self.user,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(respG['status']))
|
||||
|
@ -990,7 +990,7 @@ class delete_users_global_group_test(unittest.TestCase):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(respG['status']))
|
||||
|
|
|
@ -42,8 +42,8 @@ class TestServer(unittest.TestCase):
|
|||
self.assertTrue(response.headers['content-type'] == "application/xml; charset=UTF-8")
|
||||
xml = etree.fromstring(response.unicode_body)
|
||||
|
||||
user = xml.find("{http://docs.openstack.org/idm/api/v1.0}user")
|
||||
token = xml.find("{http://docs.openstack.org/idm/api/v1.0}token")
|
||||
user = xml.find("{http://docs.openstack.org/identity/api/v2.0}user")
|
||||
token = xml.find("{http://docs.openstack.org/identity/api/v2.0}token")
|
||||
|
||||
self.assertTrue(user.get("username"),"username")
|
||||
self.assertTrue(user.get("tenantId"),'12345');
|
||||
|
@ -72,7 +72,7 @@ class TestServer(unittest.TestCase):
|
|||
pwd_cred = auth.PasswordCredentials("username","password","1")
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<passwordCredentials \
|
||||
xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="secret" username="disabled" \
|
||||
/>'
|
||||
str=StringIO()
|
||||
|
|
|
@ -36,7 +36,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
|
||||
resp, content = util.delete_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
|
@ -64,7 +64,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
|
||||
content = etree.fromstring(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(resp['status']) not in (200, 201):
|
||||
|
@ -83,7 +83,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
self.tenant = content['tenant']['id']
|
||||
self.tenant_group = content['group']['id']
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -98,7 +98,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
self.tenant,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -121,7 +121,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -133,7 +133,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
self.tenant = content['tenant']['id']
|
||||
url = '%stenant/%s/groups' % (util.URL, self.tenant)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"><description>A description...</description> \
|
||||
</group>' % self.tenant_group
|
||||
resp, content = header.request(url, "POST", body=body,
|
||||
|
@ -141,7 +141,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -158,7 +158,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -172,7 +172,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
self.tenant = content.get('id')
|
||||
url = '%stenant/%s/groups' % (util.URL, self.tenant)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % self.tenant
|
||||
|
@ -181,7 +181,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -197,7 +197,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
resp, content = header.request(url, "POST", body=json.dumps(body),
|
||||
headers={"Content-Type": "application/json"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -211,7 +211,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
self.tenant = content.get('id')
|
||||
url = '%stenant/%s/groups' % (util.URL, self.tenant)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % self.tenant_group
|
||||
|
@ -219,7 +219,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/xml",
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -238,7 +238,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.disabled_token})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -253,7 +253,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
|
||||
url = '%stenant/%s/groups' % (util.URL, self.tenant)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % self.tenant_group
|
||||
|
@ -262,7 +262,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.disabled_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -281,7 +281,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": 'nonexsitingtoken'})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -296,7 +296,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
|
||||
url = '%stenant/%s/groups' % (util.URL, self.tenant)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</group>' % self.tenant_group
|
||||
|
@ -306,7 +306,7 @@ class create_tenant_group_test(tenant_group_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -328,7 +328,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -346,7 +346,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -364,7 +364,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -382,7 +382,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
"X-Auth-Token": self.token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -399,7 +399,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -417,7 +417,7 @@ class get_tenant_groups_test(tenant_group_test):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -438,7 +438,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -457,7 +457,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -476,7 +476,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -495,7 +495,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -513,7 +513,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -533,7 +533,7 @@ class get_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -563,7 +563,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
|
||||
body = json.loads(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -587,7 +587,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
url = '%stenant/%s/groups/%s' % (util.URL, self.tenant,
|
||||
self.tenant_group)
|
||||
|
||||
data = '<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
data = '<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
tenantId="%s" id="%s"> \
|
||||
<description>A NEW description...</description> \
|
||||
</group>' % (self.tenant, self.tenant_group)
|
||||
|
@ -599,10 +599,10 @@ class update_tenant_group_test(tenant_group_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
body = etree.fromstring(content)
|
||||
desc = body.find("{http://docs.openstack.org/idm/api/v1.0}description")
|
||||
desc = body.find("{http://docs.openstack.org/identity/api/v2.0}description")
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -629,7 +629,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -646,7 +646,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
url = '%stenant/%s/groups/%s' % (util.URL, self.tenant,
|
||||
self.tenant_group)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
tenantId="%s" id="%s"> \
|
||||
<description_bad>A NEW description...</description> \
|
||||
</group>' % (self.tenant, self.tenant_group)
|
||||
|
@ -656,7 +656,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -679,7 +679,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -689,7 +689,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
url = '%stenant/%s/groups/NonexistingID' % (util.URL, self.tenant)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<group xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<group xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
id="NonexistingID", "tenant_id"="test_tenant"> \
|
||||
<description_bad>A NEW description...</description> \
|
||||
</group>'
|
||||
|
@ -699,7 +699,7 @@ class update_tenant_group_test(tenant_group_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -786,7 +786,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(resp['status']) not in (200, 201):
|
||||
|
@ -805,7 +805,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(resp['status']) not in (200, 201):
|
||||
|
@ -827,7 +827,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
self.user,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -848,7 +848,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
str(self.auth_token))
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -866,7 +866,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
self.user, self.token)
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -884,7 +884,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
self.user, self.token)
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -903,7 +903,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
self.disabled_token)
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -922,7 +922,7 @@ class add_user_tenant_group_test(tenant_group_test):
|
|||
self.disabled_token)
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -956,7 +956,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -978,7 +978,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_xml(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -999,7 +999,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_unauthorized(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1021,7 +1021,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_unauthorized_xml(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_forbidden(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1063,7 +1063,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_forbidden_xml(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1084,7 +1084,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_expired(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1104,7 +1104,7 @@ class get_users_tenant_group_test(tenant_group_test):
|
|||
def test_get_users_tenant_group_expired_xml(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1128,7 +1128,7 @@ class delete_users_tenant_group_test(tenant_group_test):
|
|||
def test_delete_user_tenant_group(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1150,7 +1150,7 @@ class delete_users_tenant_group_test(tenant_group_test):
|
|||
def test_delete_user_tenant_group_xml(self):
|
||||
resp, content = util.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
resp, content = util.create_tenant_group(self.tenant_group,
|
||||
|
@ -1175,7 +1175,7 @@ class delete_users_tenant_group_test(tenant_group_test):
|
|||
'NonExistinguser',
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -1186,7 +1186,7 @@ class delete_users_tenant_group_test(tenant_group_test):
|
|||
'NonExistinguser',
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
|
|
@ -31,7 +31,7 @@ class create_tenant_test(tenant_test):
|
|||
resp, content = utils.delete_tenant(self.tenant, str(self.auth_token))
|
||||
resp, content = utils.create_tenant(self.tenant, str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -46,7 +46,7 @@ class create_tenant_test(tenant_test):
|
|||
str(self.auth_token))
|
||||
content = etree.fromstring(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
if int(resp['status']) not in (200, 201):
|
||||
|
@ -61,7 +61,7 @@ class create_tenant_test(tenant_test):
|
|||
resp, content = utils.create_tenant(self.tenant,
|
||||
str(self.auth_token))
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -74,7 +74,7 @@ class create_tenant_test(tenant_test):
|
|||
str(self.auth_token))
|
||||
content = etree.fromstring(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, int(resp['status']))
|
||||
|
@ -94,7 +94,7 @@ class create_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.token})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -109,7 +109,7 @@ class create_tenant_test(tenant_test):
|
|||
|
||||
url = '%stenants' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % self.tenant
|
||||
|
@ -119,7 +119,7 @@ class create_tenant_test(tenant_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -138,7 +138,7 @@ class create_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -153,7 +153,7 @@ class create_tenant_test(tenant_test):
|
|||
|
||||
url = '%stenants' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % self.tenant
|
||||
|
@ -164,7 +164,7 @@ class create_tenant_test(tenant_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -184,7 +184,7 @@ class create_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json"})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -198,7 +198,7 @@ class create_tenant_test(tenant_test):
|
|||
self.tenant = content.get('id')
|
||||
url = '%stenants' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % self.tenant
|
||||
|
@ -206,7 +206,7 @@ class create_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/xml",
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -227,7 +227,7 @@ class create_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.disabled_token})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -241,7 +241,7 @@ class create_tenant_test(tenant_test):
|
|||
self.tenant = content.get('id')
|
||||
url = '%stenants' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % self.tenant
|
||||
|
@ -250,7 +250,7 @@ class create_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.disabled_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -271,7 +271,7 @@ class create_tenant_test(tenant_test):
|
|||
"X-Auth-Token": 'nonexsitingtoken'})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -286,7 +286,7 @@ class create_tenant_test(tenant_test):
|
|||
|
||||
url = '%stenants' % (utils.URL)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" id="%s"> \
|
||||
<description>A description...</description> \
|
||||
</tenant>' % self.tenant
|
||||
|
@ -296,7 +296,7 @@ class create_tenant_test(tenant_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -313,7 +313,7 @@ class get_tenants_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -328,7 +328,7 @@ class get_tenants_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -342,7 +342,7 @@ class get_tenants_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -357,7 +357,7 @@ class get_tenants_test(tenant_test):
|
|||
"X-Auth-Token": self.token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -371,7 +371,7 @@ class get_tenants_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -386,7 +386,7 @@ class get_tenants_test(tenant_test):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -403,7 +403,7 @@ class get_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -418,7 +418,7 @@ class get_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -432,7 +432,7 @@ class get_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -447,7 +447,7 @@ class get_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -461,7 +461,7 @@ class get_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -476,7 +476,7 @@ class get_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -496,7 +496,7 @@ class update_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
body = json.loads(content)
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -509,7 +509,7 @@ class update_tenant_test(tenant_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s' % (utils.URL, self.tenant)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true"> \
|
||||
<description>A NEW description...</description> \
|
||||
</tenant>'
|
||||
|
@ -520,9 +520,9 @@ class update_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
body = etree.fromstring(content)
|
||||
desc = body.find("{http://docs.openstack.org/idm/api/v1.0}description")
|
||||
desc = body.find("{http://docs.openstack.org/identity/api/v2.0}description")
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -541,7 +541,7 @@ class update_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -551,7 +551,7 @@ class update_tenant_test(tenant_test):
|
|||
resp, content = utils.create_tenant(self.tenant, str(self.auth_token))
|
||||
url = '%stenants/%s' % (utils.URL, self.tenant)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true"> \
|
||||
<description_bad>A NEW description...</description> \
|
||||
</tenant>'
|
||||
|
@ -561,7 +561,7 @@ class update_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(400, int(resp['status']))
|
||||
|
@ -577,7 +577,7 @@ class update_tenant_test(tenant_test):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
@ -587,7 +587,7 @@ class update_tenant_test(tenant_test):
|
|||
resp, content = utils.create_tenant(self.tenant, str(self.auth_token))
|
||||
url = '%stenants/NonexistingID' % (utils.URL)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<tenant xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<tenant xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true"> \
|
||||
<description_bad>A NEW description...</description> \
|
||||
</tenant>'
|
||||
|
@ -597,7 +597,7 @@ class update_tenant_test(tenant_test):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, int(resp['status']))
|
||||
|
|
|
@ -30,7 +30,7 @@ class validate_token(unittest.TestCase):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -44,7 +44,7 @@ class validate_token(unittest.TestCase):
|
|||
"X-Auth-Token": self.auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, int(resp['status']))
|
||||
|
@ -58,7 +58,7 @@ class validate_token(unittest.TestCase):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.exp_auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -74,7 +74,7 @@ class validate_token(unittest.TestCase):
|
|||
"X-Auth-Token": self.exp_auth_token,
|
||||
"ACCEPT": "application/xml"})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, int(resp['status']))
|
||||
|
@ -89,7 +89,7 @@ class validate_token(unittest.TestCase):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
@ -103,7 +103,7 @@ class validate_token(unittest.TestCase):
|
|||
headers={"Content-Type": "application/json",
|
||||
"X-Auth-Token": self.auth_token})
|
||||
if int(resp['status']) == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif int(resp['status']) == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, int(resp['status']))
|
||||
|
|
|
@ -360,7 +360,7 @@ class delete_user_test(user_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(204, resp_val)
|
||||
|
@ -376,7 +376,7 @@ class delete_user_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(204, resp_val)
|
||||
|
@ -392,7 +392,7 @@ class delete_user_test(user_test):
|
|||
"X-Auth-Token": self.exp_auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -409,7 +409,7 @@ class delete_user_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -426,7 +426,7 @@ class delete_user_test(user_test):
|
|||
"X-Auth-Token": self.missing_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -443,7 +443,7 @@ class delete_user_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -460,7 +460,7 @@ class delete_user_test(user_test):
|
|||
"X-Auth-Token": self.invalid_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -477,7 +477,7 @@ class delete_user_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -493,7 +493,7 @@ class delete_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -509,7 +509,7 @@ class delete_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -526,7 +526,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, resp_val)
|
||||
|
@ -540,7 +540,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, resp_val)
|
||||
|
@ -554,7 +554,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.exp_auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -568,7 +568,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -582,7 +582,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.disabled_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -596,7 +596,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -610,7 +610,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.missing_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -624,7 +624,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -638,7 +638,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.invalid_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -652,7 +652,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -666,7 +666,7 @@ class get_users_test(user_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -681,7 +681,7 @@ class get_users_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -698,7 +698,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, resp_val)
|
||||
|
@ -712,7 +712,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(200, resp_val)
|
||||
|
@ -726,7 +726,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.exp_auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -740,7 +740,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -754,7 +754,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.disabled_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -768,7 +768,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -782,7 +782,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.missing_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -796,7 +796,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -810,7 +810,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.invalid_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -824,7 +824,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -838,7 +838,7 @@ class get_users_group_test(user_test):
|
|||
"X-Auth-Token": self.auth_token})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
|
||||
|
@ -853,7 +853,7 @@ class get_users_group_test(user_test):
|
|||
"ACCEPT": "application/xml"})
|
||||
resp_val = int(resp['status'])
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -877,7 +877,7 @@ class update_user_test(user_test):
|
|||
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -891,7 +891,7 @@ class update_user_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -901,7 +901,7 @@ class update_user_test(user_test):
|
|||
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -919,7 +919,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -928,7 +928,7 @@ class update_user_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.userdisabled)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -937,7 +937,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -955,7 +955,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, resp_val)
|
||||
|
@ -966,7 +966,7 @@ class update_user_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="joe@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -975,7 +975,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(409, resp_val)
|
||||
|
@ -993,7 +993,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1005,7 +1005,7 @@ class update_user_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1014,7 +1014,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1031,7 +1031,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1040,7 +1040,7 @@ class update_user_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1049,7 +1049,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1065,7 +1065,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1074,7 +1074,7 @@ class update_user_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1083,7 +1083,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1101,7 +1101,7 @@ class update_user_test(user_test):
|
|||
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1110,7 +1110,7 @@ class update_user_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1119,7 +1119,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1135,7 +1135,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -1144,7 +1144,7 @@ class update_user_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
email="updatedjoeuser@rackspace.com" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1153,7 +1153,7 @@ class update_user_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -1174,7 +1174,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1187,7 +1187,7 @@ class set_password_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1196,7 +1196,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1215,7 +1215,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1224,7 +1224,7 @@ class set_password_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s' % (URL, self.tenant, self.userdisabled)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1233,7 +1233,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1251,7 +1251,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1263,7 +1263,7 @@ class set_password_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1272,7 +1272,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1289,7 +1289,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1298,7 +1298,7 @@ class set_password_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1307,7 +1307,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1323,7 +1323,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1332,7 +1332,7 @@ class set_password_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1341,7 +1341,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1357,7 +1357,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1366,7 +1366,7 @@ class set_password_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1375,7 +1375,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1391,7 +1391,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -1400,7 +1400,7 @@ class set_password_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
password="p@ssword" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1409,7 +1409,7 @@ class set_password_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -1431,7 +1431,7 @@ class set_enabled_test(user_test):
|
|||
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1444,7 +1444,7 @@ class set_enabled_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s/enabled' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1453,7 +1453,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1473,7 +1473,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1485,7 +1485,7 @@ class set_enabled_test(user_test):
|
|||
str(self.auth_token))
|
||||
url = '%stenants/%s/users/%s/enabled' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1494,7 +1494,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
delete_user(self.tenant, self.user, str(self.auth_token))
|
||||
|
@ -1511,7 +1511,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1520,7 +1520,7 @@ class set_enabled_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/enabled' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1529,7 +1529,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1545,7 +1545,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1554,7 +1554,7 @@ class set_enabled_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/enabled' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1563,7 +1563,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(403, resp_val)
|
||||
|
@ -1579,7 +1579,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1588,7 +1588,7 @@ class set_enabled_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/enabled' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",\
|
||||
|
@ -1597,7 +1597,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(404, resp_val)
|
||||
|
@ -1613,7 +1613,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = json.loads(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
@ -1622,7 +1622,7 @@ class set_enabled_test(user_test):
|
|||
header = httplib2.Http(".cache")
|
||||
url = '%stenants/%s/users/%s/password' % (URL, self.tenant, self.user)
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<user xmlns="http://docs.openstack.org/idm/api/v1.0" \
|
||||
<user xmlns="http://docs.openstack.org/identity/api/v2.0" \
|
||||
enabled="true" />'
|
||||
resp, content = header.request(url, "PUT", body=data,
|
||||
headers={"Content-Type": "application/xml",
|
||||
|
@ -1631,7 +1631,7 @@ class set_enabled_test(user_test):
|
|||
resp_val = int(resp['status'])
|
||||
content = etree.fromstring(content)
|
||||
if resp_val == 500:
|
||||
self.fail('IDM fault')
|
||||
self.fail('Identity Fault')
|
||||
elif resp_val == 503:
|
||||
self.fail('Service Not Available')
|
||||
self.assertEqual(401, resp_val)
|
||||
|
|
Loading…
Reference in New Issue