Commit Graph

42 Commits (1c02d525bb77487d5de89c4bd58116b916d44207)

Author SHA1 Message Date
Corey Bryant 4ec35ed3b0 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:

Change-Id: If2aeeb1597146528b94b1cb76e3be6061831a0b1
Story: #2005924
Task: #34200
4 years ago
Zuul 8cb5fe3623 Merge "Replace URLs with URLs" 4 years ago
Eric Harney 80e37a3e61 Ignore pep8 W503/W504
W503 has been reversed in current pep8, so we
shouldn't start enforcing this here.

W504 takes the opposite stance of W503.

Neither of these seem worth enforcing in our
code for now, just punt on a strict rule for
this and aim for readable code.

Change-Id: Id38b2629ea22792bbc7b4dce77fa9e7039be140f
4 years ago
caoyuan 255b5c8c8a Replace URLs with URLs
Change-Id: Ib380ce9533dc54544257418cef6449cf8525219d
4 years ago
Sean McGinnis c88071dc19
Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.

Change-Id: I3a8d2137a1d3158a476a6c23b8a6229b1dfc20f6
Signed-off-by: Sean McGinnis <>
4 years ago
Sahid Orentino Ferdjaoui ddab8ea8ad add python 3.7 unit test job
See ML discussion here [1] for context.


Story: #2004073
Co-authored-by: Charles Short <>
Signed-off-by: Sahid Orentino Ferdjaoui <>
Change-Id: Ic6d01c35f04482acfdab975a118ffa9178b906b0
4 years ago
Sean McGinnis 959ec5d54d
Add slowest test output to end of test run
Change-Id: Ie74a663b147bde12456d9f64edca05cfb4a29136
Signed-off-by: Sean McGinnis <>
4 years ago
Zuul cb2ee2776d Merge "Switch to using stestr" 5 years ago
Doug Hellmann 66362ae0f2 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: Ie6a61e4db3f7d3f6e1c7478fab4ab4afb6c88ce1
Signed-off-by: Doug Hellmann <>
5 years ago
Charles Short 80d222a847 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.


Change-Id: I5bfb3f34c27e393197456edf9b16010875fa9b7c
Signed-off-by: Charles Short <>
5 years ago
Doug Hellmann f11695cf0d add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

for more details.

Change-Id: I59d376c6da1afc0847a25893d80ca9a210bbe64b
Signed-off-by: Doug Hellmann <>
5 years ago
Luong Anh Tuan df8e0fe027 Enable hacking-extensions H204, H205
This patch enable extensions:
-[H204] Use assert(Not)Equal to check for equality.
-[H205] Use assert(Greater|Less)(Equal) for comparison.

Change-Id: I89efcab9993fcbb187249e32712fe00b86715e3a
5 years ago
Andreas Jaeger 56d034ab10 Avoid for constraints support
We do not need, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/ file.

This follows to remove

Change-Id: I43828f47711118eba8d835222586db4faac93180
6 years ago
Eric Harney e9422a730a Enable Python hash randomization for tests
This should be enabled for all tests to ensure
we don't introduce bugs related to code relying
on ordering of unordered types.

Change-Id: I7150e6f222c8b7a264da2d497ea879028ab24b12
6 years ago
Sean McGinnis 9a741bac21 Add .stestr.conf configuration
os-testr has moved over to use stestr instead of testr. While this
is usually compaible with existing settings, there is a warning
that is emitted when .stestr.conf is not present. It is usually
able to fall back to parsing the .testr.conf file, but to be more
correct and to prevent future problems we should update the config.

Change-Id: I15fd3427485ff26ee936cae622585745ba9281b7
6 years ago
Jenkins 0f01864959 Merge "Enable some off-by-default checks" 6 years ago
Stephen Finucane f3eb28dcf6 doc: Remove cruft from
Clean up both the releasenotes '' and some remaining pieces of
the main ''. In the case of the former, it looks like this was
copied from Cinder's config, and retains a lot of unnecessary config for
same. Remove it all.

