Commit Graph

64 Commits

Author SHA1 Message Date
Radosław Piliszek d02152fd97 Add WebTest as a test dependency
Pecan has made WebTest an optional dependency for testing only [1].
Since it is used for blazar unit testing, we need to add it to the
test-requirements.

The lower version bound is required by requirements-check.
It is (arbitrarily) taken from the Queens' upper-constraints.

[1] https://github.com/pecan/pecan/pull/140

Change-Id: I67b730a21676a8191756effec7e15ab1895e1c95
2022-08-03 10:40:51 +00: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
Hervé Beraud 963097ee7f Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removed specific doc requirements from test-requirements.txt.

The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to pull requirements [4].

This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.

This project meet the conditions leading to the bug.

[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36

Change-Id: I0c39bb5581c120190a764b25890ba868180a59fe
2021-01-05 16:20:37 +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
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
Ghanshyam Mann ec41f2f8f2 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I585cc69cf4094f6ed37a6f2dc58fb9ad33417279
2020-05-12 17:46:13 -05:00
Sean McGinnis cfc6311218 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: I298819dbe890be4375c4ac47d8e6293e4b2fb9f1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-21 11:39:03 +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
pengyuesheng 7c10c07054 Blacklist sphinx 2.1.0 (autodoc bug)
See https://github.com/sphinx-doc/sphinx/issues/6440 for upstream details

Change-Id: I6cf3c51168ea0571501a01ca44ea2134ec281f68
2019-07-30 17:00:51 +08:00
Pierre Riteau 5d5beba1b4 Update sphinx requirements
Following recent changes to global requirements [1], we need
to update sphinx requirements locally. This should fix the
requirements-check job.

[1] If558f184c959e4b63b56dec3ca1571d1034cfe5c

Change-Id: I641a28790bf5df0cec09b5600e2fd83a513dd896
2019-06-07 14:45:45 +01: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
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
Hiroaki Kobayashi 84785b7dde Change pylint requirement
pylint 2.0.0 and newer releases do not support Python 2, which breaks
Python 2 tests. This patch changes the requirement for pylint to use
version 1.9.1. The requirement is moved out of test-requirements.txt,
since pylint is not tracked in global requirements.

Change-Id: I2464ff2fc56b7fe7a92c40ec1555880f4e220479
2018-07-17 09:45:20 +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
OpenStack Proposal Bot 5fb5d6ec9a Updated from global requirements
Change-Id: I5effeea5ebd6fe0ea0166196a51b5029ce52950b
2018-03-15 06:46:42 +00:00
Hiroaki Kobayashi 5b32c729e7 Add an API reference
This patch adds an API reference which follows the API documentation
guide[1].

[1] https://docs.openstack.org/doc-contrib-guide/api-guides.html

Partial-Bug: #1721489
Partial-Bug: #1703268
Change-Id: Iddcc2e2d40874895cedaca68b8ce9cafa6228deb
2018-02-02 02:17:18 +00:00
OpenStack Proposal Bot 3c4f0644bd Updated from global requirements
Change-Id: I8696e88e027c0a420afd9ae711dffb983f2d73d6
2018-01-24 00:49:31 +00:00
OpenStack Proposal Bot e3dd52ae9e Updated from global requirements
Change-Id: I03e6bf8b7bc90fa557213dd9d3280ae7016b5c17
2018-01-17 20:28:24 +00:00
OpenStack Proposal Bot fa2ea77fa6 Updated from global requirements
Change-Id: Ia8d0e56af168357c0f880c7348ea182688131c09
2018-01-16 12:24:22 +00:00
Sean McGinnis 43904f88b1 Remove mox from requirements
Mox was listed in test-requirements, but it is not actually
being used anywhere. Since we want to remove this package
from OpenStack, removing from requirements so it does not
look like it is being used.

Change-Id: Ibe1b5a406ccbd33e058f5744b15a114685aba5da
2018-01-09 16:54:22 -06:00
OpenStack Proposal Bot 76e1f979f6 Updated from global requirements
Change-Id: I593bf2aaefdd5115a9929d57ab0b48918d038e39
2017-11-16 10:59:26 +00:00
OpenStack Proposal Bot ad2b377db4 Updated from global requirements
Change-Id: I71af8e3764b26bf3b370dfce3295ff7106f92c76
2017-11-06 01:40:52 +00:00
OpenStack Proposal Bot cdd4e5d04e Updated from global requirements
Change-Id: I7ae51b1642f7864b3e1caa46d8fb305f846633b1
2017-10-23 10:55:11 +00:00
iswarya_vakati db7bfe5ff8 Use the openstackdocstheme Sphinx theme
As part of the docs migration work [1] we need to use the
openstackdocstheme Sphinx theme.

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

Change-Id: I022a5811453ba2d11772b110117d127e04d77811
Partial-Bug: #1721489
2017-10-20 10:02:20 +01:00
OpenStack Proposal Bot 953ee8a31e Updated from global requirements
Change-Id: Iafa80937a8525b214e53b09708c7694a36240281
2017-10-15 16:57:29 +00:00
OpenStack Proposal Bot b7df245c03 Updated from global requirements
Change-Id: I71917cc44b8fd9b2d6dbdb8142299d6a51fc3c8d
2017-09-16 23:10:13 +00:00
OpenStack Proposal Bot 77ae52a548 Updated from global requirements
Change-Id: I706159d14bc731ce6beac5bcf0b6e0632a368009
2017-08-27 19:57:53 +00:00
Hiroaki Kobayashi 91f916b53e Move sphinx requirements
This patch moves sphinx requirements from the requirements.txt to the
test-requirements.txt.

Change-Id: I0fc5f7f7ecadc66ee4211bcb0098335901529718
2017-07-03 11:36:35 +00:00
OpenStack Proposal Bot 75775e771d Updated from global requirements
Change-Id: I3b9d626508e6af1faee354aa1922dc43d1425b85
2017-06-08 16:15:40 +00:00
OpenStack Proposal Bot 5db86abf42 Updated from global requirements
Change-Id: I0cc92503325f358d832e2db0bc17948114a3df05
2017-06-07 04:11:16 +00:00
OpenStack Proposal Bot 8065dacf75 Updated from global requirements
Change-Id: Id6a755d856625c8742cf444c415b4b9006e571d8
2017-05-26 17:17:31 +00:00
OpenStack Proposal Bot 402a5cf2cb Updated from global requirements
Change-Id: I66ce0833cebc6e3b14e56806cde0cad9d5ac5b5a
2017-05-17 03:46:13 +00:00
Pierre Riteau cf9dba5c6d Remove discover and lockfile from test-requirements
Discover is only needed for python < 2.7 which is no longer supported.
The code using lockfile was removed when we switched to oslo.db.

Change-Id: Ib9a59fa280877a4bbe9d5106da49e0d02cab916f
2017-03-21 06:35:39 -05:00
Pierre Riteau 0c911cd7e0 Updated from global requirements
The kombu update is required to fix conflicts with other projects
installing version 4.0.1.

Change-Id: I38462381f24721197ddbb3a6455439aa23747d5e
2017-03-21 06:35:39 -05:00
Hiroaki Kobayashi 707452ea73 Update overview documents
This patch updates overview documents. It also adds settings required
for publishing documents under doc directory on the readthedocs.io.

Change-Id: I89fd24cc538d09cdcfbe9a1cfb9986a4bf724266
Closes-Bug: #1662739
2017-03-02 12:06:30 +09:00
Hiroaki Kobayashi e32d0d247d Use oslo.context
This patch replaces old oslo-incubator code with the oslo.context
module.

Change-Id: I4409ffdff5f93d4171f516b39bbeeb518c037b94
Closes-Bug: #1661520
2017-02-10 13:24:06 +00:00
Masahito Muroi d4d3780e53 Add reno for release notes management
OpenStack projects use reno [1] to publish their release notes.

This patch adds a releasenotes directory with the initial layout for
building Blazar release notes. The build process is done with:

    tox -e releasenotes

[1] http://docs.openstack.org/project-team-guide/release-management.html#managing-release-notes

Change-Id: I22c6a842d16dde14c3d72010fe54e439961b3e66
Partial-Bug: #1658859
2017-02-09 11:01:40 +09:00
Hiroaki Kobayashi 54ac5cfb9f Use oslotest
This patch converts the Blazar code base from its oslo-incubator test
module to the oslotest module.

Change-Id: I22d56b1b80acfbe103253c2e505d892b30a064a0
Closes-Bug: #1660901
2017-02-07 20:32:21 +09:00
Tony Breeds bd0b247a37 Soft update from global-requirements
Currently the last item that blazar uses that isn't in g-r is lockfile
which means migrating to oslo.db.

Change-Id: If416bae3c0ee76cc5567ff460db150a7fb8c2262
2016-12-12 15:19:48 +11:00
Tony Breeds 9c080a4b1a Update to newer hacking
We need to use the newer hacking library to avoid conflicts when we
enable constraints.  This in turn needs a newer pbr.

Do this as a separate change to make backporting easier.

Change-Id: I17df901a6e154dda23bf8eb883ed5ef74bf8e556
2016-12-09 08:07:58 +11:00
Sylvain Bauza 53059527c1 Update requirements, fix oslo imports and correct tests
Since Blazar was in Winter, lots of tech debt was added.

This big change is actually trying to provide a +1 from Jenkins voting jobs.
ie.

 - fix calls to oslo_config
 - correct unittests failing due to removed assert_called()
 - remove pep8 check for verifying blazar.conf (can be readded later)
 - fix oslo_messaging imports

Not sure it's fully functional, Tempest needs to be fixed too but I
hope the gate will allow that change to pass.

Change-Id: Ib70b5b48b47626fc2613ee894d1162219417994f
2015-09-04 13:17:25 +02:00
Andreas Jaeger e84096852f Update requirements, fix testsuite
Manually update from global requirements.
Remove obsolete docutils pin.
Regenerate climate config file.
Fix testsuite for testtools change.
Workaround PYTHONHASHSEED setting in tox, disable for now so that tests
always pass.

Change-Id: I8c4a458371b28c91c5b848094e56038a16d6afc3
2014-08-26 08:09:54 +02:00
Pablo Andres Fuente 2c641a13bc Adding version discovery
Added a new WSGI application to handle version discovery between Flask
and Pecan REST API implementations.
Added version discovery to V2 API.
Modified the version discovery of V1 API to be consistent with the one
implemented for the V2 API.
Adding testscenarios to test-requirements.txt

Change-Id: Ib69d6a1362cb10fb53bed92568db1a81a5924e51
Implements: bp/api-version-discovery
2014-07-03 16:10:20 -03:00
OpenStack Proposal Bot 26a0954cc3 Updated from global requirements
Change-Id: I0183e9260901155bd03e4905f286a5c041cb0ae8
2014-06-18 19:41:09 +00:00
OpenStack Proposal Bot 87eef8c365 Updated from global requirements
Change-Id: Ic9faf2b052ac72a1208352bfbc5895b8b7fc6661
2014-05-28 21:01:17 +00:00
OpenStack Proposal Bot e72596c46c Updated from global requirements
Change-Id: I849d5e6ada9172e5982b8140a7ee47c1ce7af3cb
2014-05-23 15:53:11 +00:00
OpenStack Proposal Bot 430536643e Updated from global requirements
Change-Id: I447396a42436e9ce24db7363c48904e744da4143
2014-05-01 13:51:59 +00:00
Sylvain Bauza eb0c81f95a Port to Pecan/WSME for API v2
Routing either V1 or V2 using a Facade. By default, V1 is enabled
but can be deactivated by a confflag.

Pecan controller for Lease created using WSME i/o validation

Implements blueprint: pecan-wsme

Change-Id: I9047abece78632daa13fdebfea9fb8aaa3c60981
2014-03-31 13:45:48 +02:00