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: Ia263b4aacb22a8270ccd46a006252a4bcfd80ebc
Closes-Bug: #1639279