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.
Reviewed: https:/ /review. openstack. org/260186 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=fa0ec89b5ef 84a7bc9936d95d9 58bf3773f8ca54
Committed: https:/
Submitter: Jenkins
Branch: master
commit fa0ec89b5ef84a7 bc9936d95d958bf 3773f8ca54
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 .Mapping and overriding the update method. Now the runtime
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
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: I114b67dfeef0f4 6022230f91c6807 a69ea9175a2