This module defines LmiCheckResult command class and related utilities.
Run an associated action and check its result. It implicitly makes no output if the invocation is successful and expected result matches.
List of additional recognized properties:
- EXPECT :
Value, that is expected to be returned by invoked associated function. This can also be a callable taking two arguments:
- options - Dictionary with parsed command line options returned by docopt.
- result - Return value of associated function.
Using metaclass: CheckResultMetaClass.
Check the returned value of associated function.
Parameters: |
|
---|---|
Returns: | Whether the result is expected value or not. If tuple is returned, it contains (passed_flag, error_description). |
Return type: | boolean or tuple. |
Invoke associated method and check its return value for single host.
Parameters: |
|
---|---|
Returns: | Exit code (0 on success). |
Return type: | integer |
Exception raised when associated function returns unexpected result. This is evaluated by LmiCheckResult.check_result() method.