103 Commits

Author SHA1 Message Date
Mathieu Bultel
4a660ec926 Fix lower-constraints errors
This patch changes the lower-constraint requirements to make them
py3.8 compatible. See https://bugs.launchpad.net/nova/+bug/1886298
cffi==1.14.0
greenlet==0.4.15
MarkupSafe==1.1.0
paramiko==2.7.1
PyYAML==3.13

Change-Id: I7e3ab852421c6c9bf7c60ac7f9169939c10e7431
2020-09-11 22:04:15 +02:00
Zuul
20b0b65c6d Merge "Update validation path with the share/ansible one" 1.0.4 2020-09-08 09:21:22 +00:00
Zuul
6885dba6ab Merge "Allow to set python interper for ansible execution" 2020-09-03 21:00:48 +00:00
Mathieu Bultel
1ac91f1f31 Allow to set python interper for ansible execution
Some environment still use python2.7 and so /usr/bin/python
interpreter for ansible.
In that case, Ansible will fail to execute.
This option allow the user to pass a specific python interpeter
for the remote.
In None python_interpreter, and connection local is set we use
the local sys.executable, if both are None we use the default.

Change-Id: I4bd25ed50091a963d0b1e5e3a727ece19b90747e
2020-09-03 11:08:01 +02:00
Mathieu Bultel
fd1bdba458 Add lower ansible-runner version as requirements for train
In order to be supported by train, we need to have a lower
version of ansible runner

Change-Id: Ibda46fbb42f77a3a55243539721557a4e95f93ff
1.0.3
2020-08-25 22:10:40 +02:00
Mathieu Bultel
f22d380319 Update validation path with the share/ansible one
Depends-On: https://review.opendev.org/#/c/747761/
Change-Id: Ib612436e6c934fecee58137ed660a43dc5656ced
2020-08-25 10:33:02 +02:00
Mathieu Bultel
15e74046c1 Add a way to override the default validation log path
Export a log path passed by the user in order to override the default
value from the callback

Change-Id: I736c527254cf17d25eeda0a4007102838280609c
2020-07-24 15:05:28 +02:00
Zuul
df1ca74542 Merge "Switch legacy Zuul jobs to native Zuul v3 jobs" 2020-07-24 00:23:39 +00:00
Mathieu Bultel
f686e205f5 Switch legacy Zuul jobs to native Zuul v3 jobs
See
https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html
for more details.

Change-Id: I7b9251caecc0ef5f4c07814ef17c7a025631ab85
2020-07-23 00:19:22 +02:00
Zuul
2388c5597b Merge "Update openstackdocstheme." 2020-07-22 11:32:14 +00: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
1.0.2
2020-07-06 15:10:37 +00:00
Zuul
47db76f3f3 Merge "Change zuul config for functional CI execution" 2020-07-06 10:24:55 +00:00
Mathieu Bultel
c317b78514 Change zuul config for functional CI execution
Depends-On: https://review.opendev.org/#/c/737997/

Change-Id: If5e678a7fbaba2790d31887c411fea0ed6d2b622
2020-07-06 07:57:13 +00:00
Zuul
34b562cde1 Merge "Remove playbook param from run_validation" 2020-07-01 11:10:21 +00:00
Daniel Bengtsson
6f3241426f Update openstackdocstheme.
Update to the latest version.

Change-Id: Ic861e69a6bc268c30fead9ec1a1f6a9a735f7403
2020-06-23 13:54:26 +02:00
Zuul
4dae15869d Merge "Switch to newer openstackdocstheme and reno versions" 2020-06-22 08:33:23 +00:00
Mathieu Bultel
de03576eeb Remove playbook param from run_validation
Removing playbook parameters from run_validation function
since its overlap validation_name functionality and make it
confusing.

Change-Id: Ifff9bdb327b38db07df6cac328cbd387f2bc46f1
2020-06-17 11:56:04 +02:00
Mathieu Bultel
a842d333fc Add base_dir param to override the constants value easily
In order to override the constants base dir value easily
for ansible, the base_dir param can be passed to the run
function

Change-Id: I8727ac442cd1bb08b1c8587e3e9e8d9be1def358
2020-06-16 23:52:25 +02: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
Andreas Jaeger
5804a0f1e4 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I95a09d6ce195af3d483e170976f54353332bb190
2020-05-28 14:44:40 +02:00
Mathieu Bultel
b5cc8dff75 Handle multiple validation logs results
Change-Id: I49d284edc2e1c54fb8c365e52146c656440b5db2
2020-05-18 14:53:52 +02:00
Zuul
4f57229c23 Merge "Add API Documentation structure" 2020-05-14 17:31:26 +00:00
Zuul
b4f503abf9 Merge "Avoid None value when missing data in ansible log" 2020-05-14 16:54:56 +00:00
Gael Chamoulaud (Strider)
7b14f9c22d Add API Documentation structure
Change-Id: Ie99c6118dff88b2b8e614f732391793b54bb91f0
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2020-05-14 11:53:31 +00:00
Zuul
2899533cc1 Merge "Fix title." 2020-05-14 11:01:50 +00:00
Zuul
6b2105c32d Merge "Add asynchronous option to validation libs" 2020-05-14 11:01:48 +00: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
Daniel Bengtsson
91414c22c4 Fix title.
Add a line break to fix the display of the title.