It is also necessary to remove a docstring from 'os_brick/',
as this was causing build issues. No idea how this was building

Change-Id: I2ca913c2ebcf2030642b18c72af180bb8f03b288
6 years ago
zhanghongtao cbca5ba77b Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I4b7cc70025a56e19aad7ffc2caec307e5f70500e
6 years ago
Maciej Kucia 22f7500025 Removed invalid comments in tox.ini [flake8]
Change-Id: I9b12f6b1ad2612403de7c904a7752ef6960480e2
Signed-off-by: Maciej Kucia <>
6 years ago
Maciej Kucia a14653b255 Stop ignoring H904 hacking rule in tox
This change is one in the series of changes to
align os-brick with Cinder rules.

- H904 'Wrap long lines in parentheses instead of a backslash'

See following for more information:

Change-Id: Ia08ce1b9cdab968c0965bc04aa7d202190cb4bb3
Signed-off-by: Maciej Kucia <>
6 years ago
Maciej Kucia d9ac24d0d2 Stop ignoring H405 hacking rule in tox
This change is one in the series of changes to
align os-brick with Cinder rules.

- H405 'multi line docstring summary not
        separated with an empty line'

See following for more information:

Change-Id: Id67324c0ef22287d91b49ae11eda094bf73739a1
Signed-off-by: Maciej Kucia <>
6 years ago
Maciej Kucia 211bda0a04 Stop ignoring E265 pycodestyle rule in tox
This change is one in the series of changes to
align os-brick with Cinder rules.

- E265 'block comment should start with "# " '

See following for more information:

Change-Id: I392d5ed179ddf1fd644cb3b53436f2aee2f47cbe
Signed-off-by: Maciej Kucia <>
6 years ago
Maciej Kucia 32b4b24bfc Stop ignoring E123 and E125 pycodestyle rules
Remove options from flake8 section in tox.ini

This change is one in the series of changes to
align os-brick with Cinder rules.

- E123 'closing bracket does not match indentation of
        opening bracket’s line'
  This option is ignored by default as it is not PEP8 enforced

- E125 'continuation line with same indent as next logical line'

See following for more information:

Change-Id: I439e677e66d59a48d4b2ac87eb0256146ff507e0
Signed-off-by: Maciej Kucia <>
6 years ago
Cao Xuan Hoang 99eda1580a Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim
support for Python 3.5 in the classifier.
This patch also adds the convenience py35 venv.

Change-Id: Ic3967cf2461add370a03cd15e71087664b9ec1d7
6 years ago
Lee Yarwood 717a55c036 Add debug to tox environment
At present oslo_debug_helper assumes that the importable directory
is os-brick and fails unless overriden with :

  $ tox -e debug -- -t os_brick

Change-Id: Ic8dd164d8515dd58b4456699e5ed114815ff8c4f
7 years ago
Lee Yarwood 58956d7c86 Add Constraints support and missing bindep.txt dependencies
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove os-brick.

Finally, it also adds libxml2 and libxslt to bindep.txt for use when
building lxml that is now required by oslo.vmware.

Change-Id: I3fbe4acbdf0281c91801ff7d09de6e9043915939
7 years ago
Walter A. Boring IV e95864a2c2 os-brick: Add bindep support
This patch adds support for the bindep python package.  This enables os-brick
to specify binary package requirements for operations.

Change-Id: Iab5e923101855622c33df85899401c48a668ee15
7 years ago
xianming mao d67db13fee Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:

Change-Id: I1eec26249b9085117e82e7b730762f9437b1dfca
7 years ago
Walter A. Boring IV c5f31a1a4f Upgrade tox to 2.0
Several projects have set the minimum tox version to 2.0.
This patch updates tox.ini to set the minimum required tox version
to 2.0

