Since Flask 2.1, the same blueprint cannot be registered multiple
times with different url_prefix values, unless the 'name' parameter
is set. Otherwise the following error is reported: "The same blueprint
cannot be registered with the same name. Use name= when registering
to specify a unique name."
At the same time, disable the openstack-ansible job,
which started to fail again, but at this point the priority
is to unblock the gates.
Change-Id: I50df2fec3fd312082a14ef2a5b6774a2515afb44
This was originally a function, and then I changed it to a dict because
Flask complained. Now Flask complains that is a dict, so change it back
to being a function.
Change-Id: Iec30b4cf5023be711ac070def00b77e91978d992
error_handler_spec[None] doesn't exist by default in flask
versions >= 1.0. It doesn't appear to be the right way to
register an error handler anyway, assuming that's what it is
doing. Use register_error_handler instead.
Change-Id: I6a56e1edf277c5652a876658f8cfbb5550a73ada
Story: 2002617
Task: 22246
Or at least, tweak Sahara to be more accomodating to keystoneauth's way
of doing version discovery.
* Don't require auth to do version discovery
* Make project ID in URL optional for APIv1 (and also for APIv2, but
don't go around advertising that... *wink*)
Change-Id: Idb6f734aee26cab5bd629963a66ba01c92760864
Closes-Bug: #1744350
The error_handler_spec is supposed to be a dict of dict of dicts, but
we had it as a dict of dict of functions, for unknown (historical?)
reasons.
Fix that, so that errors which occur in the Sahara API, but are not
otherwise caught by `sahara.utils.api.Rest.route` get handled correctly
by Flask instead of leading to some arcane error far down the stack.
Change-Id: I1e9d5f3fa00308baa7eee101c1f3b5a666cae4aa
Closes-Bug: #1745236
this change implements the initial v2 experimental api. it is
implemented as an optional series of class that can be configured
through the paste deploy configuration file.
* add wsgi auth validator
* add middleware router
* add v2 endpoints
* add v2 flask blueprint object
* add optional paste filter and composite
* add developer docs for v2 api
Change-Id: I74627c0879851b354b5043f8a6ff91bae8438bb1
Partial-Implements: bp v2-api-experimental-impl
Changes:
* use api-paste.ini config for loading middleware
* refactoring middlewares to support loading via pastedeploy
* use debug middleware from oslo_middleware library instead log_exchange
middleware
Closes-bug: #1503983
Closes-bug: #1361360
Change-Id: I444c1799ef53dbb19a601e51dd95cd8509fb1c0c