Commit Graph

77 Commits

Author SHA1 Message Date
Hervé Beraud 4f58211e7a Bump bandit and make oslo.messaging compatible with latest rules
- Move from lxml lib direct usage to defusedxml lib [1] to fix B320 [2]

[1] https://pypi.org/project/defusedxml/0.7.1/
[2] https://bandit.readthedocs.io/en/1.7.5/blacklists/blacklist_calls.html#b313-b320-xml

Change-Id: Id1faa9227415884d15c737ace5a0e0e5de3afa81
2023-06-22 15:22:55 +02:00
Zuul fc0678a7a6 Merge "Adding pre-commit" 2020-09-22 12:40:28 +00:00
Hervé Beraud cef0e7cc4c Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
  (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
  (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I593196cf0d099fe1dcc3a6298fd6cc6b7a883ea2
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 12:28:20 +02:00
Moisés Guimarães de Medeiros 7e2b42d86d Bump bandit version
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393

Change-Id: If1e25c02adf0fb8f96f7bfb9134c5d170fab15eb
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:37:45 +02:00
zhangboye 2827bd10cb Fix hacking min version to 3.0.1
Change-Id: I11fdd5a0779ed6d638682ac9273e3e50ec64261b
2020-05-22 11:04:01 +08:00
Sean McGinnis c9c34169de
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: I4d8eada1df0ec43162d4729bf75147eb40252b72
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 14:37:19 -05:00
Andreas Jaeger 724f36bd3e Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix:
F601 dictionary key 'cr_to_rp' repeated with different values
F841 local variable 'excep' is assigned to but never used
F821 undefined name 'excep'
E305 expected 2 blank lines after class or function definition, found 1
E731 do not assign a lambda expression, use a def

Blacklist:
W504 line break after binary operator

Update hacking extension for newer flake8 version.

Change-Id: I9f0d7b166e285091111c42fe978d29d7dd3bf5db
2020-03-30 11:56:00 +00:00
ZhongShengping c59246530f 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 detailed information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Id20646cd51ffc13cf4e77c640eb677fe376c1b1f
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2019-07-19 10:56:20 +01:00
jacky06 d63f76a9b2 Sync Sphinx requirement
Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.

This change fixes `requirements-check` Zuul job.

Change-Id: I9c3dff8c0a87d3bad327f83770f8a6f8484abac6
Closes-Bug: #1831410
2019-06-03 11:19:54 +08:00
Radoslav Gerganov 44396c93b4 Set request context when polling vCenter tasks
There are various useful log messages which come when polling vCenter
tasks which are missing request context and thus are hard to correlate
to API requests.
This patch fixes this by passing the request context to the async
jobs which poll the vCenter tasks.

Change-Id: I8efbc343e5073d3deb18b5f87c378c271ea4d816
2018-08-07 15:43:36 +03:00
Vu Cong Tuan d1cfde2b6d Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Iea425a8583f7396cc4e9d6964f3efa9875dc59ac
2018-07-04 07:54:50 +07:00
OpenStack Proposal Bot 2b626bccca Updated from global requirements
Change-Id: Ib06d9be007a1ffe8d8ad4ea7bc9c6bb9f5d5a646
2018-03-15 07:52:14 +00:00
OpenStack Proposal Bot a06d477c91 Updated from global requirements
Change-Id: I114e968b223cb96d66b663edec1c59a443eb4848
2018-03-10 13:44:32 +00:00
OpenStack Proposal Bot 0c0fb8721a Updated from global requirements
Change-Id: Idfcd2ce0f1c30c56a46de8d8c6c7a09365aa4cd8
2018-01-24 01:26:48 +00:00
OpenStack Proposal Bot 4da836cfb2 Updated from global requirements
Change-Id: I1199f464ccfae60c51511913f04186b84043ce52
2018-01-18 03:25:17 +00:00
melissaml 69bbe4cb03 Cleanup test-requirements
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)

Change-Id: I63353aa1a6b3a79c4b90138f0fe0efb9cfb5c283
2017-12-19 11:06:07 +08:00
OpenStack Proposal Bot e555138ef2 Updated from global requirements
Change-Id: Ibc8df8370dbfc866190142ae183b680e459ee2fc
2017-11-16 11:22:17 +00:00
OpenStack Proposal Bot f3eab645da Updated from global requirements
Change-Id: Icdca64ffb501ebe38b674262c7259651463c2edc
2017-09-20 16:23:32 +00:00
OpenStack Proposal Bot 37ed8fb23e Updated from global requirements
Change-Id: If4d53245a1458eef3a8c461f050cab4279dda2d5
2017-08-18 11:40:33 +00:00
OpenStack Proposal Bot d89abc8b26 Updated from global requirements
Change-Id: I38c61779c9dd08814d3d2ac72f256ab9b62b9832
2017-07-27 19:20:06 +00:00
Akihiro Motoki 01443b8380 Switch from oslosphinx to openstackdocstheme
Change-Id: Ic1e2786783fa47f305f8a849d36648efe3e46ac4
2017-07-11 14:11:11 +00:00
OpenStack Proposal Bot c48eefee76 Updated from global requirements
Change-Id: I69f284a9592e16c2017455c140cdf3ad97c8e755
2017-06-27 12:20:43 +00:00
OpenStack Proposal Bot 7378218300 Updated from global requirements
Change-Id: I06cd7c45eab306f0e3e5c3f20ed8d0e597d60621
2017-06-02 22:05:49 +00:00
OpenStack Proposal Bot 37c3d53d5b Updated from global requirements
Change-Id: If24b3b5f2c74b55e7f1a598788039256d891a0ae
2017-05-17 03:57:02 +00:00
OpenStack Proposal Bot f4cad40ad6 Updated from global requirements
Change-Id: Ie8470e3c3f19e814c148556910ea17813ddc122a
2017-05-15 00:53:19 +00:00
ChangBo Guo(gcb) eadcdd3540 Trivial: Remove testscenarios from test-requirements.txt
We don't use testscenarios anywhere, need remove it.

Change-Id: Id664af4c8e5b5d8939230f6654a2d59a1e50c1e7
2017-03-28 23:33:05 +08:00
OpenStack Proposal Bot 145b124f2d Updated from global requirements
Change-Id: I6ebe9d246da72fb4635675f08d3cdb3432f3e70c
2017-03-03 00:03:29 +00:00
ricolin 7f8f3f6b96 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: Ibfea7ba6692ccf633ccd96a3c4dbb3d7328725a6
2017-03-02 18:18:05 +08:00
OpenStack Proposal Bot 0520c71ada Updated from global requirements
Change-Id: I59acc5b0ad4bcc9dbbe2290821292c78de4e263c
2017-02-10 05:58:07 +00:00
Vipin Balachandran f9c8241989 Improve unit test coverage
Adding unit tests for ServiceMessagePlugin.add_attribute_for_value()
to cover cases where node name is 'removeKey'.

Change-Id: I0f6f0bfe1b20258efe05932e6a1756a29d315767
2017-02-07 15:31:22 +05:30
OpenStack Proposal Bot e4df58730d Updated from global requirements
Change-Id: Iccca4c5c015e63404f0531215bb9c63401fddede
2016-11-02 15:39:35 +00:00
Jenkins 5a72c0e428 Merge "Remove mox3 in test-requirement.txt" 2016-10-23 12:07:47 +00:00
OpenStack Proposal Bot 957d45fedb Updated from global requirements
Change-Id: Ib97a62d2f0322004774fbdaabb1fd7038f6ed990
2016-10-22 01:26:22 +00:00
Luong Anh Tuan 957768e240 Remove mox3 in test-requirement.txt
mox3 was used for unit tests. But now we replace it with mock.
So I think there no need to keep it in test-requirement.txt.

Change-Id: I848717b604100f193d5fbaf411f512f28594aae4
2016-10-21 15:35:41 +07:00
OpenStack Proposal Bot 02ed7f74f7 Updated from global requirements
Change-Id: I40d885b3e561ca4222cc52abb04bc53f273aa105
2016-09-28 16:59:56 +00:00
OpenStack Proposal Bot a5258aa8cd Updated from global requirements
Change-Id: I76c576d62dcce5f48980a9bbb344435044ac8a82
2016-09-27 10:06:43 +00:00
OpenStack Proposal Bot a2494e59c8 Updated from global requirements
Change-Id: Ie663d1703da373c0bfe5c25edb16eb35b2e8fc94
2016-08-18 05:56:07 +00:00
Swapnil Kulkarni (coolsvap) 7c893cab6a Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I454d5a6e24b8544824fd3dc1f85055a72f80fa18
2016-07-22 06:39:36 +00:00
OpenStack Proposal Bot 029bc0a831 Updated from global requirements
Change-Id: Ide47f03299f2c715e66157e4093c869bcafbc409
2016-06-24 03:16:52 +00:00
OpenStack Proposal Bot 8d8a5dea4d Updated from global requirements
Change-Id: Ib51bb13f405b200271d1830d26fea5c7c6f1b0d8
2016-06-21 18:04:44 +00:00
OpenStack Proposal Bot bfcd07fc9e Updated from global requirements
Change-Id: Ia40126673887dcb87bdb52dab96e00949a052b5a
2016-06-02 21:10:54 +00:00
OpenStack Proposal Bot 74fede7894 Updated from global requirements
Change-Id: Idd8ab66ad15ecf739198002375debe597bd39390
2016-05-26 17:04:16 +00:00
Kirill Bespalov 2e9ba24c04 Add reno for release notes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: I67132d71d478ab5aca9b19c2c417aaaf51357748
2016-05-24 15:06:34 +03:00
OpenStack Proposal Bot 54fe0925e7 Updated from global requirements
Change-Id: I63aac91617c61927c6bb0b23281b91161cf23fda
2016-04-28 16:16:25 +00:00
OpenStack Proposal Bot 251797b260 Updated from global requirements
Change-Id: Ib29d1fe35b165c01a8f2f5ac6d5c716b2cb0679d
2016-04-08 00:32:27 +00:00
OpenStack Proposal Bot f3feb5b69b Updated from global requirements
Change-Id: I83c6166176eea7e3b898ae71c24f5ce6c080dc1a
2016-02-04 18:59:15 +00:00
OpenStack Proposal Bot 1e69fe55e3 Updated from global requirements
Change-Id: I5f55ed9677cb481217044c388552e67074fef3ea
2016-01-16 03:31:35 +00:00
OpenStack Proposal Bot 9034d1d60b Updated from global requirements
Change-Id: Icbf1c14f5168cf93c8c46b4919d94bd27a2c5423
2015-11-19 15:51:57 +00:00
OpenStack Proposal Bot cda87e7913 Updated from global requirements
Change-Id: I9504c44ac575b47b256496e833dd53a9dce113d2
2015-08-17 22:19:37 +00:00
OpenStack Proposal Bot 6f207589c5 Updated from global requirements
Change-Id: I8cde8665dde47d3fcf887bfeaa9bd18ec4e3cdf8
2015-07-22 04:59:15 +00:00