14 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
c51fe9b44c Updated from global requirements
Change-Id: Ia927e8531990c5951ff1965fe354824f58061541
2016-08-26 05:12:13 +00:00
OpenStack Proposal Bot
7b75c2211c Updated from global requirements
Change-Id: I93efaf00ca29502890a4aec5d2a2c3a4330bfa76
2016-07-21 22:26:49 +00:00
OpenStack Proposal Bot
47bd970672 Updated from global requirements
Change-Id: I2476f413fd182a8203604c099d074d06eb1a5656
2016-07-15 12:58:23 +00:00
Jesse Pretorius
03041378f2 Docs: Implement Manuals Theme and doc8 checks
This patch implements:

- The OpenStack Manuals documentation theme.
- Some minor content changes to the index pages to ensure
  that they render correctly.
- Adjustments to the tox/requirements configuration in order
  to implement doc8 checks to facilitate improved documentation
  checking for incoming patches.
- Adjustments to the sphinx configuration for easier
  maintenance.

Note:
The bug_title in the openstackdocstheme is not currently
customisable. A patch to implement the ability to do so
has been submitted: https://review.openstack.org/338299

Partially-Implements: blueprint osa-install-guide-overhaul
Change-Id: I8af1a7ce9008e70abad00be96614c9997f59596b
2016-07-10 00:30:22 +01:00
Jesse Pretorius
255de9876b Update tox configuration
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to enable the use of
tox to execute the functional test, this patch implements
some changes to the tox configuration:

- The minimum tox version is increased in order to be able to use
  constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
  venv for the linters checks.
- Any proxy environment variables set on the test host are passed
  into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
  a new venv called 'ansible' and this environment is inherited
  by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
  executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
  so it doesn't.
- The Ansible role download will no longer ignore errors so that any
  problems discovered will result in a failed test.
- A functional test environment which executes the gate-check-commit
  script is added in order to allow the switch to using the same
  functional test execution job in OpenStack-CI as is used for the
  roles. This, in turn, enables the execution of the job for multiple
  Operating Systems (CentOS, Ubuntu Xenial, etc).
- The 'ansible' and 'ansible-lint' requirements are moved from
  test-requirements to the tox file in order to ensure that we
  can abide by the global-requirements contract.
- The test-requirement for 'mock' has its formatting changed to
  be consistent with other test-requirements.

Change-Id: Ida78a2eae93da5fc56ec6a3d58e75c7db0f08b16
2016-07-06 16:22:18 +01:00
Nolan Brubaker
12ba1306a7 Extract and test inventory and backup I/O
Til now, the main() function of the script did all the input/output
logic of reading in the openstack_inventory.json file and creating the
backup files after multiple runs. While this is functional, it makes
elements of the script hard to test. Either files have to be written to
the file system during tests, which means they must be cleaned up
correctly, or very invasive mocking has to be done at a high level to
test other interactions.

This change moves the creation of the tar backup and the loading of the
openstack_inventory.json file into their own functions that can be
mocked in future tests. Because of their nature, testing of these two
functions is being done with invasive mocks to provide a starting point
in extracting actual filesystem I/O from happening unless explicitly
planned for. With this, future tests could provide mocked versions of
make_backup that are essentially no-ops, and provide smaller, more
customized structures via a mocked get_inventory. Such future changes
could then remove the manipulation of symlinks to
etc/openstack_deploy/openstack_user_config.yml.

Also, this extraction means the implementations could be overriden to
provide different sources and storage, though this is not as robust as a
fully extensible system such as plugins.

The get_backup_name function was created as an easier mocking point,
since the mock module does not allow for replacing builtin Python types,
which include datetime. While specific datetime manipulation libraries
do exist, they were not included here in order to reduce the scope of
changes and external dependencies.

Change-Id: I4bd2a0d06366844b2a60e29cc9c5481903ada4e2
2016-06-07 14:45:30 +00:00
Kevin Carter
c904de2db5 Isolate Ansible from the deployment host
This change allows Ansible to be installed and executed from within
a virtual environment.

Closes-Bug: 1431324
Implements: blueprint ansible-2-1-support
Change-Id: I2fb19dd8218753f75bd7550ed7ba9b79f777083d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-26 10:41:27 +00:00
Nolan Brubaker
559d2dc865 Add coverage reporting to inventory testing
Using the coverage report will show how much of the dynamic_inventory.py
script is actually exercised by tests. As of this commit, there is no
enforced coverage level, rather it is used for informational purposes
only. In the future, an enforce coverage percentage would be a good
idea.

Change-Id: Ic2ccc9ae5f306465b6990d935c82f81bb7b7956a
2016-04-20 09:38:17 -04:00
Kevin Carter
4604950dbb
blacklist Ansible 1.9.6
This version of ansible is broken due to the following upstream
Ansible issue:
  * https://github.com/ansible/ansible-modules-extras/issues/2042

Change-Id: I832073c31f1ea1828ee48a541b03acb9e836e431
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-04-16 08:49:41 -05:00
Jesse Pretorius
13bea32989 Cap bashate and fix linters tests
Bashate is pinned to ensure that for the rest of the cycle, and
once this becomes a stable branch, there are no code changes
needed for updates to the linting tool.

Also, the tox configuration is updated to ensure that it consumes
the dev-requirements file for all lint testing.

Finally, a small pep8 failure is fixed in the dynamic inventory script.

Change-Id: I78056d1d22228f073c44e9ee4e78534a4010effe
2016-03-07 17:36:30 +00:00
Jimmy McCrory
c8630f72be Resolve ansible-lint ANSIBLE0008
ansible-lint 2.3.7 added a rule checking for use of the deprecated
'sudo' and 'sudo_user' directives. They have been replaced with 'become'
and 'become_user' respectively.

Change-Id: I2271fe8468840884f19f41abba37e696c6296350
2016-02-11 07:40:09 -08:00
Matt Thompson
b4bb5105b6 Skip V-38462 in gate and cap ansible-lint
openstack-infra are creating images containing an apt.d configuration
that sets AllowUnauthenticated to true to support their custom apt
repos which contain unsigned packages.  The presence of this file causes
openstack-ansible-security to fail.  We can either remove the file, or
skip the V-38462 tag.  Skipping the tag in the gate is probably the
better long term solution.

Additionally, ansible-lint 2.3.8 was released today and is now causing
a number of ANSIBLE0008 errors to fail the gate.  This is a temporary
cap to unblock the gate.

Change-Id: I2c78f4e913e99e5fc5d84fba9e28197b73ac8f25
2016-02-11 15:36:31 +00:00
Jesse Pretorius
4effbbddae Add reno for release notes management
As per the release process changes for liberty and mitaka [1], the
reno tooling is being added to the repository for the purpose of
implementing on-going release note additions.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html

Change-Id: Ibbf4dc43b1fd5704a72cc7af82ddccfb1464926b
2015-11-12 14:12:45 +00:00
Paul Belanger
5715151e22 Rename dev-requirements.txt to test-requirements.txt
This is a cosmetic change to bring our requirement.txt files inline
with other OpenStack project.

Change-Id: I759acbbe9655884815df512835353dbb009b002c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-11 21:50:44 -05:00