v2 resource query API does not report "source" field

Bug #1163479 reported by Doug Hellmann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Terri Yu

Bug Description

Need to add source to models.Resource, all of the storage drivers, and then in the v2 API.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Changed in ceilometer:
assignee: nobody → Doug Hellmann (doug-hellmann)
Revision history for this message
Lianhao Lu (lianhao-lu) wrote :
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Line 348 on the left side of the diff.

Terri Yu (terriyu)
Changed in ceilometer:
assignee: Doug Hellmann (doug-hellmann) → Terri Yu (terriyu)
Revision history for this message
Terri Yu (terriyu) wrote :

The generator models.Resource is in the get_resources() function.

I looked over the source code for the storage drivers and also found that the generator models.Meter in the get_meters() function has the same problem. `source` is not returned there either.

So we need to fix models.Resource in get_resources() and models.Meter in get_meters() for:

/ceilometer/storage/impl_hbase.py
/ceilometer/storage/impl_mongodb.py
/ceilometer/storage/impl_sqlalchemy.py

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/27841

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/27841
Committed: http://github.com/openstack/ceilometer/commit/c7877f1a3201d394e7ea9834b1d29894e11109b2
Submitter: Jenkins
Branch: master

commit c7877f1a3201d394e7ea9834b1d29894e11109b2
Author: terriyu <email address hidden>
Date: Tue Apr 30 18:44:45 2013 +0000

    Added missing source variable in storage drivers

    Addresses bug 1163479
    *tests/storage/base.py
    *ceilometer/storage/models.py
    *ceilometer/storage/impl_hbase.py
    *ceilometer/storage/impl_mongodb.py
    *ceilometer/storage/impl_sqlalchemy.py

    Added self.assertIn statements to test_get_resources() and test_get_meters()
    functions in /tests/storage/base.py

    These assert statements check for the existence of the source variable and
    also if the source variable is in the set of sources hard coded by the database
    test data.

    Added the source variable to models.Resource and models.Meter in the HBase,
    MongoDB, and SQLAlchemy drivers. Added the source variable to the
    specifications for the Resource and Meter classes in models.py

    Change-Id: I5a407bc8c7ce82a71be7e56705c540ece4573340

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-1
status: Fix Committed → Fix Released
Eoghan Glynn (eglynn)
tags: added: girzzly-backport-potential
Eoghan Glynn (eglynn)
tags: removed: girzzly-backport-potential
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-1 → 2013.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.