new promises format with promise launcher to run python promises
Implement new design for python promises. python promises can define sense, test and anomaly method.
test
method will be called by slapgrid or when no bang is needed for the promise
anomaly
method is called when a promise failure required to bang the master, anomaly method can be optional but it's not the case for test method.
sense
method is always called to run promises sensor. the result is always saved to log. test
and anomaly
method check logs result to say if the promise works or not
GenericPromise implements base features of promises, _test()
and _anomaly()
methods are helpers used to test promise result from latest execution logs.
Promise launcher run all promise (of selected ones) one by one and, for each promise, will save the result in json format and raise at the end if at least one promise failed.