Comment 5 for bug 1510507

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

Reviewed: https://review.openstack.org/260186
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=fa0ec89b5ef84a7bc9936d95d958bf3773f8ca54
Submitter: Jenkins
Branch: master

commit fa0ec89b5ef84a7bc9936d95d958bf3773f8ca54
Author: Matt Riedemann <email address hidden>
Date: Mon Feb 15 14:39:33 2016 -0800

    Cleanup deprecation warnings from using share proxy properties in API

    The API code emits a ton of deprecation warnings from the view builder
    code using deprecated properties on the share DB object which proxies
    to the share instance, so this changes the code to use the share.instance
    property instead.

    Note that since the tests are mocking out the share as a dict in a lot of
    places, we have to handle accessing the instance as a dict entry rather
    than an attribute on a sqlalchemy object. Because of this, the wrapper
    class in the stubs module needed to be updated to actually work like a
    dict container. This is done by extending the abstract base class
    collections.Mapping and overriding the update method. Now the runtime
    code can access attributes on the share like a dict (which old tests are
    still using outside of the stubs module) or an attribute like would be
    the case with the sqlalchemy object.

    Partial-Bug: #1510507

    Change-Id: I114b67dfeef0f46022230f91c6807a69ea9175a2