Changes to return groups as a part of RAXKSGRP extension.Also fixed incorrect

schema version references in wadls and examples.

Change-Id: I866409e6d869daab80b33b0605966a013d2ada42
This commit is contained in:
Yogeshwar Srikrishnan 2011-09-27 17:42:16 -05:00
parent e139f4e74f
commit f2bde1718f
16 changed files with 121 additions and 13 deletions

View File

@ -15,7 +15,7 @@
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:OS-KSADM="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0"
xmlns:capi="http://docs.openstack.org/common/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"

View File

@ -15,7 +15,7 @@
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:OS-KSCATALOG="http://docs.openstack.org/identity/api/ext/OS-KSCATALOG/v1.0"
xmlns:capi="http://docs.openstack.org/common/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"

View File

@ -15,7 +15,7 @@
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:OS-KSEC2="http://docs.openstack.org/identity/api/ext/OS-KSEC2/v1.0"
xmlns:capi="http://docs.openstack.org/common/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent RAX-KSGRP-admin.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [
<!ENTITY % common SYSTEM "../common/common.ent">
%common;
]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:RAX-KSGRP="http://docs.openstack.org/identity/api/ext/RAX-KSGRP/v1.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xsi:schemaLocation="http://docs.openstack.org/identity/api/v2.0 ../common/xsd/api.xsd
http://docs.openstack.org/common/api/v1.0 ../common/xsd/api-common.xsd
http://wadl.dev.java.net/2009/02 http://www.w3.org/Submission/wadl/wadl.xsd
http://docs.openstack.org/identity/api/ext/RAX-KSGRP/v1.0 ../common/xsd/RAX-KSGRP-groups.xsd
">
<grammars>
<include href="../common/xsd/api.xsd"/>
<include href="../common/xsd/api-common.xsd"/>
<include href="../common/xsd/RAX-KSGRP-groups.xsd"/>
</grammars>
<!--*******************************************************-->
<!-- All Resoruces -->
<!--*******************************************************-->
<!-- We should use SSL in production -->
<resources base="http://localhost:5001">
<resource id="version" path="v2.0">
<param name="X-Auth-Token" style="header" type="xsd:string" required="true">
<doc>You need a valid admin token for access.</doc>
</param>
<resource id="users" path="users">
<resource id="userById" path="{userId}">
<param name="userId" style="template" type="xsd:string"/>
<resource id="user-groups-RAX-KSGRP" path="RAX-KSGRP">
<method href="#listUserGroups"/>
</resource>
</resource>
</resource>
</resource>
</resources>
<method name="GET" id="listUserGroups">
<doc xml:lang="EN" title="List Groups for a User">
<p xmlns="http://www.w3.org/1999/xhtml">List all the groups for a user.</p>
</doc>
<response status="200 203">
<representation mediaType="application/xml" element="RAX-KSGRP:groups">
<doc xml:lang="EN">
<xsdxt:code href="../common/samples/RAX-KSGRP-groups.xml"/>
</doc>
</representation>
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="../common/samples/RAX-KSGRP-groups.json"/>
</doc>
</representation>
</response>
&commonFaults;
&getFaults;
</method>
</application>

View File

@ -15,7 +15,7 @@
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:RAX-KSKEY="http://docs.openstack.org/identity/api/ext/RAX-KSKEY/v1.0"
xmlns:capi="http://docs.openstack.org/common/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions xmlns="http://docs.openstack.org/common/api/v2.0"
<extensions xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom">
</extensions>

View File

@ -13,7 +13,7 @@
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v2.0"
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"

View File

@ -57,4 +57,4 @@
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
</xsd:schema>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v2.0"
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Openstack Keystone Admin" namespace="http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0"
alias="OS-KSADM"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v2.0"
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Openstack Keystone Catalog" namespace="http://docs.openstack.org/identity/api/ext/OS-KSCATALOG/v1.0"
alias="OS-KSCATALOG"

View File

@ -0,0 +1,19 @@
{
"extension":{
"name": "Rackspace Keystone Group Extensions",
"namespace": "http://docs.rackspace.com/identity/api/ext/RAX-KSGROUP/v1.0",
"alias": "RAX-KSGRP",
"updated": "2011-08-14T13:25:27-06:00",
"description": "Rackspace extensions to Keystone v2.0 API enabling groups.",
"links": [{
"rel": "describedby",
"type": "application/pdf",
"href": "https://github.com/openstack/keystone/raw/master/keystone/content/admin/RAX-KSGRP-admin-devguide.pdf"
},
{
"rel": "describedby",
"type": "application/vnd.sun.wadl+xml",
"href": "https://github.com/openstack/keystone/raw/master/keystone/content/admin/RAX-KSGRP-admin.wadl"
}]
}
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Rackspace Keystone Group Extensions" namespace="http://docs.rackspace.com/identity/api/ext/RAX-KSGROUP/v1.0"
alias="RAX-KSGRP"
updated="2011-08-14T13:25:27-06:00">
<description>
Rackspace extensions to Keystone v2.0 API
enabling groups.
</description>
<atom:link rel="describedby" type="application/pdf"
href="https://github.com/openstack/keystone/raw/master/keystone/content/admin/RAX-KSGRP-admin-devguide.pdf"/>
<atom:link rel="describedby" type="application/vnd.sun.wadl+xml"
href="https://github.com/openstack/keystone/raw/master/keystone/content/admin/RAX-KSGRP-admin.wadl"/>
</extension>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v2.0"
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Rackspace API Key authentication" namespace="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
alias="RAX-KSKEY-admin"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v2.0"
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Rackspace Keystone Group Extensions" namespace="http://docs.rackspace.com/identity/api/ext/RAX-KSGROUP/v1.0"
alias="RAX-KSGRP"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://docs.openstack.org/common/api/v2.0"
<extension xmlns="http://docs.openstack.org/common/api/v1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
name="Rackspace API Key authentication" namespace="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
alias="RAX-KSKEY"

View File

@ -22,7 +22,7 @@ class TestExtensions(common.ApiTestCase):
self.assertTrue('xml' in r.getheader('Content-Type'))
content = r.xml
extension = content.find(
"{http://docs.openstack.org/common/api/v2.0}extension")
"{http://docs.openstack.org/common/api/v1.0}extension")
self.assertEqual(extension.get("alias"), "RAX-KSKEY")