summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix strutils password regexstable/victoriaHervé Beraud2022-03-113-0/+18
| | | | | | | | | | | | | | | | | Those regexes will fix Object style representation output. See the payload used in tests for details. This kind of output can be obtained by using the command: ``` $ openstack --debug ``` Co-Authored-By: Daniel Bengtsson <dbengt@redhat.com> Change-Id: I9024be93b109d1b64ca736546c0f69db7a5e06d0 (cherry picked from commit de4429f2be5fa21d1f6e1cacbb3c8417a7c56310) (cherry picked from commit 2c1b0628771695e546b0acb1e3c44c16c0c690db) (cherry picked from commit 90a504672071d61bdae3206c4764bd3528c165d6) (cherry picked from commit a38b56a6f9438d256d6e0f9b03181015f2b27d8c)
* Fix regex used to mask passwordvictoria-em4.6.1Hervé Beraud2022-01-243-1/+35
| | | | | | | | | | | | | | | | Some use cases are poorly handled by the regex used to mask password. Indeed when the password contains quotes or double quotes in the middle such as `pass"word`, the mask_password method will return `***"word`. For more details please see https://bugs.launchpad.net/oslo.utils/+bug/1949623 Closes-Bug: #1949623 Change-Id: I941750b4d49d2d75f0831b24d6dd17f4040f70a2 (cherry picked from commit 6e17ae1f7959c64dfd20a5f67edf422e702426aa) (cherry picked from commit 5ce8a7f0f8ecec7a85a23ec3d7a7fb1cad14ceba) (cherry picked from commit 143d3fbfa1e04778884de5acc08fa6f7fdabb265)
* Dropping lower constraints testingHervé Beraud2022-01-243-47/+0
| | | | | | | | | | | | | | | | | | | | | | We facing errors related to the new pip resolver, this topic was discussed on the ML and QA team proposed to to test lower-constraints [1]. I propose to drop this test because the complexity and recurring pain needed to maintain that now exceeds the benefits provided by this mechanismes. Contain also the patch[2] to remove the tox environment and the patch[3] to remove the lower-constraints.txt file. https://review.opendev.org/c/openstack/oslo.utils/+/787867 [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html [2] https://review.opendev.org/c/openstack/oslo.utils/+/772630 [3] https://review.opendev.org/c/openstack/oslo.utils/+/787867 Change-Id: Ia02154a1eb04434658a21adf82599ae55302e310 (cherry picked from commit 4cc3a558244769017ed5d8c3a6e4a63429d1e8e9) (cherry picked from commit c4e3576c63f8f12dc1b2c3ff9bf0350042cd1703)
* Add Python3 victoria unit testsOpenStack Release Bot2020-09-141-1/+1
| | | | | | | | | | | | This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for victoria. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I6f3456802fd432580dd27d9c03bde21759c4a3ae (cherry picked from commit f2723a513205c24c6fe23b90ce0e3215f2b4e5fa)
* Update TOX_CONSTRAINTS_FILE for stable/victoriaOpenStack Release Bot2020-09-111-2/+2
| | | | | | | | | | | | Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/victoria branch, tests will continue to use the upper-constraints list on master. Change-Id: I5b0c73fddbb7647034b0d54dfe384930b12841bc
* Update .gitreview for stable/victoriaOpenStack Release Bot2020-09-111-1/+2
| | | | Change-Id: I478200f0a61cc1ba4bad85e2c4218d5554e4a80c
* [goal] Migrate testing to ubuntu focal4.6.0Ghanshyam Mann2020-09-071-1/+1
| | | | | | | | | | | | | | | | | | | As per victoria cycle testing runtime and community goal[1] we need to migrate upstream CI/CD to Ubuntu Focal(20.04). Fixing: - bug#1886298 Bump the lower constraints for required deps which added python3.8 support in their later version. Story: #2007865 Task: #40207 Closes-Bug: #1886298 [1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h> Change-Id: Ic0a2606a414ce9d169c3736968356ce0133acb70
* Fix is_same_callback() testing for python3.8Ghanshyam Mann2020-09-072-7/+43
| | | | | | | | | | | | | | | | | | | | Python3.8 onwards, comparision of bound methods is changed. It no longer decide the bound method's equality based on their bounded objects equality instead it checks the identity of their '__self__'. Details about this behavior change in python 3.8 - https://bugs.python.org/issue1617161 - python-dev discussion: https://mail.python.org/pipermail/python-dev/2018-June/153959.html So python3.8 onwards, 'strict' arg has no meaning. For backward compatibility for python <3.8, we can keep the 'strict' arg but with deprecation warning. Also modify the is_same_callback() unit tests to verify the 'strict' arg based on python version. Change-Id: I3e6d9bbceccacddd0e1a514bbe5d0722a3408ecb Closes-Bug: #1841072
* Add util methods for checking json and yaml formatted file4.5.0Ghanshyam Mann2020-08-263-1/+84
| | | | | | | | | | | | | | | | As part of oslo_policy policy_file JSON to YAML migration BP, we need to check if oslo policy_file is JSON or YAML formatted (almost on all projects with policy in code, example Needed-By). - https://specs.openstack.org/openstack/oslo-specs/specs/victoria/policy-json-to-yaml.html These util methods try quick checks of file type by loading the file using json or yaml. Needed-By: https://review.opendev.org/#/c/748059/ Related Blueprint: policy-json-to-yaml Change-Id: I0edf030dc5cd6b77e0101089746589332860fa16
* Bump bandit versionMoisés Guimarães de Medeiros2020-07-241-1/+1
| | | | | | | | 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: I7b3144bd417f29cd57c16575ba47b45a4132aae7 Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
* Merge "New method in netutils: get_mac_addr_by_ipv6"4.4.0Zuul2020-07-243-0/+67
|\
| * New method in netutils: get_mac_addr_by_ipv6Bence Romsics2020-06-293-0/+67
| | | | | | | | | | | | | | | | | | This method is practically the reverse of get_ipv6_addr_by_EUI64(), so we can extract the MAC address from IPv6 addresses that were generated from interface identifiers. Change-Id: I48720d38649104f9f2f0a8fd208f2aac7548644e Related-Change: https://review.opendev.org/718729
* | versionutils: switch from pkg_resources to packaging4.3.0Doug Hellmann2020-07-053-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Importing pkg_resources has a side-effect of scanning the metadata of every installed python package. That is excessive overhead for a function that needs to compare two version strings. This change replaces pkg_resources with the packaging library, which is also used as the implementation for version parsing within setuptools and pkg_resources. Change-Id: Ic9bda0783d3664e1f518d513d81b3271028335fd Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* | Merge "Align contributing doc with oslo's policy"Zuul2020-06-301-0/+5
|\ \ | |/ |/|
| * Align contributing doc with oslo's policyHervé Beraud2020-05-041-0/+5
| | | | | | | | | | | | | | | | Related to: - https://review.opendev.org/#/c/723044/ - https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html Change-Id: I7b2832cdacb13151142d6fa3275c9e54e457e435
* | Fix uuidsentinel to follow getattr protocol4.2.2Balazs Gibizer2020-06-262-2/+2
| | | | | | | | | | | | | | | | | | This patch changes the exception type raise by uuidsentinel when the sentinel name starts with '_'. The __getattr__ protocol requires to raise an AttributeError if the attribute value cannot be returned. Closes-Bug: #1885281 Change-Id: I1076a957a19507e7d96ef429c0ae5d0ee8a90e66
* | Release greenthread when computing checksum4.2.1Vladyslav Drok2020-06-082-0/+22
| | | | | | | | | | | | | | | | Having time.sleep(0) after reading each block of data for computing checksum will allow other greenthreads to run. Closes-Bug: 1882569 Change-Id: I6e547d206de9e3e333e29ccad52bf6b519a86ff9
* | Fix pygments stylemelissaml2020-06-042-3/+2
| | | | | | | | | | | | | | | | New theme of docs respects pygments_style. more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I535b0627c37db7eb70c699642da0ffae36590329
* | Stop to use the __future__ module.4.2.0Hervé Beraud2020-06-023-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: I2b54ba480ce256d133be58a98b567d0964c25428
* | Merge "Fix hacking min version to 3.0.1"Zuul2020-05-261-1/+1
|\ \
| * | Fix hacking min version to 3.0.1zhangboye2020-05-221-1/+1
| | | | | | | | | | | | Change-Id: I95fd7fa65018dd3a887889ef11a88c63eaee74cf
* | | Merge "Add release notes links to doc index"Zuul2020-05-261-1/+12
|\ \ \
| * | | Add release notes links to doc indexHervé Beraud2020-04-161-1/+12
| | | | | | | | | | | | | | | | Change-Id: I4ae1aaea038fc8c5b05d455f44899c5b5b7f36f7
* | | | Merge "Remove the unused coding style modules"Zuul2020-05-261-1/+0
|\ \ \ \
| * | | | Remove the unused coding style modulesjacky062020-05-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python modules related to coding style checks (listed in blacklist.txt in openstack/requirements repo) are dropped from lower-constraints.txt as they are not actually used in tests (other than pep8). more info: https://github.com/openstack/requirements/blob/master/blacklist.txt Change-Id: I5cb9917358f595a9061a2e27ff5d570a6f75f53f
* | | | | Merge "Remove translation sections from setup.cfg"Zuul2020-05-222-16/+0
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Remove translation sections from setup.cfgmelissaml2020-05-152-16/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | These translation sections are not needed anymore, Babel can generate translation files without them. Change-Id: I9cf0d090b6360c32de3882f30e673512e2d6be88
* | | | Switch to newer openstackdocstheme and reno versionsAndreas Jaeger2020-05-183-9/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to openstackdocstheme 2.2.0 and reno 3.1.0 versions. Using these versions will allow especially: * Linking from HTML to PDF document * Allow parallel building of documents * Fix some rendering problems Update Sphinx version as well. openstackdocstheme renames some variables, so follow the renames before the next release removes them. A couple of variables are also not needed anymore, remove them. Depends-On: https://review.opendev.org/728938 Change-Id: I3a57dfef23cee9dc4430f46063e89ffb54d0396c
* | | Remove monotonic usageSean McGinnis2020-05-041-5/+2
| |/ |/| | | | | | | | | | | | | | | | | The monotonic package was needed for monotonic time operations when running under Python runtimes older than 3.3. Since we now only support versions higher than this, this third party package requirement can now be removed. Change-Id: I7aa3b46a51e416f1c949538301be2365c39047ed Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Imported Translations from ZanataOpenStack Proposal Bot2020-04-291-3/+96
|/ | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: Icbde6a5eb3ebdd3b34fbbfff90bd8c1c7fca6b34
* Update master for stable/ussuriOpenStack Release Bot2020-04-142-0/+7
| | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/ussuri. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/ussuri. Change-Id: Icea548d6ceace770aeacd74947b7bf8f1f0a7311 Sem-Ver: feature
* Merge "Use unittest.mock instead of third party mock"4.1.1Zuul2020-04-069-11/+8
|\
| * Use unittest.mock instead of third party mockSean McGinnis2020-03-319-11/+8
| | | | | | | | | | | | | | | | 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: I4c5451afece8dfff30aa1ec4c7e0d5eb277043fd Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Update hacking for Python3Andreas Jaeger2020-04-028-8/+9
|/ | | | | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Remove hacking and friends from lower-constraints, they are not needed for installation. Change-Id: I3f23bf09ef24fe34e128102c34382da98e10f5c1
* tox: Use upper-constraints for docs jobscaoyuan2020-03-111-4/+7
| | | | Change-Id: I43225fc4ed3ba471ba7097f1e317bc6ffa777a46
* Merge "tests: Convert remaining tests to mock"Zuul2020-02-281-166/+173
|\
| * tests: Convert remaining tests to mockStephen Finucane2020-02-251-166/+173
| | | | | | | | | | | | | | | | | | | | Convert remaining tests from mox to mock. This actually highlights something mock doesn't do that well - ensuring the order that things are called in. It's not a big deal and the tests are ultimately easier to grok (IMO), but it's worth highlighting. Change-Id: I0add2c96a9da510e1a9be0d6d07b7a6a33ac6528 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Add test to check scientific notation on disk virtual size"Zuul2020-02-261-1/+3
|\ \
| * | Add test to check scientific notation on disk virtual sizeHervé Beraud2020-02-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we only focused tests on disk size these changes add more tests on other value which could be given and also parsed by using similar regexes. Also these changes format test name to match default format. Change-Id: I49a67c4670e14f324a52b0454e78f9149813c6a0
* | | Merge "Fix regex to correctly recognize scientific notation with QemuImgInfo"4.1.0Zuul2020-02-263-1/+11
|\ \ \ | |/ / | | / | |/ |/|
| * Fix regex to correctly recognize scientific notation with QemuImgInfoHervé Beraud2020-02-253-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu 4.1.0 output shifts to scientific notation at 1000mb, breaking oslo.utils. Problem here is that the qemu-img output shifts to scientific notation: 999 => 999 MiB 1000 => 1e+03 MiB The regex in python-oslo-utils does not cover this. This issue is likely regexp parsing "disk size: 1e+03 MiB" value. These changes fix that. Change-Id: I4c016865890135023ceb497de18d75ccebd5961a Closes-Bug: 1864529
* | Flatten test caseStephen Finucane2020-02-251-86/+195
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mock doesn't have a way to do the below pattern: foo.bar(call_arg).AndReturn(return_arg) my_call() Instead, you have to do the following: mock_foo.return_value = return_arg my_call() mock_foo.assert_call_once_with(call_arg) As such, we can't easily map the below to mock: def check_something(self): mock_foo.assert_call_once_with(call_arg) def test_foo(self): self.check_something() self.check_something() self.check_something() my_call() And we need to flatten this out, somewhat dumbly, to allow the conversion. Change-Id: I0f0e3e9ce4a410f60639c28aaadb9197aa47b492 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* imageutils: Report format specific details when using JSON output formatLee Yarwood2020-02-142-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The data held within this section is particularly useful when dealing with encrypted LUKSv1, as shown below: $ qemu-img info --output=json rbd:volumes/volume { [..] "format-specific": { "type": "luks", "data": { "ivgen-alg": "plain64", "hash-alg": "sha256", "cipher-alg": "aes-256", "uuid": "de946b24-f318-4fa6-aacf-c5e97db04609", "cipher-mode": "xts", "slots": [ { "active": true, "iters": 1966316, "key-offset": 4096, "stripes": 4000 }, { "active": false, "key-offset": 262144 }, { "active": false, "key-offset": 520192 }, { "active": false, "key-offset": 778240 }, { "active": false, "key-offset": 1036288 }, { "active": false, "key-offset": 1294336 }, { "active": false, "key-offset": 1552384 }, { "active": false, "key-offset": 1810432 } ], "payload-offset": 2068480, "master-key-iters": 479636 } }, } Unfortunately the only documentation for this is in the QEMU codebase at present, for example for LUKSv1: https://github.com/qemu/qemu/blob/d8d5fefd8657d4f7b380b3a1533340434b5b9def/qapi/crypto.json#L272-L298 Related-Bug: #1861071 Change-Id: I133da07a5a9628b8a9338556939c858afae679f4
* remove outdated header4.0.1Hervé Beraud2020-02-101-1/+0
| | | | Change-Id: I33025e633a18e6582961462e942cbdeac3a085b7
* Merge "Remove universal wheel configuration"Zuul2020-02-101-2/+0
|\
| * Remove universal wheel configurationBen Nemec2020-02-061-2/+0
| | | | | | | | | | | | | | Now that we've dropped py2 support we shouldn't be setting this anymore. Change-Id: Ib8d04a107cba50e73f4ed7fad210135c98479b5c
* | reword releasenote for py27 support droppingHervé Beraud2020-02-061-1/+1
|/ | | | Change-Id: I1fd384a0e08716cc48c2a4e7dfad28d6efa15f3c
* [ussuri][goal] Drop python 2.7 support and testing4.0.0Hervé Beraud2020-02-038-22/+11
| | | | | | | | | | | | | | OpenStack is dropping the py2.7 support in Ussuri cycle. 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: If437786eb8dbba9386dd473b45dab0933812c649
* Merge "tox: Trivial cleanup"Zuul2020-01-301-9/+3
|\
| * tox: Trivial cleanupHervé Beraud2020-01-081-9/+3
| | | | | | | | | | | | | | | | | | Move 'basepython' to the top-level 'testenv'. Use the default 'install_command' https://tox.readthedocs.io/en/latest/config.html#conf-install_command Change-Id: I45981d5e80ab8ea03176ce08e119556fec078a37