Change-Id: Idc0a57cb10a3139932eace3039a649b7cb947e43
2020-05-14 08:44:21 +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
Daniel Bengtsson
d3e0515047 Update the minversion parameter.
Update the minversion parameter to use the python -m pip to install
python packages:

https://tox.readthedocs.io/en/latest/changelog.html#id185

It's recommend to use this.

Change-Id: I665949fe47e367030e735f6bb845764091ec9e09
2020-05-06 16:20:49 +02:00
Mathieu Bultel
6e1ab6f893 Add asynchronous option to validation libs
In order to run ansible on its own and get validations
progress and result with the CLI, the review adds an
option to run ansible asynchronously

Change-Id: Id884c9fd606ba03cb7d7fb02491582f1f88c3857
2020-05-05 16:24:34 +02:00
Gael Chamoulaud (Strider)
3cc5263983
Move unit tests execution to stestr
From time to time, unit tests execution fails with error: "TypeError:
'NoneType' object is not iterable". It seems that problem is in
unittest2 library, which is used by testtools for executing the tests.
Stestr lib is usinig unittest by default and the problem does not appear
for several hundred launches.

Authored-By: danpawlik <dpawlik@redhat.com>

Change-Id: I6646629128d9265b5fb7390dc131c55cf34a07ca
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2020-04-28 09:17:48 +02:00
Zuul
8b014a6d4a Merge "Bump default tox env from py37 to py38" 2020-04-27 13:27:51 +00:00
Sean McGinnis
1ee6fa40a8
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: Ia57c69b8433fa3bf8d8edb47441ef737945232cb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:26:04 -05:00
Sean McGinnis
6f26733301
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I853112437e2e9610d421cc48e16f1386a0967788
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:22 -05:00
aeeca6da22 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I82dd90d35f2ca2417f42fa07e575c23481dffe9b
2020-04-22 18:55:25 +00:00
Mathieu Bultel
c0de9faa41 Format output in json or yaml for validations show param
Change-Id: I93b35cd1619e2c2b4a3b1294171dddf56033e94f
1.0.0
2020-04-16 08:26:04 +00:00
Mathieu Bultel
f85ec24e9c Use validation_path attribut instead of variables
Globalize usage of the validation_path attribut set by
the __init__ instead of playing with variables which
introduce bugs and wrong usage

Change-Id: Ie61b380762c911d120076d50551b4661f1ef1526
2020-04-16 10:24:02 +02:00
Zuul
7e27a0595e Merge "Declare playbooks for groups execution" 2020-04-16 07:32:05 +00:00
Zuul
aa879618a4 Merge "Expose limit hosts option to the validation run actions" 2020-04-16 07:32:04 +00:00
Mathieu Bultel
f3c29b6e56 Declare playbooks for groups execution
When running group validation, the playbooks list
is not set before so we need to fix that.

Change-Id: I964508a955783b5600618d4854efe67ff06298cb
2020-04-09 16:15:42 +02:00
Mathieu Bultel
88e0b0a212 Expose limit hosts option to the validation run actions
Change-Id: Ib8fdcb2d224dca0b07d87c41b4998cd9159778af
2020-04-09 10:03:44 +02:00
Cédric Jeanneret
9158eb5b2b Ensure we get a sorted list for validation groups
Change-Id: I3f905af3424fd25cd7dc71743ef8179cf4723bcd
2020-04-08 11:09:04 +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
eb0158c35a Make mock import python 2.7 compatible
In python3.x mock is now part of unittest library.
For being still compatible with python 2.7 we need to
catch import error when trying to import unittest.mock

Change-Id: I6aca21bea4f1563e1f3c5ecfb91c511191eb409b
2020-04-01 15:54:28 +02:00
Zuul
bc1ef1ce8f Merge "Add backward compatibility for old ansible_runner releases" 2020-04-01 11:14:05 +00:00
Mathieu Bultel
da5f6d8176 Add backward compatibility for old ansible_runner releases
Add backward compatibility for old ansible_runner releases.
Ansible_runner.runner_config under 1.4.x has a different
way to handle envars and doesn't have location isolation behavior.
So we need to handle this two differences in ansible.py code to be
able to use it in stable/train openstack branch.

Change-Id: Ic2e477ec55758144b6eacc8a9b52ece881855d44
2020-03-31 10:54:28 +02:00
Andreas Jaeger
156e9e523d Update to hacking 3.0
Hacking 3.0 was just released with minor changes, update to the new
version.

Change-Id: Id426df4214278c7a09497b13bfa3b6de56ccebb8
2020-03-30 17:56:09 +02:00