can't retrieve resource details in v2-api

Bug #1119035 reported by Lianhao Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Lianhao Lu

Bug Description

Using the ceilometer-api-v2, when accessing the URL of "http://localhost:8777/v2/resources/7139fe36-ebf7-461a-b095-e81a312349fe/",

 the following error returned in browser:

error_message: "{"debuginfo": null, "faultcode": "Server", "faultstring": "'generator' object has no attribute '__getitem__'"}"

The ceilometer-api-v2 dumps the following exception info:

2013-02-08 12:42:09,511 ERROR [wsme.api][MainThread] Server-side error: "'generator' object has no attribute '__getitem__'". Detail:
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/WSME-0.5b1-py2.7.egg/wsmeext/pecan.py", line 68, in callfunction
    result = f(self, *args, **kwargs)

  File "/opt/stack/ceilometer/ceilometer/api/controllers/v2.py", line 489, in get_one
    r = request.storage_conn.get_resources(resource=resource_id)[0]

TypeError: 'generator' object has no attribute '__getitem__'

localhost - - [08/Feb/2013 12:42:09] "GET /v2/resources/7139fe36-ebf7-461a-b095-e81a312349fe/ HTTP/1.1" 500 141

Lianhao Lu (lianhao-lu)
Changed in ceilometer:
assignee: nobody → Lianhao Lu (lianhao-lu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

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

Reviewed: https://review.openstack.org/21493
Committed: http://github.com/openstack/ceilometer/commit/7902e103441a69088e6a2263f43a6932bea19042
Submitter: Jenkins
Branch: master

commit 7902e103441a69088e6a2263f43a6932bea19042
Author: Lianhao Lu <email address hidden>
Date: Fri Feb 8 14:31:56 2013 +0800

    Fixed resource api in v2-api.

    This fixed the bug #1119035.

    Change-Id: Icddb3ed55672440b37ddc1acca536d1f0d1b3ab4

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