Change-Id: Id88e63d953d99aeebfd909ce3fae6295ddb461e1
7 years ago
Walter A. Boring IV 0dcb996eaf Add fast8 to quickly test pep8 changes
This patch adds the 'fast8' test that Cinder has to os-brick.
It's a simple pep8 check against what has changed since HEAD.
This allows you to test for pep8 violations in files that you have
changed without testing the entire repo.

Change-Id: I4e3840d763d08a80c84ba00e2d5e5710a905ecf3
7 years ago
Walter A. Boring IV 9640b73cc4 Fix coverage generation
This patch makes a few small changes that will get tox -ecover
working again.

Change-Id: If67b0ad11226ff0f5774ace968277cd400f78655
7 years ago
Jenkins 1d392b1fc9 Merge "Don't use oslo-incubator stuff" 7 years ago
Eric Harney 2ec0e03a2d Add pylint tox env
Run pylint with
 $ tox -e pylint

(Copied from Cinder with small modifications.)

Change-Id: Ieedcab8abdae759b4eedd9389db11f1bad62a5ca
7 years ago
ChangBo Guo(gcb) 652cd83201 Don't use oslo-incubator stuff
oslo-incubator was not used for oslo libaries any more.
So clean unuseful stuff.

Change-Id: I4d0d29a010063a065cf63164f13f6e913559f1e1
7 years ago
Sean McGinnis 4b3dbdcb2f Add reno for release notes management
Adopt reno for release notes like we have done for cinder.
One difference for the client is we will not be backporting
to Liberty per recommendation here [1].


Change-Id: I8f0ea1e23cb60d9f5a2a41ee440c47716bb7a3f8
7 years ago
Ondřej Nový f5c74cdc9e Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:

Change-Id: I827a7c2b9955cd84d96cba2f4b860f0977d541b1
8 years ago
Sean McGinnis fb4b2e0475 Update minimum tox version to 1.8
Other projects have updated to 1.8 or later for the minimum
tox version (nova, neutron), so we should probably do the

Change-Id: Iad3c452a3e5935894e0fd9748bcb55fde5fcd04f
8 years ago
Walter A. Boring IV dc8f8a170f Change os-brick to use ostestr
This patch changes the unit tests runs via tox to
use os-testr as the tool to run the tests.  Cinder is
already using ostestr.   This also by default enables
parallel testing.

Change-Id: Iab20bdc2cbd454de2f1d66cea3f68b40b161dc9d
8 years ago
Victor Stinner c7446ccc43 Cleanup Python 3 changes
* Rework BrickException to simplify the code. Revert partially changes
  done to port os-brick to Python 3, without losing Python 3
* tox.ini: run py34 tests using the commands of the default test
  environent. All os-brick tests now pass on Python 3.4, so testr test
  runner can be used to run tests in parallel, get the test repository,
* tox.ini: exchange order of py27 and py34 in envlist: py34 must be
  run first to workaround a testrepository bug (see the note below).
* README: give advices on tox/testrepository issues with python 2/3

Change-Id: If80e01e802079afea3f2ea8051c76afffa47fa03
8 years ago
Walter A. Boring IV 6cc5f4a107 update os-brick to pass python3 tests
This patch adds the py34 tests for tox.ini and updates some
unit tests, exception and some code to support passing the
py34 tests.

Change-Id: Ib50b988966c24d97117472c771e63dd796af5f59
Closes-Bug: 1469338
8 years ago
Walter A. Boring IV 88afc6c17e renamed the project to os-brick
As per discussion in IRC, we have renamed brick to
os-brick, which creates the pacakge os_brick.  There was
a conflict in pypi for the 'brick' name.
8 years ago
Walter A. Boring IV 81b1dbebdf Created the Brick library from Cinder
This is the external Brick library that came from
Cinder's codebase.  It's intended to be used as a
standalone library and subproject of Cinder.
8 years ago