New tox version 4 has changed interpretation of tox.ini
The passenv parsing requires the list to be comma-separated.
Since the names are case-insensitive, duplicates are removed.
skipsdist is now a synonym of no_package and avoids the
installation of the package in all cases.
However, some environments require it (for setup metadata).
Fix allowlist_externals where appropriate.
Change-Id: Icb067e85e4f4874a52710d7053a2048e337305c8
When tox 'docs' target is called, first it installs the dependencies
(listed in 'deps') in 'installdeps' phase, then it installs masakari
(with its requirements) in 'develop-inst' phase. In the latter case
'deps' is not used so that the constraints defined in 'deps' are not
used. This could lead to failures on stable branches when new packages
are released that break the build. To avoid this, the simplest solution
is to pre-install requirements, i.e. add requirements.txt to 'docs' tox
target.
Change-Id: Ic5e214be240023f0e4f02cae3939e1d199ecb061
For PDFLaTeX, remove the irrelevant parts (contributing,
search) and those that break (full config examples).
Additionally, this replaces fancy quotes as they don't work
in PDFLaTeX either (it handles regular quotes internally).
Change-Id: I60459407e49a88c2231217152fc078346e5f4b4f
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Tox is trying to install latest versions for building docs which may
not be supported by stable and lower branches, so should be
restricted by respective version's upper-constraints.txt
Change-Id: Iffb019a8a0b1b74bb54c92fc5079f0af6d7f4bc6
api-ref requires only doc requirements, not test.
Furthermore, some deps may not be installable due to lack of
binary deps in api-ref jobs, e.g. postgres [1].
[1] https://review.opendev.org/744343
Change-Id: Ie730a85ec2d05c3cdbab49da619f27982c14b9ce
Needed-By: https://review.opendev.org/744343
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: If2c78e4506670d341ad4ae7209957dc7d1832b38
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Update local hacking checks to work with current flake8.
Remove hacking and friends from lower-constraints, they are not needed
there.
Change-Id: I89695a03791c2de36ab015b3831c85887b27f3b8
ignore_basepython_conflict = True is to avoid the
python version conflict for basepython defined in base
env.
Bumping the tox minversion to 3.1.1 which has this flag available.
Change-Id: Ie16eede633e6c5706c9d68d525503b6ab77ea10c
Due to the upper-constraints argument being hard coded in the
install_command, even jobs like lower-constraints will end up getting
the latest upper-constraints installed.
The correct way to handle the constraints is to separate it out into
deps. This allows the l-c job to properly set what constraints to use.
Also fixes constraints URL to the preferred static path.
Change-Id: I92b6ee8ea5afdb16367a5b6d939e65e2fa48190d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Updated operator guide documentation for
1. segregated sections appropriately
2. referred masakariclient for CLI section
3. added detailed 'Install and configure for Ubuntu' section
4. added detailed 'Verify operation' section
5. used sphinx-build instead of the pbr sphinx extention for building docs
as instructed by the PTI[1]
6. cleaned up build_sphinx related entries in setup.cfg
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation
Change-Id: Iec93bebdbc7ffe1ccd27bb11f474384ff06a559c
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:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Co-Authored-By: gujin <gu.jin@99cloud.net>
Change-Id: Ib98f78131050be2c38a0128d2e2a792639c03c1c
Story: #2005924
Task: #34221
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: Ib3bf99b1fcb81d70aae3125734b3fe21e6b1aa5b
The oslosphinx package is not compatible with the current Sphinx 2.0
release. Migration has been happening to openstackdocstheme for some
time. To fix build failures for docs and releasenotes jobs, this
switches masakari jobs to use openstackdocstheme.
Uncapping jsonschema to pass requirements check so it matches global
requirements.
Change-Id: Ic74e8b075aa67d410617dac3346bf1c903995da7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Added multi-node CI job to run functional tests.
This patch adds functional tests to check the behaviour
of Segment APIs.
Co-Authored-By: jayashri bidwe <jayashri.bidwe@nttdata.com>
Change-Id: I787b26b29fcd9556bc6b24b75ffe8e70e9f44610
Due to switch from testrepository to stestr, all references of
testrepoistory should be removed.
This patch cleanup all testrepository occurrences.
Change-Id: I02751fb6e94c3c18852812d2847e7713e8d3dd14
After switch to using stestr, testrepository is unnecessary
and it is removed in patch[1]. After patch[1] got merged
tox -e cover returns "error: option --coverage not recognized".
In this patch fixed coverage environment to default stestr setup.
Also used openstack-tox-cover template, this runs the cover job
in the check queue only.
[1]: https://review.openstack.org/#/c/581686/
Closes-Bug: #1809230
Change-Id: I77a295a64e2c4d128a6772e400c0968f40d11c1d
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: Idb812bcd1f7068377e89da2873c61b856a6faf04
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This change adds hooks for pulling in plugins for
Interoperable recovery method customization taksflow
by configuring the actions in terms of execution order,
extra parameters to execute commands in action.
Implements: blueprint recovery-method-customization
Change-Id: I8150935ce0a4e592bd0f87bb3c7b3e599cefa033
Adds below things for the implementation of framework for registering and
using default policy rules.
* Policy-in-code
The framework for registering and using default policy rules.
Rules should be defined and returned from a module in
masakari/policies/, and then added to the list in masakari/policies/__init__.py.
A new context.can() method has been added for policy enforcement of
registered rules. It has the same parameters as the enforce() method
currently being used.
* Add policy sample generation
The entry point and config file necessary for using the
oslo.policy sample generation script. It also adds a tox target to
simplify the usage of it.
* Add policy documentation and sample file
Documentation and sample file for default policy in code feature.
* Hacking check for policy registration
It ensures that policy registration happens in the centralized
masakari/policies/ directory.
* Hacking check for _ENFORCER.enforce()
Hacking check in order to ensure that only registered policies
are used for authorization checks _ENFORCER.authorize should be used rather
than _ENFORCER.enforce.
* Add entry_point for oslo policy scripts
There are two helper scripts in oslo.policy to help deployers understand
their policy configuration better. With the setup.cfg entry these can be
called directly from oslo.policy.
Changes done here are with the reference of [1] at NOVA side
which is contributed by Andrew Laski and Claudiu Belu
[1] https://review.openstack.org/#/q/topic:bp/policy-in-code+project:openstack/nova+status:merged
Change-Id: If885a66d92c31be440d27d6780635800a0b12e3e
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: Ibf03dd1e17a50ce1b263998342a6ebcb814562d3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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: Ifb64df81f7684d5bf732afcbe594a38691a7286f
Signed-off-by: Chuck Short <chucks@redhat.com>
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.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: Iff00524bc3eb0fe1070aee7584885465cacd2393
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Added documentation for how to get involved, development qucikstart
and masakari system architecture.
Change-Id: Ie2cbdde7698a79a1b996e485d141eb15dbded4cd
Added api specifications for versions, segments, hosts and
notifications as per OpenStack standards.
Change-Id: Iefc83254e22fc31d1f0d13f52e71d42c63e82b7d
In newer hacking version 0.12.0 [1], we can enable some of the
non-default hacking rules (one by one), which are disabled by
default. The enabled rules are the following:
* [H106] Don’t put vim configuration in source files (off by default).
* [H203] Use assertIs(Not)None to check for None (off by default).
* [H904] Delay string interpolations at logging calls (off by default).
Enabled these hacking rules by adding them in the list of
'enable-extensions' in tox.ini [flake8] section. Removed the local
implementation of those hacking rules from hacking/checks.py.
The test-requirements.txt is already updated to use the newer
hacking version 0.12.0 with this commit:
cc44a33f3d
[1] See "Enabling off-by-default checks" section:
https://pypi.python.org/pypi/hacking/0.12.0
Change-Id: Ieccd5a84ebd80ba3313016c9caeb036eaa37769b
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.
Change-Id: Ieecf7342152cc813ec3585a3b1873ac0dc13d804
Masakari should use ostestr instead of testr. ostestr is more
powerful and provide much prettier output than testr. Other
projects like cinder, nova, glance, neutron etc already uses
the ostestr wrapper.
Using ostestr shows each tests execution separately because of
which it has shown errors related to "KeyError" in existing test
cases. The error looks like below:
"Exception in string format operation: KeyError: u'id'"
This happens if we don't pass keyword argument like "id" to
exception which we expect to be raised from test through
side_effect [1]. This doesn't lead to test failure but it
appears in test logs. This patch fixes such issues by passing
expected keyword arguments to exceptions.
[1] https://github.com/openstack/masakari/blob/master/masakari/tests/unit/api/openstack/ha/test_hosts.py#L364
Change-Id: I91603ea3dcf35fd20a00dcf477b93d612edca362
Hacking checks are not working due to the presence of
"deps = hacking" under pep8 section. This installs the
latest version of hacking library which is 0.13.0 and
it has some issues due to which custom hacking checks
are not working.
After removing it from pep8 section, the hacking
version to be used is referred from test-requirements.txt
and it installs hacking library version 0.10.2 which does
not have this issue.
Change-Id: I6ef802838c05f93b15a3a5a0359b6ea3579fa476
We do not test pypy-constraints in our gate job, and do not have
any plan to use it.
This patch removes pypy from env list, to remove unused and unmanaged
setting.
Closes-bug: #1596856
Change-Id: I9c69933d8adbff8adc74fe44b88dcd724563a6d4
Remove old and unused constraints environments from tox.ini. Those
have never been used. Use standard environments as default list.
Note that the repo has in the past not used constraints in OpenStack
CI, this change keeps the status quo.
For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html
Change-Id: I7866184672ae44bdf335ef39c657d8b7bdad8f83