Keystone version response incorrect

Bug #891555 reported by Ziad Sawalha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Ziad Sawalha

Bug Description

Returned version list is not according to documented syntax in admin guide. Admin guide says the response should be a list as follows:
{
"versions": {
"values": [
{
"id": "v1.0",
...

For JSON we are getting:
$ curl http://localhost:35357
{
    "version" : {
        "id" : "v2.0",
        "status" : "beta",
        "updated" : "2011-11-19T00:00:00Z",
        "links": [
            {
                "rel" : "self",
                "href" : "http://127.0.0.1:35357/v2.0/"
            },
            {
                "rel" : "describedby",
                "type" : "text/html",
                "href" : "http://docs.openstack.org/api/openstack-identity-service/2.0/content/"
            },
            {
                "rel" : "describedby",
                "type" : "application/pdf",
                "href" : "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf"
            },
            {
                "rel" : "describedby",
                "type" : "application/vnd.sun.wadl+xml",
                "href" : "http://127.0.0.1:35357/v2.0/identity-admin.wadl"
            }
        ],
        "media-types": [
            {
                "base" : "application/xml",
                "type" : "application/vnd.openstack.identity-v2.0+xml"
            },
            {
                "base" : "application/json",
                "type" : "application/vnd.openstack.identity-v2.0+json"
            }
        ]
    }
}

For XML we are getting:
$ curl -H "Accept: application/xml" http://localhost:35357
<?xml version="1.0" encoding="UTF-8"?>
<version xmlns="http://docs.openstack.org/common/api/v2.0"
         xmlns:atom="http://www.w3.org/2005/Atom"
         id="v2.0" status="beta" updated="2011-11-19T00:00:00Z">

    <media-types>
        <media-type base="application/xml"
                    type="application/vnd.openstack.identity-v2.0+xml"/>
        <media-type base="application/json"
                    type="application/vnd.openstack.identity-v2.0+json"/>
    </media-types>

     <atom:link rel="self"
                href="http://127.0.0.1:35357/v2.0/"/>

     <atom:link rel="describedby"
                type="text/html"
                href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/" />

     <atom:link rel="describedby"
                type="application/pdf"
                href="http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf" />

     <atom:link rel="describedby"
                type="application/vnd.sun.wadl+xml"
                href="http://127.0.0.1:35357/v2.0/identity-admin.wadl" />
</version>

Revision history for this message
Ziad Sawalha (ziad-sawalha) wrote :

Should probably add python_novaclient integration tests before changing this.

Changed in keystone:
importance: Undecided → High
Changed in keystone:
milestone: none → essex-3
assignee: nobody → Ziad Sawalha (ziad-sawalha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/2545

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/2545
Committed: http://github.com/openstack/keystone/commit/8a842139ddc78c7ccb7e93eb8749cba38359a078
Submitter: Jenkins
Branch: master

commit 8a842139ddc78c7ccb7e93eb8749cba38359a078
Author: Ziad Sawalha <email address hidden>
Date: Wed Dec 21 22:46:32 2011 -0600

    Fixed version response (bug 891555 and bug 843052)

    891555: Version response was supposed to be wrapped in a
    'versions' element, instead there was only one version
    being returned at the root.
    Fixed and added tests to validate that.

    843052: requests for version ATOM were ignoring the
    atom+xml as a valid content-type. Fix required
    adding a new atom template file and adding a new
    mapping for the content-type/extension in the
    URL normalizer.
    Fixed and added tests to validate that.

    Change-Id: I259c060e592e11cfc06f59ac5a540178c7f2def2

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.