RAPI: Pass depends body arg (if any) to opcode
authorDimitris Aragiorgis <dimara@grnet.gr>
Thu, 14 Nov 2013 12:10:52 +0000 (14:10 +0200)
committerHrvoje Ribicic <riba@google.com>
Mon, 18 Nov 2013 19:51:18 +0000 (20:51 +0100)
commit508b953943ee364cc67be669217c3db2f2b6d22e
tree9731014669fd1f85d2a5075a1113d143165eda70
parent031d2db16fde03f7919b7732809caaec51d64cb4
RAPI: Pass depends body arg (if any) to opcode

Most rlib2 classes override the default _GetDefaultData() method with
custom methods that parse a request's body and query args and return a
(body, specific_static) tuple eventually passed to FillOpCode().
Job dependencies are defined in the `depends` body argument that might
get lost because most of those methods return {} as the body. In order
not to modify every custom method we update the returned body with
the `depends` argument of the original request body for all RAPI calls
inside OpcodeResource._GenericHandler(). It's up to the client to
include the `depends` argument with the job dependencies if desired.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
lib/rapi/baserlib.py