Comment 3 for bug 1292611

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/80852
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=4d57208adda0696e5163285b5efd397ef3324231
Submitter: Jenkins
Branch: master

commit 4d57208adda0696e5163285b5efd397ef3324231
Author: Ildiko Vancsa <email address hidden>
Date: Sun Mar 16 10:32:11 2014 +0100

    Fix bug in get_capabilities behavior in DB drivers

    Capabilities API returns NotImplementedError in case of SQLAlchemy
    driver. This issue is fixed in this patch by moving the function into
    the proper class.

    Another issue is, that get_capabilities function overwrites the
    DEFAULT_CAPABILITIES dict in base.py every time, when the function is
    invoked.

    This behavior was changed to create a CAPABILITIES dict in each DB driver's
    __init__ function by making a deep copy from DEFAULT_CAPABILITIES and
    updating the new dict with the AVAILABLE_CAPABILITIES. get_capabilities now
    returns the newly created CAPABILITIES dict without modifying it.

    Tests were also added to check that get_capabilities returns the expected
    values for each DB driver.

    Fixes-bug: #1292611

    Change-Id: I725751b600bf462c19278e5785eb2d8530023083