pybind/mgr: add a ReturnValueAdapter type to object_format.py
The ReturnValueAdapter type fulfills a similar role to the
ObjectFormatAdapter but instead of serializing data for the
body of a mgr response, extracts an return value (error code)
to reply with.
Most of the time it is totally unnecessary to provide an explicit
return value because if you have are returning a valid object (as
opposed to raising an exception) the return value will be zero
(success). However, in the off chance an type need to directly
communicate a return value for the mgr response it can provide
the `mgr_return_value` method and the adapater will discover
and use it.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit
27787a9905d4d2e1062f7f4977377530d7aa8c23)