Commit Graph

93 Commits

Author SHA1 Message Date
OpenStack Release Bot f73cf9a0a9 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

This also workaround the issue with Zed not being able to
find out where it's changes started by defining
proper regexp for `closed_branch_tag_re`

Presumably, default for reno should be adjusted to avoid this
config override, ie with [1]

[1] https://review.opendev.org/c/openstack/reno/+/910547

Change-Id: I9ff589583e7e53941c81c52e7ca5dae77c5de1d9
2024-03-05 09:17:00 +00:00
Zuul 1bf1880eec Merge "Track stable/2023.2 SHAs for upstream projects" 2023-10-26 23:20:08 +00:00
Dmitriy Rabotyagov ceea75feea Track stable/2023.2 SHAs for upstream projects
Since 2023.2 has been released, we're switching to track and test code
against 2023.2 stable branch and update SHAs to the HEAD of the branch.

Change-Id: I59951bce68fb898a3b0845b5c5f2443e5d57e3bb
2023-10-26 15:42:40 +00:00
Dmitriy Rabotyagov 036e4ae241 Temporary don't use u-c for inventory tox test
Right now u-c constrains requests version to 2.28.2 while ansible-lint
requires minimum of 2.31.0.

To temporary workaround the issue and unblock gates we define
alternative install_command that does not care about u-c.
This should be reverted in the future once u-c will be patched to
support new version of requests.

Change-Id: If350731a7bb08e71a57f120fdf70106bfccc0b52
2023-10-05 13:41:37 +02:00
Dmitriy Rabotyagov bb3a58604b Restore dynamic_inventory unit testing
It seems that we have dropped unit testing of our dynamic_inventory
some time ago. This patch aims to setup zuul tests using tox
and restore test functionality to make it passing with current codebase

Change-Id: I8ccee779fd629e8696ec2e12397b148b52cd0c73
2023-01-11 10:14:43 +00:00
Dmitriy Rabotyagov fbce36854b Update tox.ini
Change-Id: I1132fbfc3b5481ee43ebb684e1ef02e678e7c932
2022-12-27 17:18:20 +01:00
Marc Gariepy 9e535931a7 skip -W on sphinx-build for translation.
Change-Id: I8e699b82fb6ebef3373ee92a103f404009c784bc
2021-08-18 08:43:06 +00:00
likui faa408159d Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is old name and deprecated

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ieb09cd19a88453e21c079541a5daa1dc5df3ffa9
2021-06-01 09:24:28 +00:00
Andreas Jaeger 2860f1bda5 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Depends-On: https://review.opendev.org/722854
Change-Id: I190f32b2eea20024c71fc74bac7f5d011768473c
2020-04-29 06:20:40 +00:00
Ghanshyam Mann 7720597343 [ussuri][goal] Drop python 2.7
OpenStack is dropping the py2.7 support in ussuri cycle.

openstack ansible also drops python 2.7 support
and cleanup tox and requirements for python2.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I909ef41d8a8d857c56ed93a142d2ff951a9bf1ba
2020-02-29 18:42:55 -06:00
jacky06 655d265df7 tox: Keeping going with docs
1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I5be44aec352223a8df69eefe79f0909dc0d04fec
2019-10-23 23:31:01 +08:00
Alexandra Settle 955cf52863 PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.

Story: 2006105

Change-Id: Ia0599ac65cc324e317430495a879f52c76f72484
Signed-off-by: Alexandra Settle <asettle@suse.com>
2019-10-10 11:19:50 +00:00
Andreas Jaeger d6aa858383 Remove docs from linters
The openstack-ansible-linters job runs the linters tox environment - and
the docs jobs runs the docs environment.

Remove the docs jobs from the linters environment, there's no need to
run the docs jobs in both linters and docs environment, it just wastes
resources.

Change-Id: If9b188520fd2d55d4d2e70542c77cf0aa1614443
2019-05-18 09:57:28 +02:00
Dmitriy Rabotjagov ee8497176a Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Path do not fix path in run_tests.sh and scripts/scripts-library.sh as
I'm not really sure whether it's safe to change now.

