(2.10) 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)
committerDimitris Aragiorgis <dimara@grnet.gr>
Thu, 27 Mar 2014 07:57:08 +0000 (09:57 +0200)
commitc9d06eaa5cfdfc9788dc6aec69c92a8995c149c1
tree1351710c3e8a16de1cea7f3a9d417e3b1dad5341
parentd20498322bd257b04939c818ca436899147d8032
(2.10) 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