class documentation
class RpcResult(object):
RPC Result class.
This class holds an RPC result. It is needed since in multi-node calls we can't raise an exception just because one out of many failed, and therefore we use this class to encapsulate the result.
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method |
|
If the result has failed, raise an OpExecError. |
Method |
|
If the result has failed, call the feedback_fn. |
Instance Variable | call |
the name of the RPC call |
Instance Variable | data |
the data payload, for successful results, or None |
Instance Variable | fail |
the error message if the call failed |
Instance Variable | node |
the name of the node to which we made the call |
Instance Variable | offline |
whether the operation failed because the node was offline, as opposed to actual failure; offline=True will always imply failed=True, in order to allow simpler checking if the user doesn't care about the exact failure mode... |
Instance Variable | payload |
Undocumented |
Static Method | _ |
Helper to ensure we return a 'True' value for error. |
If the result has failed, raise an OpExecError.
This is used so that LU code doesn't have to check for each result, but instead can call this function.
If the result has failed, call the feedback_fn.
This is used to in cases were LU wants to warn the user about a failure, but continue anyway.
offline =
¶
whether the operation failed because the node was offline, as opposed to actual failure; offline=True will always imply failed=True, in order to allow simpler checking if the user doesn't care about the exact failure mode