Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I6101cb044ee0fc2a7be95352569782eaf0b938aa
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.
[1] sphinx-doc/sphinx@e3483e9
Change-Id: I6c3fcf7519c71058ed1814ac852473b12b17a2e9
This patch adds a new tox job/command for building the pdf
version of documentation.
tox -epdf-docs
In addition to adjusting the infra requirement for PDF build
support, the following changes are made to build a PDF doc
- Download link of config_options, sample config and policy
files are disabled for PDF doc as relative links do not
make sense.
- Pre-create the doc/build/pdf/_static directory as a
workaround because sphinx_feature_classification.support_matrix extension
is operating under the assumption that the _static directory already exist
and trying to copy support-matrix.css into it. We need to remove
this workaround once the problem in the support_matrix extension is fixed.
- Use the toctree_only=True workaround to avoid TOC duplicate links.
Change-Id: I8190e0a4f169e1a3268f5e724c30a1c809739dd6
1. Synchronize tox and ansible version from kolla-ansible
2. Remove the unnecessary space for zuul.yml
Change-Id: Ib48a0267da9b107dc6d306bcd82c65dcbb523514
1. Bandit 1.6.0 accidentally changed how to exclusion list option is
handled and breaks our use of it. Cap to the previous version until
bandit has has fixed the problem.
2. add bandit test into pep8
3. clean up envlist
Change-Id: I9c7030e6fab24fb31871042dc15d23eae9fe2161
1. This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.
2. Remove a unnecessary space
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Change-Id: I89846e571cfabca4e6188be8a72337111bfa9bff
It seems that in newer ansible versions the error strings have
changed and we are no longer able to use the hard coded
"UNREACHABLE" string in our stop test. For now changing the
test to just skip the string investigation. Also updating some
package dependencies to match those in kolla-ansible.
We need the 3.5 to 3.6 migration along with the UNREACHABLE
string change together to clean up the test failures Neither
can be fixed without the other. Thanks zhulingjie!!
Co-Authored-By: zhulingjie <easyzlj@gmail.com>
Change-Id: I347cda4bbdc6ed7dc4857cb1865da578670235fb
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: I7b70af34d2df8d0181843a502d3e78ca3c7eb72a
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I4c20eb58982c66598f0283864b9863b84cc29e57
Signed-off-by: Charles Short <zulcss@gmail.com>
As part of getting away from using calls to the shell in the
tests, we will need code coverage of the commands library which
will no longer be used when the shell is no longer called. This
change is the first of serveral to provide unnit test coverage
for commands/host.
As a result of writing these tests, I needed to tweak a few things,
some to make mocking possible, and fix some minor issues:
- move delete confirmation prompt to its own method so it can
be mocked.
- remove extra space from failed Host check message
- fix return code to 0 in Host setup, when the host is already setup.
- in shell, move inventory check to a method so it can be mocked.
Change-Id: I63cb1afd5313959a6fdda11e9c2b03317c60197a
The config reset command wipes all properties,
inventory data, default tls certificates and passwords.
The password set command now only allows modification
of existing passwords, and clear only removes the value
for existing password keys. The ability to completely
add new and remove passwords no longer exists as it
was really only useful in very edge cases and did not
play nicely with the concept of doing a config reset.
Change-Id: I9d1868da1161ebaf64793ab6d0e42de74389feab
This change sets up the functional tests to run on py35 in CI
testing. This change also:
- fixes some import problems only seen in py35.
- removes obsolete/broken code that was needed when ansible
didn't support py3.
Partially Implements: blueprint initial-testing
Change-Id: I3df34e266a8f64f4f963ded51adf8879a324be30
mypy was not working. This change:
- fixes mypy call in tox.ini and adds mypy job to zuul
- fix a couple of errors that mypy found
- add import typing as needed to files
Implements: blueprint initial-testing
Change-Id: I94719f7064c29168721dc37a2148638b927cd2e4
- move tests directory under kolla_cli
- create new functional directory and put all tests in there
- add empty unit test directory
- add "test_" as a prefix to all test files (so ostestr sees them)
- use ostestr (--serial) to run the tests
- add functional tests into tox and zuul configs
- update tests/common to rip out code that selected which cli
command to use. will now always use python kolla_cli/shell.py
No test files were modified.
Change-Id: Iec80f7546b0f4ff2a857b14f546fd299732c727d
Implements: blueprint initial-testing
Pass one at updating the kolla-cli to work against the official
kolla-ansible bits rather than the internal Oracle ones. There
are some corresponding changes in the kolla-ansible vagrant
scripts related to bringing up the development environment.
Change-Id: Ia680bb65f904c4dbaf3f05d0334145980c860000
Implements: blueprint functional-single-node
With the move to a CI/CD environment the tests needed
to be tweaked to not try to make remote calls. Going
forward any compoud / functional tests that need to
run against remote systems should be broken out into
separate tests that won't be run during our normal
CI/CD flow.
Also fixed flaw in log_collector.py introduced
during recent inventory logic refactoring.
Jira-Issue: OPENSTACK-1710
Change-Id: Id11cc1abcac6ac5b94176a1f17a8f5f82b6f00d5
Updating the python api syntax and also bumped
openstack-kolla-ansible requirement for 4.x release.
Change-Id: If9946511ecdcd7905579a9dac94458c16a1df2f2
Jira-Issue: OSTACKDEV-342
Included basic cliff usage structure for the execition of
three host commands. Includes Babel usage structure for
i18n message extraction. Includes tox and pep8 usage
structure for code quality / testing. Includes standard
requirements.txt and test-requirements.txt files.