Skip to content
Ondrej Lichtner edited this page Nov 4, 2016 · 1 revision

1. Basic description

This test module can be used to report custom results (both PASS and FAIL), including result messages.

2. Options

This test module accepts these options:

fail accepts a boolean value specifying if the "test" should fail or not. The module PASSes by default, if the fail option is set to True it FAILs.
custom single-value options furthemore the module accepts any number of single-value options, that will be used as result data of the reported result.

3. Usage Example

Add the following to your Python Task.

m1.sync_resources(["Custom"])
custom = ctl.get_module("Custom",
                        options={
                            "fail": True,
                            "example_option": "This is an example"})
m1.run(custom)

4. Results

2016-11-04 10:47:48       (localhost)        -    INFO: Executing command: [type(test), module(Custom), host(1), netns(None)]
2016-11-04 10:47:48       (localhost)        -    INFO: Result: FAIL
2016-11-04 10:47:48       (localhost)        -    INFO: Result data:
2016-11-04 10:47:48       (localhost)        -    INFO:     example_option:     This is an example