Depends-On: https://review.opendev.org/653978/
Change-Id: I700fa432c88e77ca1b0e29667d04bfbb67829735
2019-05-09 10:44:18 +01:00
Frank Kloeker 9fd0fdc774 Change docs build to openstackdocstheme logic
Version 1.29 of openstackdocstheme includes now the build scripts
for translated documents which we have had as a PoC in that repo.

Fix Sphinx Warnings (a lot)

Change-Id: I4f9a48bd543e8d394f23491fadb6ac47f24a156a
2019-03-20 16:46:23 +01:00
Frank Kloeker 138fdef0a6 Build translated docs in tox
As an early bird for project doc translation we build translated docs
here with an extra script. This procedure is usual in the main doc
project, but there are different versions of the same script.
Later we to centralize such things.

Change-Id: I906be044021c93b9aeb644bcd3c550df123a3c83
2018-10-08 17:19:10 +00:00
zhulingjie cec52b1998 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I7c66c9701e4d6733a0ed9794f750326ce48d25ce
2018-09-18 00:23:55 +00:00
Jesse Pretorius ee43444099 Use the TESTING_BRANCH env var for constraints
The TESTING_BRANCH environment variable is provided by the
run_tests.sh script and is derived from the .gitreview file.

This ensures that once the master branch becomes a stable
branch, the constraints from the stable branch in the
integrated repository will automatically get used once the
.gitreview file is updated.

To ensure that the required environment variables are present
we export them appropriately in run_tests.sh and modify the
tox configuration to pass them into the tox test.

Change-Id: Ia5ca15a5ee3763bdfb76087f99a371d78ed6258b
Needed-By: https://review.openstack.org/579371
2018-08-16 15:16:20 +01:00
Jesse Pretorius 8662acf5ec Update run_tests.sh and remove tests-repo-clone.sh
The lint tests make use of the common linters test
used by the roles, so we need to ensure that the
run_tests.sh script is updated and the configuration
adjusted accordingly.

Change-Id: I7c9bcfe29e4bad802d154e99c3312f6a0448fbaf
2018-03-30 20:42:53 +00:00
Jean-Philippe Evrard e634df7faf Ensure doc8 is run
When a doc8 issue has been detected, the CI job must fail.

Change-Id: Ic4a5867b5c38643231f5af97acb4d66878a2ae4d
2018-03-26 09:12:17 +00:00
ZhongShengping c9eb1441fb Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I97c08f18e60b75308099228d08ffd9436cc5b6e2
2018-03-09 12:37:18 +08:00
Zuul d6c3bce516 Merge "ceph: Switch to central ceph-ansible repository" 2017-12-17 21:57:05 +00:00
Jimmy McCrory c5551f2c8c Move inventory files to folder in root of repo
Move the playbooks/inventory folder, group_vars, and host_vars to
inventory/ in the root of the OpenStack-Ansible repo. This helps better
organize the repo structure since playbooks/ will now only contain
playbooks, shared task files, and included repo package var files.

group_vars and host_vars are moved alongside the inventory since that's
the default place that Ansible expects those folders and to help better
prepare for Ansible 2.4 where multiple inventories can be loaded,
automatically including relative group and host var files.

Effected docs, scripts, and variables have been updated with the new
paths.

Change-Id: If50e2412c3fd6575d7041deb8ecc9480b04184cc
2017-12-16 02:34:33 -08:00
Markos Chandras 01501f33ad ceph: Switch to central ceph-ansible repository
All the ceph roles are generated from the central ceph-ansible
repository. However, it appears that the script (or CI) that
generates these roles has been broken for a while. The last update
for generated roles was nearly 2 months ago. This means that we
are missing a lot of ceph features and fixes that exist in the central
repo but not on the generated roles. Lets switch to the main
ceph-ansible repository for our Ceph deployments in order to ensure
that we are always using the latest code.

