Commit Graph

46 Commits

Author SHA1 Message Date
wu.chunyang 3b56a5e0f7 kolla-cli: deprecation - Removing project content
step 2b from:
https://docs.openstack.org/project-team-guide/repository.html#step-2b-remove-project-content

Deprecation notice:
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014983.html

Change-Id: I744f5c17232928cec68c1b90b2f5d791faf7d9e7
Depends-On: https://review.opendev.org/748259
2020-09-03 09:58:43 +02:00
Radosław Piliszek 1b54912a33 Cleanup py27 support
Removes all mentions of py27.

Change-Id: I2a1767c3df332cccf13303ce734c40d04dfd6ec9
Co-Authored-By: jacky06 <zhang.min@99cloud.net>
2020-05-18 13:19:28 +08:00
jacky06 cb017ed845 Use unittest.mock instead of third party mock
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
2020-04-06 12:33:06 +08:00
Ghanshyam Mann 3f9b0679ab [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

kolla-cli also drop py2 testing and support.

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: I44fe93012739ad190f8d0fe593e70863ab238158
2020-03-01 10:46:00 +00:00
caoyuan d5d6766cd7 tox: Move the whitelist_externals to testenv section
1. move the whitelist_externals to testenv

Change-Id: I12bd4f8a9b633cfb252fccebcee8214d309c1a56
2019-10-14 11:06:09 +08:00
caoyuan 1ec3980879 tox: Keeping going with docs
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
2019-10-14 00:52:18 +08:00
jacky06 a7ea023c38 Generate PDF documentation
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
2019-09-10 23:35:24 +08:00
jacky06 55963d94f6 Add reno for release notes management
Change-Id: Ie80cbe5ee84c5dd780938a3464a08e01268cb53f
2019-08-06 15:44:49 +08:00
gujin ba7c612101 Move doc related modules to doc/requirements.txt
Change-Id: Id99f39dd41beaa7d997270a44b355fe184d137b5
2019-08-06 00:29:45 +08:00
jacky06 3babfbaeda Move sphinx-build into tox
Change-Id: I8b98e96a5f8be1d86f388a2fd702eacd3ad07986
2019-08-02 23:43:50 +08:00
gujin 7cc4b7f624 Move the stestr command into testenv section
it's unnecessary to add py27 and py36 section into tox.ini
move it into testenv section

refer to kolla-ansible[0]

[0]: https://github.com/openstack/kolla-ansible/blob/master/tox.ini#L20

Change-Id: I3d7fb2a6904d4826109bcffb15e47713f08644f7
2019-07-16 01:07:23 +08:00
caoyuan 95489177d8 Update the tox.ini for functional
Co-Authored-By: jacky06 <zhang.min@99cloud.net>

Change-Id: I56c6db88adea8bc6083f227765f712d715f95a2a
2019-07-16 00:31:27 +08:00
caoyuan 98dca2e8fb Rename functional to functional-py27 and add functional-py37
Change-Id: Ib45b63991793fa05cddcc23491d6c1348ba1cb86
2019-07-15 23:14:05 +08:00
gujin aa955b7fe8 Add debug env into tox
Change-Id: Id33099d16a03babbc8474a7b72fc958e848f41f5
2019-07-15 14:31:59 +08:00
jacky06 e9c019f382 Synchronize tox and ansible version from kolla-ansible
1. Synchronize tox and ansible version from kolla-ansible
2. Remove the unnecessary space for zuul.yml

Change-Id: Ib48a0267da9b107dc6d306bcd82c65dcbb523514
2019-07-15 11:12:30 +08:00
gujin 410ca5075b Cap bandit below 1.6.0 version and add it into pep8 section
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
2019-07-12 23:50:46 +08:00
gujin c5fb7b1ed5 Add lower-constraints check into zuul
1. Add lower-constraints check into zuul
2. Add description into requirements.txt

Change-Id: I201373eed133e19d881022ef7bbab79c874d5eca
2019-07-12 13:39:26 +08:00
gujin 05c917b365 Add cover into zuul check
Change-Id: I00e6860674b165c9b6f7a33838df2a5e39444a42
2019-07-12 09:45:09 +08:00
gujin 54cc2951f2 Add Python 3 Train unit tests
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
2019-07-12 00:04:01 +08:00
gujin 10cc20514f Add doc8 test into pep8
Change-Id: Ifcf29fb582eb886b065dc6171bf37a677dc35f7f
2019-07-10 16:08:37 +08:00
jacky06 2eb7b085a1 Replace git.openstack.org URLs with opendev.org URLs
1. Replace git.openstack.org URLs with opendev.org URLs
2. Update some URLs to latest

Change-Id: I9e6dce8bc94fe104ff53eb87dbe2c56a34c16195
2019-07-04 20:31:46 +08:00
Borne Mace 8a49934653 Fixing test failures
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
2019-07-04 15:47:04 +08:00
zhulingjie c6ada2430d 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: I7b70af34d2df8d0181843a502d3e78ca3c7eb72a
2018-06-09 04:16:33 -04:00
Zuul 46a0b74560 Merge "Gate python3 unittests" 2018-06-07 15:02:34 +00:00
Charles Short 5e3a06d887 Switch to using stestr
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>
2018-06-07 09:58:34 -04:00
Eduardo Gonzalez 52122a6cdf Gate python3 unittests
Add a job to gate python3 unittests

Depends-on: I4c20eb58982c66598f0283864b9863b84cc29e57
Change-Id: I2195320e578d88d84d53eb2cf411e5e6476a5a5c
2018-06-07 09:30:16 +02:00
Steve Noyes 8e960e4a2b Add unit tests for host commands
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
2018-05-31 13:44:26 -04:00
Borne Mace e6459aa8f2 Add support for config reset command.
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
2018-05-25 11:16:02 -07:00
Steve Noyes bca9db24ba Enable py35 functional tests
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
2018-05-18 13:14:49 -04:00
Steve Noyes 7c0bc714f1 Fix mypy static type checker
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
2018-05-17 16:12:23 -04:00
Steve Noyes 8b2f52e2c6 Align tests with how functional tests are handled
- 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
2018-05-16 16:13:54 -04:00
Zuul 010b8929cf Updates to fix py27 / tox tests
Work needed to get the py27 tests to run in the CI.

Implements: blueprint initial-testing

Change-Id: I2375d092c43f6a00e575f303f8e62b969365b149
2018-05-15 11:24:40 -04:00
Borne Mace 78a1fcedf0 Updating the cli to work against kolla-ansible
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
2018-04-17 09:45:35 -07:00
Borne Mace c8a5730220 Updated unit tests to avoid remote calls
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
2017-11-20 10:35:32 -08:00
Borne Mace 69700b6020 Updating the python api syntax
Updating the python api syntax and also bumped
openstack-kolla-ansible requirement for 4.x release.

Change-Id: If9946511ecdcd7905579a9dac94458c16a1df2f2
Jira-Issue: OSTACKDEV-342
2017-03-23 09:54:25 -07:00
Borne Mace 694b2db531 Added initial mypy / pep-484 type hinting support.
Jira-Issue: None
2016-07-21 11:47:20 -07:00
Borne Mace 5a1596f051 Added initial sphinx documentation support for the python api
Jira-Issue: OSTACKDEV-25
2016-03-21 10:59:42 -07:00
Steve Noyes dfee41685c update tox.ini to ignore apache license in callback
Jira-Issue: OSTACKDEV-20
2016-03-16 13:05:42 -04:00
Steve Noyes 64dfd34c38 reverting config changes (for kollacli v2.1 stream) 2015-11-23 11:22:51 -05:00
Steve Noyes 6f2bef054e add initial oslo config framework
this adds just enough infrastructure to run the oslo-config
generator command to generate a sample config file.
2015-11-19 10:54:27 -05:00
Steve Noyes 80ff79a882 py3 (6) - update unit tests to py3 compatibility 2015-11-09 17:07:48 -05:00
Borne Mace ee57dcae8a added support for doing bandit checks. 2015-11-09 12:51:32 -08:00
Steve Noyes 538cfddf60 py3 (1) - update utils to py3 compatibilty
- use osli.utils for string decoding
- add get_ansible_command function so ansible can run on py3 default system
- use six to replace unicode function
2015-11-06 16:20:42 -05:00
Borne Mace 5d41194910 added pyc cleanup to tox test section 2015-11-02 10:15:32 -08:00
Steve Noyes ce783774d6 update tox.ini to run utests 2015-10-27 12:10:43 -04:00
Borne Mace 86b7524678 Initial commit
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.
2015-07-15 13:34:36 -07:00