12 Commits

Author SHA1 Message Date
Gael Chamoulaud (Strider)
9f644f0dd7
Add Docstrings to validations_libs/validations_logs.py file
This patch also adds new unittests.

Change-Id: I6f299db1b22d98fdabc148e297098e023cf863bd
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2020-11-18 12:24:06 +01:00
Mathieu Bultel
21a722adac Show history by play and add get status action
Show history filtered by plays to get a better view
if a log file contains a lot of playbooks.

Add get_status action in order to get debug information
of a given validation failure

Change-Id: I29ab90647d9ef9c86546065ca16a62c401be1969
2020-07-06 15:10:37 +00:00
Zuul
e1caff945f Merge "Filter get_all_log_file by extension" 2020-06-15 20:16:02 +00:00
Mathieu Bultel
c1d9cb9b92 Filter get_all_log_file by extension
Since the user can provide a path to a directory which can
be polute by undesirable files, filter by extension can avoid
parsing wrong files

Change-Id: I378b32d58cd1ec3a5688bba0831716bf94f18f05
2020-06-12 09:19:41 +02:00
Mathieu Bultel
373bdb08d7 Catch value error when extract log info from log name
We need to catch ValueError when we extract log information
from the file name provided by user.
Instead of raising an exception, we just log a warning to the
user. The normal usage can handle None uuid or timestamp or
validation-id.
This will aim to make the ValidationLog class more generic.

Change-Id: Iccc2a37b4c2c911e634a210de253ba1111e5b7e7
2020-06-10 22:14:43 +02:00
Mathieu Bultel
b5cc8dff75 Handle multiple validation logs results
Change-Id: I49d284edc2e1c54fb8c365e52146c656440b5db2
2020-05-18 14:53:52 +02:00
Mathieu Bultel
1477887091 Avoid None value when missing data in ansible log
When missing datas in ansible log for some reasons,
we need to avoid None value, and just ignore it.

Change-Id: Ic6e05bf65bf01eeafd5e9222f3410a4dc5a50c9e
2020-05-14 09:48:31 +00:00
Mathieu Bultel
ade5d57a3e Raise exception if no validation is found
In addition, I have to fix pep8 issue, due to new version

Change-Id: I04728bfdb6473c47c248a4a56bb8df647c51f5ef
2020-05-13 13:50:36 +02:00
Mathieu Bultel
c940a0c30d Add unit tests coverage for validation, group and logs classes
Increase the unit tests coverage for recent code:
validation, group and logs classes.
(Increase of 54 unit tests)

Move per action files into one test file:
test_validation_actions

Change-Id: I7a1a8b0681c13ebd758a5686b2398a0a9e87a4eb
2020-04-02 09:41:30 +00:00
Mathieu Bultel
1daa430f9a Fix behavior for Show command to stick to tripleoclient
The behavior of the Show command wasn't exactly as tripleoclient
This review aims to fix it

Change-Id: I4e1af84675bfe722e232217f15c29fbc3d006333
2020-03-26 14:58:34 +01:00
Mathieu Bultel
e367d62445 Implement validation show history command
Implement validation show history command in validation_actions

Change-Id: I97c9df5e08c2358612704fcdb78cf24cd6f8e421
2020-03-23 22:16:07 +00:00
Mathieu Bultel
bcd72301f6 Add validation log object representation
Create two classes for Log and Logs in order to get
a simpler representation of the validation Log and
provide easy way to manage the log data informations

Change-Id: I743355cef943e43492264d4c4700bebbeab9a37d
2020-03-23 21:54:21 +00:00