Change-Id: Ic907ee734a95e8af7c4c51568cc0870607b7b2f9
2017-12-14 16:52:49 +00:00
Jesse Pretorius d98afec530 Skip ansible-lint test against roles
In order to decouple changes in this repo from changes
needed in other repositories due to the ansible-lint
test, this repo will skip all roles when executing the
lint test. The roles can be updated in time as patches
are submitted to those repositories.

Closes-Bug: #1737310
Depends-On: If5746d35ee1b8ce5d6fd1a14a2abca16e29cb899
Change-Id: Icaa997a37d9e31c70e952a80a3f75050965d7ef5
2017-12-11 17:54:49 +00:00
Jesse Pretorius f3dccff4ea Use tests repo for all lint tests
The lint tests are inconsistent and often timing out due to
the implementation not using the cached repositories in the
same way as the tests repo's lint tests.

It'll be simpler to maintain if all lint tests worked the
same way.

Depends-On: I8bea90082dbde7de49c5e2e86d298c017b16591d
Change-Id: I4a5f6fe69e2d421846999c7cbd949504be77f23d
2017-11-16 10:38:08 +00:00
Jesse Pretorius eb05d83ed9 Revert "Update setuptools to 36.2.0"
Our pip, setuptools, wheel install process is seperate
from the installation of other packages, so it still
works. The problem comes in when you try to up/downgrade
setuptools at the same time as installing other packages.
This problem was prevalent when doing docs/linters tests.

This reverts commit d4ae08646d
and removes the constraint from the tox config so that doc
and linter tests will not try to force a up/downgrade for
these packages.

Change-Id: I27f843d443b32c52b5f9ec6be581a9366c8dbcf5
2017-07-20 09:23:46 +00:00
Jesse Pretorius 4ecc7c3f27 Add additional role path for lint testing
Change-Id: I0c078094354dcce568bba0915e7f27b1839f13bd
2017-06-13 10:36:30 +01:00
Jean-Philippe Evrard abb33492b8 Use the same version of ansible as tests repo
Instead of carrying yet another version of ansible in tox.ini,
we should rely on re-using the process in the tests repo, and
re-use the tests repo constraints and requirements.

Change-Id: Iddca8aa00e96f6d6303e63e67e9fabc11a78ba60
2017-06-12 16:18:47 +00:00
Nolan Brubaker ed4ccd5d40 Add support for python 3 inventory tests
Define a new tox environment for inventory the inventory tests with the
Python 3.5 interpreter.

This could not be done with [1] due to the way generative environments
create new environments, rather than modifying already existing and
named ones.

For now, the py3-inventory env is not added to linters, in order to keep
it from failing the gates.

1:
https://tox.readthedocs.io/en/latest/config.html#generating-environments-conditional-settings

Change-Id: Ife1ecc6c36c47f38c00bd19a193a637e39a8b4b8
2017-06-06 21:13:58 -04:00
Jimmy McCrory 13f82560cf Update ansible-lint to 3.4.12
A newer ansible-lint is required for ansible 2.3 compatibility.
Roles are installed within the linters test through git clone instead of
galaxy to avoid an upstream Ansible bug[0].

[0] https://github.com/ansible/ansible/issues/22572

Change-Id: I9b7bb57b60a0596912934d368aba796397e31ad0
2017-04-17 14:38:22 -07:00
Nolan Brubaker 2be3319ac9 Restructure lib directory to install via pip
This change allows the currently existing modules to be imported from
the `osa_toolkit` package.

In order to install the python modules used by the inventory via
setup.py with pbr, we need to rename the lib directory to match the name
of the package we wish to install.

pbr doesn't allow for doing any kind of directory renaming within the
setup.{cfg,py} files, but we need to keep using it in order to consume
global requirements updates.

Change-Id: Idb7780f55e4a1fd77dd76becbf67c1ccbf220db7
2017-03-30 10:19:01 -04:00
Jesse Pretorius e3c8c246e6 Ensure that tox uses global pins
The tox implementation currently does not make
use of the global pins as requirements or as
constraints. This may cause an inconsistent
pip, setuptools and wheel package set being
installed when executing tests.

