This teaches glance-api how to do async threading things when it is
running in pure-WSGI mode. In order to do that, a refactoring of things
that currently depend on eventlet is required.
It adds a [wsgi]/task_pool_threads configuration knob, which is used
in the case of pure-WSGI and native threads to constrain the number
of threads in that pool (and thus the task parallelism). This will
allow tuning by the operator, but also lets us default that to just
a single thread in the backport of these fixes so that we can avoid
introducing a new larger footprint in the backport unexpectedly.
Partial-Bug: #1888713
Depends-On: https://review.opendev.org/#/c/742047/
Change-Id: Ie15028b75fb8518ec2b0c0c0386d21782166f759
Replace raise of StopIteration with return.
PEP 0479, https://www.python.org/dev/peps/pep-0479/, makes the
following change: "when StopIteration is raised inside a generator,
it is replaced it with RuntimeError".
And states: "If raise StopIteration occurs directly in a generator,
simply replace it with return."
Change-Id: Ia7d6af7165077aa93c76185c28c355c06a202088
Closes-Bug: #1781627
This change removes option to configure Images API v1
This change removes Images API v1 endpoints from the router
This change removes all v1 tests
This change removes the v1 dependant glance-cache-manage command
This change does not remove all v1 codebase. Further cleanup and
decoupling will be needed.
Change-Id: Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
Args of assertEquals method in glance.tests are arranged
in wrong order. In result when test fails it shows incorrect
information about observed and actual data. It's found more
than 2000 times. Right order of arguments is "expected, actual".
Change-Id: Ifea4809f5a696b608a19e36a9ed9e5eec46c8a21
Co-Authored-By: Li Yingjun <liyingjun1988@gmail.com>
Closes-Bug: 1277104
This commit makes the glance code base E125 and E126 compliant :
* E125 continuation line does not distinguish itself from next logical line
* E126 continuation line over-indented for hanging indent
Change-Id: I7120149bedb665fb66320498fe98948602a6cd52
Closes-bug: #1263437
Clean up imports due to F401 and F403 checks.
F401 'module' imported but unused
F403 unable to detect undefined names with wildcard import
Change-Id: I487edb157de1a6babc7ad8a3fb65f195e476c490
This is a continuous fix to bug #1166957
VersionNegotiationFilter pops off the version string of PATH_INFO,
the popped segment is pushed onto SCRIPT_NAME, which results in
dual version strings (e.g. '/v1/v1/') in the 'Location' header
of a redirect response. This may result in a further 404 error
if the http client will automatically follow the returned
redirect.
Fix this problem by adding a private method which does not
push the popped segment onto SCRIPT_NAME.
Change-Id: Ie0c244af38534dde2058828fbff840a845cc7c90
Fixes: bug #1175815
Added an APIMapper to catch routemaps when the url is ''
because routes.Mapper returns an error if this is the case
but we want a redirect
Refer to the Nova code at:
https://review.openstack.org/#/c/886/
Change-Id: I74011d14a02a3bc8767fab559ada4c2d82dc5d6e
Fixes: bug #1166957
Patchset addresses reviewer's comments, rebase against master,
and follows new guidance from Foundation:
http://wiki.openstack.org/Documentation/Copyright
Change-Id: I94367461505778973528eb8835d991f4fb796dab
While doing this, remove some of the nose-isms, which don't play nicely.
Part of blueprint grizzly-testtools
Change-Id: I9ea398b25195ad5f9c5db876c3dbb49ef4a5ee99