1.Changed all Json paginated collection structure.

2.Introduced a type for credential type (path param) and change wadls and xsds.
3.Added List Users call.
4.Changed Endpoint creation example.

Change-Id: I1f107bcee60f96c0b67126379fec51cecc7cbcd8
This commit is contained in:
Yogeshwar Srikrishnan 2011-09-12 11:30:53 -05:00
parent 92bb429347
commit 06f37ccd1e
33 changed files with 506 additions and 494 deletions

View File

@ -40,6 +40,7 @@
<doc>You need a valid admin token for access.</doc>
</param>
<resource id="users" path="users">
<method href="#listUsers"/>
<method href="#addUser"/>
<resource id="userById" path="{userId}">
<method href="#updateUser"/>
@ -63,10 +64,7 @@
<method href="#addUserCredential"/>
<method href="#listCredentials"/>
<resource id="userCredentialsByType" path="{credential-type}">
<method href="#listCredentialsByType"/>
</resource>
<resource id="userCredentialByTypeAndId" path="{credential-type-and-optional-id}">
<param name="credentialTypeAndId" style="template" type="xsd:string"/>
<param name="credentialType" style="template" type="OS-KSADM:extensibleCredentialsType"/>
<method href="#updateUserCredential"/>
<method href="#deleteUserCredential"/>
<method href="#getUserCredential"/>
@ -269,7 +267,7 @@
<method name="PUT" id="addRolesToUserOnTenant">
<doc xml:lang="EN" title="Add roles on a tenant.">
<p xmlns="http://www.w3.org/1999/xhtml">Adds a specific role to a user for a tenant.</p>
<examples xmlns="http://docs.rackspace.com/api">
<examples xmlns="http://docs.rackspace.com/api" title="Add role to a user for a Tenant Request ">
<example href="../common/samples/norequestbody.txt"/>
</examples>
</doc>
@ -292,6 +290,23 @@
</method>
<!--User Operations-->
<method name="GET" id="listUsers">
<doc xml:lang="EN" title="List users">
<p xmlns="http://www.w3.org/1999/xhtml">List users.</p>
<examples xmlns="http://docs.rackspace.com/api" title="List Users Response">
<example href="../common/samples/users.xml" language="xml"/>
<example href="../common/samples/users.json" language="javascript"/>
</examples>
</doc>
<response status="200 203">
<representation mediaType="application/xml" element="identity:userss"/>
<representation mediaType="application/json"/>
</response>
&commonFaults;
&getFaults;
</method>
<method name="POST" id="addUser">
<doc xml:lang="EN" title="Add user">
<p xmlns="http://www.w3.org/1999/xhtml">Adds a user.</p>
@ -370,7 +385,7 @@
</doc>
<request>
<representation mediaType="application/xml" element="identity:user">
<param name="user" style="plain" path="/" type="identity:UserWithOnlyEnabled"/>
<param name="user" style="plain" path="/" type="OS-KSADM:UserWithOnlyEnabled"/>
</representation>
<representation mediaType="application/json"/>
</request>
@ -406,7 +421,7 @@
<method name="PUT" id="addUserRole">
<doc xml:lang="EN" title="Add Global roles to a user.">
<p xmlns="http://www.w3.org/1999/xhtml">Adds a specific global role to a user.</p>
<examples xmlns="http://docs.rackspace.com/api">
<examples xmlns="http://docs.rackspace.com/api" title="Adds global role to a user request">
<example href="../common/samples/norequestbody.txt"/>
</examples>
</doc>
@ -436,7 +451,7 @@
<method name="DELETE" id="deleteUserRole">
<doc xml:lang="EN" title="Delete Global Roles on User.">
<p xmlns="http://www.w3.org/1999/xhtml">Deletes a specific global role from a user.</p>
<examples xmlns="http://docs.rackspace.com/api">
<examples xmlns="http://docs.rackspace.com/api" title="Deletes global role from a user">
<example href="../common/samples/norequestbody.txt"/>
</examples>
</doc>
@ -540,7 +555,7 @@
</method>
<method name="POST" id="deleteUserCredential">
<doc xml:lang="EN" title="Update user credential">
<doc xml:lang="EN" title="Delete user credential">
<p xmlns="http://www.w3.org/1999/xhtml">Delete User credentials.</p>
<examples xmlns="http://docs.rackspace.com/api" title="Delete User Credentials">
<example href="../common/samples/norequestbody.txt"/>