This patch ensures that the pinned versions are
installed when setting up the tox venv, and
ensures that the pins are used as constraints
in any subsequent package installations.

Closes-Bug: #1658773
Change-Id: Id4176f39eeefe3323c35e5f05bca6b208b615088
2017-01-24 15:15:50 +00:00
Cuong Nguyen cf71de7fc0 Re-order envlist to run linters first
Fixes running tox always failed

Change-Id: I7fb225f3e2d8cd9f289e0c24940db1a3e45a6af3
Closes-Bug: #1657330
2017-01-18 11:23:28 +07:00
gengchc2 c972859e7a Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
    https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: I163758d99c49aa0d3d29b41144961d3361a78aa4
2016-12-06 09:27:07 +08:00
Jenkins 4eb3802a00 Merge "Add dictutils tests, clarify some var names" 2016-12-03 03:50:21 +00:00
Nolan Brubaker a2bd0c5365 Add dictutils tests, clarify some var names
This change adds dictutils test coverage and also documents/clarifies
some of the functions provided.

No functionality should be changed, only exercised and documented.

Change-Id: I21ade46ffd620244708860b7f1243c3c3e5189cf
2016-11-22 10:42:36 -05:00
Steve Lewis ad566bffd7 DynamicInventory filesystem storage API cleanup
Update some function docstrings for accuracy/completeness
Make some methods module-private as they are not required to be
available for external use.

Tests were updated to accomodate for the now private functions.
The affected tests were identified as filesystem-centric and
moved to their own testing file, which will run under the inventory
tox target as well.

Parent-Id: I4d52f7363e00bba62ed878fe8fa6e593eb21fdde
Change-Id: I0275eeeafeb2a4c89cd820d56dd0ad01d3124a80
2016-11-19 10:12:51 -08:00
Jenkins 6af61c59a4 Merge "Consolidate tox run output into one report" 2016-11-19 01:34:57 +00:00
Jenkins 8599b7faa8 Merge "Add IPManager class for handling IP addresses" 2016-11-19 01:33:55 +00:00
Nolan Brubaker 010cadf114 Consolidate tox run output into one report
The original implementation of erasing the coverage data file between
each test was the most accurate method, providing coverage stats in a
'cleanroom' setup, but resulted in extra reports being output. This
doesn't scale very well as more test files are added to the repository.

This patchset removes the extranenous erase command, and adds the `-a`
argument to the run commands, which allows coverage to accumulate data
across runs. Without the `-a` run, the coverage reports for each target
file are cross-contaminated, resulting in different coverage numbers.

Depends-On: I06729ac2bc1688a39255f2c8ea0d14131b5c2560

Change-Id: I4d52f7363e00bba62ed878fe8fa6e593eb21fdde
2016-11-18 22:08:24 +00:00
Nolan Brubaker 99e398125b Add IPManager class for handling IP addresses
This patch begins work on an 'IPManager' class that further decouples
IP/CIDR manipulation from the openstack-ansible configuration handling
logic.

With this patchset, a new implementation is provided and tested in
isolation, with integration into and replacement of existing code set
for follow up patchsets.

The aim is also to provide a working implementation based on a proposed
IP management API for use with plugins. The proposed API is provided as
the IPBasePlugin class, and generic expectations of the API are
documented there.

A few notable changes exist in the new IPManager class versus the
existing codebase:

    - The Queue.Queue class is not used, but rather a plain, randomized
    list. Reviewing the existing implementation, there does not appear
    to be a need to use the specialized queue class.

    - USED_IPS is moved into a set associated with a given IPManager
    object. The expectation is that dynamic_inventory.py will treat
    IPManager as a singleton, but this implementation allows for
    replacing that singleton in test cases, or using multiple instances
    in some other context.

While the lib/ip.py file is not intended to be executed, the python
shebang line was provided in order to comply with our tox linting
searches.

Change-Id: I06729ac2bc1688a39255f2c8ea0d14131b5c2560
2016-11-18 17:07:03 -05:00
Alexandra Settle ca1e4cccd9 [DOCS] Adds a cookie cutter deploy guide for d.o.o
Also removes old install guide in favor of the commited deploy guide

