Apart from incomplete output the incorrect formatting
causes followup exception further obfuscating the original issue.
Minor issue related to:
BGZ:1895045
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ibed0bc4b78be957819205bed76073e72820ab2a1
The code of the groups property in the Validation class changed. Before
the code didn't check if the key groups was there. You can see the
change[1] to have more information.
[1] eb62054a33
Closes-bug: #1917785
Co-authored-by: Owen McGonagle <omcgonag@redhat.com>
Change-Id: Ib11fd1b829bd56c19f82081d53440b4dd8237f3f
If there are no groups in the playbook, we currently get a python error
when running command 'openstack tripleo validator group info'
Change-Id: Ice089c33d566e90bea55e18fe7f77f9d33fe81f3
This patch also adds new unittests for the following functions:
- from validations_libs.utils import get_validations_data
> test_get_validations_data_wrong_type(..)
- from validations_libs.utils import get_validations_details
> test_get_validations_details_wrong_type(..)
Change-Id: Iac9ba971a73ed09b26d3e41efb38ad72dd942bbc
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
The current conversion works pretty well when passing a simple string
of validation or group names. But don't work when passing multiple
validation or group name.
```
>>> groups = "check-cpu"
>>> groups = [groups]
>>> print(groups)
['check-cpu']
>>> groups = "check-cpu,check-ram"
>>> groups = [groups]
>>> print(groups)
['check-cpu,check-ram']
```
This patch brings a better conversion when multiple validations or
groups are sent through a string.
Change-Id: Iba023a704dd873ea2df75c8cc6d78f929ef45bc2
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
In some case we might get string instead of list - instead of failing,
just do a simple convertion and go on.
We also support both notation, either playbook name (foo.yaml) and
validation name (foo) in the search of valid content.
Co-Authored-By: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I8d0288dae3cab131a8bc65e3d0b986dc6b9aec67
Closes-Bug: #1901676
This patch fixes multiple things:
* from validations_libs.validation_actions import show_validations_parameters
The generated file was containing the validations names and their
existing parameters as returned by the get_validations_parameters
method. But the file should only contains the parameters.
* from validations_libs.utils import get_validations_playbook
This method was supposed to get a list of validations playbooks
abs. path either by their names or their groups. This method was working
only when giving validation names but not with groups.
This patch fixes all the problems above and make the parameters
management work again.
Change-Id: Iec30cccade1234a127ef406ed13604cce45a72fd
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
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
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
Move all validation actions into a ValidationActions class
in order to have one object with several validations actions
Add group info implementation
And add group object like validation object to have
a simpler representation of the validation group.
Change-Id: Idc7a55e26de20968f0a6a90f2a005d21a30c9e70
This review add functionnalities to parse and show
validations output as dict with the required format
Change-Id: I57ca3d18397c7fbdb084b06224d7cab3d4592d30
Improve the way we log on the file system and share
the same uuid for callback logging and ansible
runner and artifact logging
This patch also adds zuul.d directory:
* Adds zuul.d/layout.yaml
* Adds .gitreview file
* Fixes ansible-runner requirements issue
Co-Authored-By: Gael Chamoulaud <gchamoul@redhat.com>
Change-Id: I4da8c1974362029754aa5b09cd8e6c7d6a27dd0d
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>