Commit Graph

21 Commits

Author SHA1 Message Date
Ghanshyam Mann 7d47b5347b Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I24fd4700d59b30e4e5b3fed6c892a4f8ade7bb47
2022-04-30 15:32:04 -05:00
Vu Cong Tuan aa2a14a037 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: I9d22be39bec67fc17841367a0ef0ac439143af6c
2022-04-14 09:23:56 +02:00
Pierre Riteau d14668ba05 Drop unused sqlalchemy-migrate requirement
Change-Id: If625ad10d58f6116f6ebcecc08a46cf91036d98e
2021-02-22 21:50:17 +01:00
Ghanshyam Mann 3f1c1ed312 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file format from JSON
to YAML [1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file' config option
   from 'policy.json' to 'policy.yaml' with upgrade checks.

2. Deprecate the JSON formatted policy file on the project side via
   warning in documentation and release notes.

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I9ca5459a6968d93dee1bf24b3e0012a4cc7020b5
2021-01-28 16:37:30 +01:00
xuanyandong ae43ea3adf Remove six
Replace the following items with Python 3 style code.

- six.next
- six.text_type
- six.add_metaclass
- six.moves

Implements: blueprint six-removal

Change-Id: Id572aec8a6fda7676eb03d17c66fd33f9801f25d
2021-01-05 17:08:14 +01:00
Pierre Riteau 4f642c877f Fix lower-constraints job
* Move upper constraints from install_command to testenv deps, so it
  doesn't get inherited by the lower-constraints job. This was causing
  the wrong set of constraints to be used.
* Update MarkupSafe to 1.1.1 because of an incompatibility with recent
  setuptools: https://github.com/pallets/markupsafe/issues/116
* Update PyYAML to 5.1 to fix build on some platforms such as macOS
* Update oslo.db to 4.40.0 to fix issues with async keyword:
  https://opendev.org/openstack/oslo.db/commit/df6bf34
* Update oslo.utils to 3.37.0 for uuidsentinel:
  https://opendev.org/openstack/oslo.utils/commit/63d7649
* Update kombu to 4.2.0 to fix issues with async:
  https://github.com/celery/kombu/issues/841
* Remove kombu from requirements since we are not using it directly
* Update Flask to 1.0.2 due to various API changes
* Update oslo.service to 1.34.0 for add_timer_args:
  https://opendev.org/openstack/oslo.service/commit/750b51c
* Update oslo.context to 2.21.0 for system_scope:
  https://opendev.org/openstack/oslo.context/commit/1a40b3d
* Move oslo.context from test-requirements to requirements since we are
  also using it in non-test code
* Update keystoneauth1 to 3.13.0 for rate_semaphore:
  https://opendev.org/openstack/keystoneauth/commit/0993471
* Update alembic to 0.9.6: oslo-db 4.40.0 depends on alembic>=0.9.6

Change-Id: I4224c142d7481a79d4cc5e704436a6002b0d884f
2021-01-05 11:06:31 +01:00
wu.chunyang 368403ea80 Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
they are not needed during installation.

Change-Id: I185cdeefe513eb5247e18b775bba106931bb98e3
2020-10-22 00:28:14 +08:00
wu.shiming 38189e1670 Remove Babel requirement
Babel is no longer a requirement for OpenStack projects. We can remove
it and save some disk space.

Change-Id: I83a8632b004b6b94d5a99e00f9f4e193081eaba9
2020-10-02 10:29:47 +00:00
Hervé Beraud 611a2aa047 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I24adccf508750f3c07fe610a53362fd24c64d632
2020-06-08 22:23:24 +02:00
Andreas Jaeger b489995c8b Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 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.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

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.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: Ib2fc9304a6db9f01eb6d0eb82363906fd322612f
2020-05-21 16:12:27 +02:00
Andreas Jaeger a98989b2ef Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build; fix build warnings
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Raise oslo.utils version, 3.36.5 introduced uuidsentinel.

Change-Id: I8c81e0c1944c239e460befbf886993270902ee04
2020-04-13 18:18:44 +02:00
Andreas Jaeger 0b8d264171 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not needed
to be installed at run-time.

Move hacking tests to another subdir, import hacking failed since the
subdir was called hacking as well.

Change-Id: I684f0e4be28e529ae2c9d6f4bef5bd840adc8787
2020-04-06 22:27:38 +02:00
jacky06 056b2efb14 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] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I84e64e1ba60341408c400bef7c351ec0ebab2ef1
2020-01-21 10:43:32 +01:00
asmita singh 520005b13d Add microversion support
This patch adds microversion support so that it is possible to make
minor changes to the APIs as required to fix Launchpad bug #1740091.

Change-Id: I7ea48be72897a77fc8424a57f4ce2d4798daf4eb
Related-Bug: #1740091
2019-09-10 18:59:36 +02:00
Masahito Muroi dd3f3e30a9 Add BlazarNeutronClient base class
Partially Implements: blueprint floatingip-reservation
Change-Id: Ie1e41123331bdbcc7c5a8f96ad6ed512d85d4963
2019-03-15 18:26:07 +00:00
Tetsuro Nakamura 1855e059fc Call placement after instance delete
Blazar called placement to delete reservation inventory on reservation
resource provider *before* blazar asks nova to delete the instance.
This caused inventory in use 409 conflict error in placement.

This patch re-orders it to call placement after instance delete and
adds a function to ensure the deletion is completed not to cause the
error.

Change-Id: I3b4a892a783140b4a25810aeed71c79f6207e155
Depends-On: https://review.openstack.org/#/c/633408/
Closes-Bug: #1813252
2019-02-12 13:01:40 +00:00
openstack c023e36802 Fix incorrect response returned by the Update Lease API
When updating reservation values, the reservation ID is a required
parameter. However, if the value of "reservation.id" is set to an empty
string, null, or an incorrect UUID, Blazar currently returns a 200 OK
response instead of a 400 Bad Request.

This patch fixes it by raising an InvalidInput exception if an invalid
value is passed for reservation.id.

APIImpact: The response code is changed from 200 OK to 400 Bad Request
if an invalid reservation ID is passed to the Update Lease API.

Change-Id: I83e7c3cc0b6ca79aab2b8bb23ba82fceb96646e2
Closes-Bug: #1793743
2018-11-27 13:28:52 +00:00
whoami-rajat 604b71520b Add blazar-status upgrade check command framework
This adds basic framework for blazar-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: I6f40be87eb7e20fb396191e60af023923eb9019a
Story: 2003657
Task: 26121
2018-10-19 16:22:28 +05:30
Chuck Short c49aa9dedf Remove nose dependency
Remove the nose dependency since its not being used anywhere.

Change-Id: I35ec4ca6075230b4425c8419e2d022ef28f66421
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-09-12 16:45:16 +00:00
Hiro Kobayashi 0c65190306 Update pylint
A previous patch [1] changed tox environments to use python3 by default,
which makes the pylint test fail.

This patch updates the pylint package version and fixes pylint errors.

[1] https://review.openstack.org/#/c/572948/

Change-Id: I93c4a0c6060960552cc914963f410188eac7f3f4
2018-07-10 09:12:46 +00:00
Doug Hellmann 514d7d087c 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.

Uncap eventlet at the same time to make the requirements match the
global list.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I3d4c66be32a7e5f1bae11fcba9491f9e26b59bb6
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-20 16:19:10 -04:00