TODO: Link for the deploy guide to be commited

Change-Id: I72c1d344a4cc8df4d92ff296200704639771eb88
2016-11-18 13:27:57 +00:00
Logan V b70a0276f4 Update ansible-lint to 3.4.1
This patch updates all playbooks to ensure compliance
with ansible-lint 3.4.1 and also implements updates
to the distro/pip package install tasks to ensure
that they use the appropriate variables designed for
setting state.

Additionally the utility playbook is set to use upper
constraints when installing packages.

Change-Id: I534388930317daf370cf6c943d62d1e50184ead9
2016-11-10 08:14:29 +00:00
Deepak e582207a66 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example).
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable

Change-Id: I30c033728da02aec1313099b4cc0dc446712f2db
2016-10-27 15:13:18 +00:00
Nolan Brubaker 14e13ec4ea Move inventory generation code into lib
Most of the code from dynamic_inventory.py was moved to lib/generate.py
in order to consolidate the inventory code into one place.

Code changes from dynamic_inventoy.py to generate.py:
    argparse and sys imports removed
    args function definition removed
    __main__ section removed

The `args` function was left in dynamic_inventory.py in order to ensure
the environment argument can use the relative path for
playbooks/inventory/env.d. As such, dynamic_inventory.py is imported in
order to provide test coverage.

Imports and coverage reports for tests were also updated.

Change-Id: Icd1ea365befd8e805dc2c48332c104bcd887899b
2016-10-11 19:18:04 +00:00
Nolan Brubaker 0d9eb88ab1 Move management code to inventory lib.
This change moves the management code into a library file for
consolidated access to the code. Nothing is changed with the interface
to the inventory-manage script.

The lib/__init__.py file is necessary for python to
import the lib directory as a package, which will become more important
as more code is relocated there.

The code was originally moved to playbooks/inventory/lib, but doing so
made Ansible try to run the python files, which they intentionally will
not do.

Change-Id: I2e31927ec48022c7a504096780977319882c6bdf
2016-10-11 19:16:24 +00:00
Nish Patwa 5265e1b5eb [docs] Move sphinxmark requirement to test-requirements.txt
In https://review.openstack.org/372565 sphinxmark was added to
tox.ini to bypass the global requirements management restrictions
related to the stable/newton branch.

Since sphinxmark is in g-r master, it can now live in the right
place to be managed through the g-r process.

Related-Bug: #1624489
Change-Id: I39116db310c57c4cf224063d527e63ac755f968a
2016-10-10 09:15:15 +00:00
Nish Patwa 62028d063e [DOCS] Added release-name as a watermark to Docs.
Added a water mark to install-guide, developer-docs, upgrade-guide
and releasenotes to make clear to deployers which release they're
working with.

Modified conf.py that adds watermark to the documentation according
to particular branch. If the current branch is master than
watermark is 'Pre-release' and if the current branch is
stable/<release-name> than watermark is <release-name>.

As global-requirements does not have sphinxmark included in
stable/newton [1], the requirements is added in tox.ini.

I will replicate this patch to all the role documentation once its
gets merged to master.

[1] https://review.openstack.org/376429

Closes-Bug:1624489
Change-Id: If454938abb4990764076436cd428673b456eab3c
2016-09-28 12:00:42 +00:00
Nolan Brubaker 18c9e1faee Add export host option for inventory-manage script
The export host option allows users to export their existing host
information for import into a third party system. The output is
'pivoted', so that the key is the host/container name, and the values
are the group memberships and hostvar information. Some top level
networking information, such as load balancer IP addresses, as well as
provider networks, are also provided.

Test scaffolding was added to ensure the export does what is intended.

The tox inventory environment was modified to do coverage testing of
both the dynamic_inventory.py and manage_inventory.py files. The
coverage data is erased between runs, since combined output lead to
incorrect results for dynamic_inventory.py.

Change-Id: I2caa5a0c070b12a74ac26334c63ac8d0de704042
2016-09-22 02:50:01 +00:00