cinder: List API versions does not accept XML

Bug #1311243 reported by Diane Fleming
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Juan Manuel Ollé

Bug Description

The cinder list versions API call works fine for JSON:

curl -i http://23.253.228.211:8776/ -H "Accept: application/json" -H "X-Auth-Token: $token"
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 298
Date: Tue, 22 Apr 2014 17:35:12 GMT

{"versions": [{"status": "CURRENT", "updated": "2012-01-04T11:33:21Z", "id": "v1.0", "links": [{"href": "http://23.253.228.211:8776/v1/", "rel": "self"}]}, {"status": "CURRENT", "updated": "2012-11-21T11:33:21Z", "id": "v2.0", "links": [{"href": "http://23.253.228.211:8776/v2/", "rel": "self"}]}]}

However, the same call with XML fails:

curl -i http://23.253.228.211:8776/.xml -H "Accept: application/xml" -H "X-Auth-Token: $token"
HTTP/1.1 500 Internal Server Error
Content-Length: 189
Content-Type: application/xml; charset=UTF-8
Date: Tue, 22 Apr 2014 17:37:09 GMT

<computeFault code="500" xmlns="http://docs.openstack.org/volume/api/v1"><message>The server has either erred or is incapable of performing the requested operation.</message></computeFault>

Additionally, the XML call to show v1 details fails:

curl -i http://23.253.228.211:8776/v1/.xml -H "Accept: application/xml" -H "X-Auth-Token:$token"
HTTP/1.1 404 Not Found
Content-Length: 52
Content-Type: text/plain; charset=UTF-8
X-Openstack-Request-Id: req-9ff05fb1-0b20-4cb7-a60f-8d956ec81dd9
Date: Tue, 22 Apr 2014 17:49:59 GMT

404 Not Found

The resource could not be found.

Call for XML to show v2 details fails:

curl -i http://23.253.228.211:8776/v2/.xml -H "Accept: application/xml" -H "X-Auth-Token: $token"
HTTP/1.1 404 Not Found
Content-Length: 52
Content-Type: text/plain; charset=UTF-8
X-Openstack-Request-Id: req-9f96a04b-dc35-4ceb-bb53-ab6ade803075
Date: Tue, 22 Apr 2014 17:58:52 GMT

404 Not Found

The resource could not be found.

Also, the JSON call for show cinder v2 details seems to show cinder v1:

curl -i http://23.253.228.211:8776/v2/ -H "Accept: application/json" -H "X-Auth-Token: $token"

{
   "version":{
      "status":"CURRENT",
      "updated":"2012-01-04T11:33:21Z",
      "media-types":[
         {
            "base":"application/xml",
            "type":"application/vnd.openstack.volume+xml;version=1"
         },
         {
            "base":"application/json",
            "type":"application/vnd.openstack.volume+json;version=1"
         }
      ],
      "id":"v1.0",
      "links":[
         {
            "href":"http://23.253.228.211:8776/v2/",
            "rel":"self"
         },
         {
            "href":"http://jorgew.github.com/block-storage-api/content/os-block-storage-1.0.pdf",
            "type":"application/pdf",
            "rel":"describedby"
         },
         {
            "href":"http://docs.rackspacecloud.com/servers/api/v1.1/application.wadl",
            "type":"application/vnd.sun.wadl+xml",
            "rel":"describedby"
         }
      ]
   }
}

description: updated
description: updated
Mike Perez (thingee)
tags: added: api
Changed in cinder:
assignee: nobody → Juan Manuel Ollé (juan-m-olle)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Mike Perez (thingee)
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/91442
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a5a33a6833b29457d2ea7fc5b8c31f74a7aa4140
Submitter: Jenkins
Branch: master

commit a5a33a6833b29457d2ea7fc5b8c31f74a7aa4140
Author: Juan Manuel Olle <email address hidden>
Date: Tue Apr 29 11:46:23 2014 -0300

    fix atom link in XML Version API

    This patch fixes tag names where the tag name has ':'
    for links templates.
    Some examples are
    '{http://www.w3.org/2005/Atom}link'
    should be
    ['{http://www.w3.org/2005/Atom}link']

    and

    'test1:test2'
    should be
    ['test1', 'test2']

    Closes-Bug: #1311243
    Change-Id: I6e7c068e41eb6b069c24ef9d6c46b726ea722074

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-3 → 2014.2
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.