Decorator library didn't add the decorate method until v4.0, so current
code doesn't work with minimum version we have in our requirements
(v3.4.0).
The easiest fix would be to bump our requirements version, but as the
bug states this would create problems for RHEL/CentOS 7 and Ubuntu
Trusty.
Another option would be to use the `decorator` method instead, but this
has been deprecated in v4.0, and although the code is still there it
isn't a good idea to use it on v4.0 as it could go away at any moment.
So this patch adds compatibility code to work with both versions, taking
into account that `decorator` and `decorate` arguments are reversed from
one method to the other.
Reviewed: https:/ /review. openstack. org/393841 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=188abdac404 aee028bc701d74f a9c3066674465d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 188abdac404aee0 28bc701d74fa9c3 066674465d
Author: Gorka Eguileor <email address hidden>
Date: Fri Nov 4 17:23:47 2016 +0100
Fix compatibility with decorator < 4.0.x
Decorator library didn't add the decorate method until v4.0, so current
code doesn't work with minimum version we have in our requirements
(v3.4.0).
The easiest fix would be to bump our requirements version, but as the
bug states this would create problems for RHEL/CentOS 7 and Ubuntu
Trusty.
Another option would be to use the `decorator` method instead, but this
has been deprecated in v4.0, and although the code is still there it
isn't a good idea to use it on v4.0 as it could go away at any moment.
So this patch adds compatibility code to work with both versions, taking
into account that `decorator` and `decorate` arguments are reversed from
one method to the other.
Change-Id: Ia263b4aacb22a8 270ccd46a006252 a4bcfd80ebc
Closes-Bug: #1639279