View File

@ -157,8 +157,8 @@
<doc xml:lang="EN" title="Add Endpoint">
<p xmlns="http://www.w3.org/1999/xhtml">Add Endpoint to a tenant.</p>
<examples xmlns="http://docs.rackspace.com/api" title="Add Endpoint Request">
<example href="../common/samples/endpoint.xml" language="xml"/>
<example href="../common/samples/endpoint.json" language="javascript"/>
<example href="../common/samples/endpointTemplateWithOnlyId.xml" language="xml"/>
<example href="../common/samples/endpointTemplateWithOnlyId.json" language="javascript"/>
</examples>
<examples xmlns="http://docs.rackspace.com/api" title="Add Endpoint Response">
<example href="../common/samples/endpoint.xml" language="xml"/>
@ -166,7 +166,9 @@
</examples>
</doc>
<request>
<representation mediaType="application/xml" element="identity:endpoint"/>
<representation mediaType="application/xml" element="OS-KSCATALOG:endpointTemplate">
<param name="endpoint" style="plain" path="/" type="OS-KSCATALOG:EndpointTemplateWithOnlyId"/>
</representation>
<representation mediaType="application/json"/>
</request>
<response status="201">

View File

@ -1,11 +1,8 @@
{
"RAX-KSGRP:groups": {
"values": [
{
"RAX-KSGRP:groups":[{
"id":"test_global_group_add",
"description":"A description ..."
}
],
"links": []
}
"RAX-KSGRP:groups_links":[]
}

View File

@ -7,20 +7,16 @@
"user":{
"id":"testId",
"name":"testName",
"roles":{
"values":[{
"roles":[{
"id":"compute:admin"
}
],
"links": []
}
"roles_links":[]
},
"serviceCatalog":{
"values":[{
"serviceCatalog":[{
"name":"Cloud Servers",
"type":"compute",
"endpoints":{
"values":[{
"endpoints":[{
"publicURL":"https://compute.north.host/v1/1234",
"internalURL":"https://compute.north.host/v1/1234",
"region":"North",
@ -38,16 +34,13 @@
"versionInfo":"https://compute.north.host/v1.1/",
"versionList":"https://compute.north.host/"
}
],
"links": []
}
"endpoints_links":[]
},
{
"name":"Cloud Files",
"type":"object-store",
"endpoints":{
"values":[{
"endpoints":[{
"publicURL":"https://compute.north.host/v1/blah-blah",
"internalURL":"https://compute.north.host/v1/blah-blah",
"region":"South",
@ -66,19 +59,17 @@
"versionList":"https://compute.north.host/"
}
],
"links":[{
"endpoints_links":[{
"rel":"next",
"href":"https://identity.north.host/v2.0/endpoints?marker=2"
}
]
}
}
],
"links":[{
"serviceCatalog_links":[{
"rel":"next",
"href":"https://identity.host/v2.0/endpoints?session=2hfh8Ar&marker=2"
}
]
}
}
}

View File

@ -3,6 +3,7 @@
"RAX-KSKEY:apikeyCredentials":{
"username":"test_user",
"apikey":"aaaaa-bbbbb-ccccc-12345678"
}"tenantId": "1234"
},
"tenantId":"1234"
}
}

View File

@ -7,29 +7,22 @@
"user":{
"id":"testId",
"name":"testName",
"roles":{
"values":[{
"roles":[{
"id":"compute:admin"
}
],
"links": []
},
"RAX-KSGRP:groups": {
"values": [
{
"roles_links":[],
"RAX-KSGRP:groups":[{
"id":"test_global_group_add",
"description":"A description ..."
}
],
"links": []
}
"RAX-KSGRP:groups_links":[]
},
"serviceCatalog":{
"values":[{
"serviceCatalog":[{
"name":"Cloud Servers",
"type":"compute",
"endpoints":{
"values":[{
"endpoints":[{
"publicURL":"https://compute.north.host/v1/1234",
"internalURL":"https://compute.north.host/v1/1234",
"region":"North",
@ -48,14 +41,12 @@
"versionList":"https://compute.north.host/"
}
],
"links": []
}
"endpoints_links":[]
},
{
"name":"Cloud Files",
"type":"object-store",
"endpoints":{
"values":[{
"endpoints":[{
"publicURL":"https://compute.north.host/v1/blah-blah",
"internalURL":"https://compute.north.host/v1/blah-blah",
"region":"South",
@ -74,19 +65,17 @@
"versionList":"https://compute.north.host/"
}
],
"links":[{
"endpoints_links":[{
"rel":"next",
"href":"https://identity.north.host/v2.0/endpoints?marker=2"
}
]
}
}
],
"links":[{
"serviceCatalog_links":[{
"rel":"next",
"href":"https://identity.host/v2.0/endpoints?session=2hfh8Ar&marker=2"
}
]
}
}
}

View File

@ -1,67 +1,64 @@
{
"choices": {
"values": [
{
"choices":[{
"id":"v1.0",
"status":"DEPRECATED",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v1.0"
}
],
"media-types":{
"values": [
{
"values":[{
"base":"application/xml",
"type":"application/vnd.openstack.identity+xml;version=1.0"
}, {
},
{
"base":"application/json",
"type":"application/vnd.openstack.identity+json;version=1.0"
}
]
}
}, {
},
{
"id":"v1.1",
"status":"CURRENT",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v1.1"
}
],
"media-types":{
"values": [
{
"values":[{
"base":"application/xml",
"type":"application/vnd.openstack.identity+xml;version=1.1"
}, {
},
{
"base":"application/json",
"type":"application/vnd.openstack.identity+json;version=1.1"
}
]
}
}, {
},
{
"id":"v2.0",
"status":"BETA",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v2.0"
}
],
"media-types":{
"values": [
{
"values":[{
"base":"application/xml",
"type":"application/vnd.openstack.identity+xml;version=2.0"
}, {
},
{
"base":"application/json",
"type":"application/vnd.openstack.identity+json;version=2.0"
}
]
}
}
]
}
],
"choices_links":""
}

View File

@ -1,13 +1,10 @@
{
"credentials": {
"values": [
{
"credentials":[{
"passwordCredentials":{
"username":"test_user",
"password":"mypass"
}
}
],
"links": []
}
"credentials_links":[]
}

View File

@ -0,0 +1,5 @@
{
"OS-KSCATALOG:endpointTemplate":{
"id":1,
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<endpointTemplate
xmlns="http://docs.openstack.org/identity/api/ext/OS-KSCATALOG/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="EndpointTemplateWithOnlyId"
id="1"/>

View File

@ -1,6 +1,5 @@
{
"OS-KSCATALOG:endpointsTemplates": {
"values": [
"OS-KSCATALOG:endpointsTemplates": [
{
"id": 1,
"region": "North",
@ -56,6 +55,5 @@
"enabled": true
}
],
"links": []
}
"OS-KSCATALOG:endpointsTemplates_links": []
}

View File

@ -1,6 +1,5 @@
{
"endpoints":{
"values":[{
"endpoints":[{
"id":1,
"region":"North",
"type":"compute",
@ -51,6 +50,5 @@
"versionList":"https://compute.north.public.com/"
}
],
"links":[]
}
"endpoints_links":[]
}

View File

@ -1,13 +1,12 @@
{
"user": {
"roles": {
"values": [
"roles": [
{
"tenantId": "1234",
"id": "Admin"
}
]
},
],
"roles_links": [],
"id": "u1000",
"username": "jqsmith",
"email": "john.smith@example.org",

View File

@ -1,41 +1,40 @@
{
"extensions": {
"values": [
{
"extensions":[{
"name":"Reset Password Extension",
"namespace":"http://docs.rackspacecloud.com/identity/api/ext/rpe/v2.0",
"alias":"RS-RPE",
"updated":"2011-01-22T13:25:27-06:00",
"description":"Adds the capability to reset a user's password. The user is emailed when the password has been reset.",
"links": [
{
"links":[{
"rel":"describedby",
"type":"application/pdf",
"href":"http://docs.rackspacecloud.com/identity/api/ext/identity-rpe-20111111.pdf"
}, {
},
{
"rel":"describedby",
"type":"application/vnd.sun.wadl+xml",
"href":"http://docs.rackspacecloud.com/identity/api/ext/identity-rpe.wadl"
}
]
}, {
},
{
"name":"User Metadata Extension",
"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.",
"links": [
{
"links":[{
"rel":"describedby",
"type":"application/pdf",
"href":"http://docs.rackspacecloud.com/identity/api/ext/identity-meta-20111201.pdf"
}, {
},
{
"rel":"describedby",
"type":"application/vnd.sun.wadl+xml",
"href":"http://docs.rackspacecloud.com/identity/api/ext/identity-meta.wadl"
}
]
}
]
}
],
"extensions_links":[]
}

View File

@ -1,22 +1,19 @@
{
"user":{
"roles": {
"values": [
{
"roles":[{
"tenantId":"1234",
"id":"Admin"
}, {
},
{
"tenantId":"1234",
"id":"DBUser"
}
],
"links": [
{
"roles_links":[{
"rel":"next",
"href":"http://identity.api.openstack.org/v2.0/tenants/1234/users/u1000/roles?marker=Super"
}
]
},
],
"id":"u1000",
"username":"jqsmith",
"email":"john.smith@example.org",

View File

@ -1,9 +1,7 @@
{
"roles":{
"values":[{
"roles":[{
"id":"compute:admin"
}
],
"links":[]
}
"roles_links":[]
}

View File

@ -1,6 +1,5 @@
{
"OS-KSADM:services":{
"values":[{
"OS-KSADM:services":[{
"id":"nova",
"type":"compute",
"description":"Computers in the Cloud"
@ -10,7 +9,6 @@
"type":"image-service",
"description":"Server Images"
}
]
},
"links":[]
],
"OS-KSADM:services_links":[]
}

View File

@ -1,18 +1,14 @@
{
"tenants": {
"values": [
{
"tenants":[{
"id":"1234",
"name":"ACME corp",
"description":"A description ...",
"enabled":true
}
],
"links": [
{
"tenants_links":[{
"rel":"next",
"href":"http://identity.api.openstack.org/v2.0/tenants?limit=1&marker=1234"
}
]
}
}

View File

@ -1,21 +1,18 @@
{
"tenants": {
"values": [
{
"tenants":[{
"id":"3645",
"name":"Iron Works",
"description":"A description ...",
"enabled":true
}
],
"links": [
{
"tenants_links":[{
"rel":"next",
"href":"http://identity.api.openstack.org/v2.0/tenants?limit=1&marker=3645"
}, {
},
{
"rel":"previous",
"href":"http://identity.api.openstack.org/v2.0/tenants?limit=1"
}
]
}
}

View File

@ -1,18 +1,14 @@
{
"tenants": {
"values": [
{
"tenants":[{
"id":"9999",
"name":"Bigz",
"description":"A description ...",
"enabled":true
}
],
"links": [
{
"tenants_links":[{
"rel":"previous",
"href":"http://identity.api.openstack.org/v2.0/tenants?limit=1&marker=1234"
}
]
}
}

View File

@ -1,17 +1,16 @@
{
"tenants": {
"values": [
{
"tenants":[{
"id":"1234",
"name":"ACME Corp",
"description":"A description ...",
"enabled":true
}, {
},
{
"id":"3456",
"name":"Iron Works",
"description":"A description ...",
"enabled":true
}
]
}
],
"tenants_links":[]
}

View File

@ -1,18 +1,16 @@
{
"users": {
"values": [
{
"users":[{
"id":"u1000",
"username":"jqsmith",
"email":"john.smith@example.org",
"enabled":true
}, {
},
{
"id":"u1001",
"username":"jqsmith",
"email":"john.smith@example.org",
"enabled":true
}
],
"links":[]
}
"users_links":[]
}

View File

@ -5,5 +5,5 @@
username="jqsmith" id="u1000"/>
<user xmlns="http://docs.openstack.org/identity/api/v2.0"
enabled="true" email="john.smith@example.org"
username="jqsmith" id="u1000"/>
username="jqsmith" id="u1001"/>
</users>

View File

@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<user xmlns="http://docs.openstack.org/identity/api/v2.0"
<user xmlns="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="UserWithOnlyEnabled"
enabled="true"/>

View File

@ -7,13 +7,11 @@
"user":{
"id":"testId",
"name":"testName",
"roles":{
"values":[{
"roles":[{
"id":"compute:admin"
}
],
"links":[]
}
"roles_links":[]
}
}
}

View File

@ -1,37 +1,34 @@
{
"versions": {
"values": [
{
"versions":[{
"id":"v1.0",
"status":"DEPRECATED",
"updated":"2009-10-09T11:30:00Z",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v1.0/"
}
]
}, {
},
{
"id":"v1.1",
"status":"CURRENT",
"updated":"2010-12-12T18:30:02.25Z",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v1.1/"
}
]
}, {
},
{
"id":"v2.0",
"status":"BETA",
"updated":"2011-05-27T20:22:02.25Z",
"links": [
{
"links":[{
"rel":"self",
"href":"http://identity.api.openstack.org/v2.0/"
}
]
}
]
}
],
"versions_links":[]
}

View File

@ -48,6 +48,18 @@
</annotation>
</element>
<element name="extensibleCredentialsType" type="OS-KSADM:ExtensibleCredentialsType">
<annotation>
<xsd:documentation
xml:lang="EN"
xmlns="http://www.w3.org/1999/xhtml">
<p>
An extensible credentials type.
</p>
</xsd:documentation>
</annotation>
</element>
<!-- Complex Types -->
<complexType name="Service">
<attribute name="id" type="xsd:string" use="required"/>
@ -64,4 +76,32 @@
</sequence>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
<simpleType name="PasswordCredentialsType">
<restriction base="xsd:string">
<enumeration value="password"/>
</restriction>
</simpleType>
<simpleType name="ExtensionCredentialsType">
<restriction base="xsd:string">
<pattern value="(\w|-)+-\w+"/>
</restriction>
</simpleType>
<simpleType name="ExtensibleCredentialsType">
<union memberTypes="OS-KSADM:PasswordCredentialsType OS-KSADM:ExtensionCredentialsType"/>
</simpleType>
<!-- Complex Types -->
<complexType name="UserWithOnlyEnabled">
<complexContent>
<restriction base="identity:User">
<attribute name="id" type="xsd:ID" use="prohibited"/>
<attribute name="email" type="xsd:string" use="prohibited"/>
<attribute name="username" type="xsd:ID" use="prohibited"/>
<attribute name="enabled" type="xsd:boolean" use="required"/>
</restriction>
</complexContent>
</complexType>
</schema>

View File

@ -63,7 +63,7 @@
<element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="id" type="xsd:int" use="required">
<attribute name="id" type="xsd:string" use="required">
<annotation>
<xsd:documentation
xml:lang="EN"
@ -74,7 +74,7 @@
</xsd:documentation>
</annotation>
</attribute>
<attribute name="type" type="identity:ExtensibleServiceType" use="required">
<attribute name="type" type="identity:ExtensibleServiceType" use="optional">
<annotation>
<xsd:documentation
xml:lang="EN"
@ -107,7 +107,7 @@
</xsd:documentation>
</annotation>
</attribute>
<attribute name="publicURL" type="xsd:anyURI" use="required">
<attribute name="publicURL" type="xsd:anyURI" use="optional">
<annotation>
<xsd:documentation
xml:lang="EN"
@ -174,4 +174,20 @@
</sequence>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
<complexType name="EndpointTemplateWithOnlyId">
<complexContent>
<restriction base="OS-KSCATALOG:EndpointTemplate">
<attribute name="id" type="xsd:string" use="required"/>
<attribute name="type" type="identity:ExtensibleServiceType" use="prohibited"/>
<attribute name="name" type="xsd:string" use="prohibited"/>
<attribute name="region" type="xsd:string" use="prohibited"/>
<attribute name="publicURL" type="xsd:anyURI" use="prohibited"/>
<attribute name="internalURL" type="xsd:anyURI" use="prohibited"/>
<attribute name="adminURL" type="xsd:anyURI" use="prohibited"/>
<attribute name="global" type="xsd:boolean" use="prohibited"/>
<attribute name="enabled" type="xsd:boolean" use="prohibited"/>
</restriction>
</complexContent>
</complexType>
</schema>

View File

@ -18,19 +18,6 @@
schemaLocation="user.xsd"/>
<!-- Elements -->
<!-- Complex Types -->
<complexType name="UserWithOnlyEnabled">
<complexContent>
<restriction base="identity:User">
<attribute name="id" type="xsd:ID" use="prohibited"/>
<attribute name="defaultTenantId" type="xsd:string" use="prohibited"/>
<attribute name="email" type="xsd:string" use="prohibited"/>
<attribute name="enabled" type="xsd:boolean" use="required"/>
</restriction>
</complexContent>
</complexType>
<complexType name="UserWithOnlyPassword">
<complexContent>
<restriction base="identity:User">

View File

@ -57,7 +57,7 @@
</xsd:documentation>
</annotation>
</attribute>
<attribute name="username" type="xsd:string" use="required">
<attribute name="username" type="xsd:string" use="optional">
<annotation>
<xsd:documentation
xml:lang="EN"
@ -128,5 +128,4 @@
</sequence>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</schema>