Decorator content does too many different actions, so
let's split it into 3 decorators: @handle_errors,
@validate and @serialize. We can skip calling @serialize
in many places, because those methods just raise some
http error.
Also I've changed return value of all handlers from
serialized json (string) to python's structures, lists
and dicts. So It's become possible to implement different
serializers and I've added support for YAML output.
backported from Ia3da3bd809bcca923d53666eca54def78c995f65
Reviewed: https:/ /review. openstack. org/355952 /git.openstack. org/cgit/ openstack/ fuel-web/ commit/ ?id=c2ae5ea605a c5f119dbac1efb3 5e344493e60905
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit c2ae5ea605ac5f1 19dbac1efb35e34 4493e60905
Author: Dmitry Guryanov <email address hidden>
Date: Fri Aug 19 15:25:49 2016 +0300
Split @content decorator
Decorator content does too many different actions, so
let's split it into 3 decorators: @handle_errors,
@validate and @serialize. We can skip calling @serialize
in many places, because those methods just raise some
http error.
Also I've changed return value of all handlers from
serialized json (string) to python's structures, lists
and dicts. So It's become possible to implement different
serializers and I've added support for YAML output.
backported from Ia3da3bd809bcca 923d53666eca54d ef78c995f65
Change-Id: Ia3da3bd809bcca 923d53666eca54d ef78c995f65
Closes-Bug: #1606211