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
As per the community goal of migrating the policy file
the 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 doc and releasenotes.
Also replace policy.json to policy.yaml ref from doc and tests.
[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: Ib2101f13171940857fe81f64dd9798dfe489743a
After fully implementing policies in code, the authorize method
can be safely used and its a safeguard against introducing
policies for some API which are not properly defined in the code.
Change-Id: I499f13c34027b217bf1de905f829f36ef919e3b8
- update_keypair now only in v2 schema
- tenant_id->project_id in cluster provision steps
- tenant_id->project_id in referenced job binaries in job templates
- proper check for job template existence, to fail early (as intended)
- hadoop_version->plugin_version for query string filter
- unbreak some data source stuff (related to tenant_id->project_id)
- fix omission of show_progress from cluster GET query string whitelist
- job_id->job_template_id for v2 jobs
- add missing release note info for strict query string checking
- release notes for all the rest
Change-Id: Idea117c406b5ab9b8d85ccf8adb175053416d6ff
Story: 2004505
Task: 28822
In order to improve return information to clients we are adding a check
to verify parameters before each call and return a more appropriate
message to the users.
Change-Id: I9923601d0903e415a3fe30bec9bdc8fc34b91ff6
Story: #2004506
Task: #28228
As part of the APIv2 work we need to change all tenant_id references
to project_id on the return payload.
Story: #2004505
Taks: #28227
Change-Id: I94bca161aa4f7bdd56d5528bae92fa81af188a43
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
* Drop use of stack abandon: just use a regular delete instead
* Return stack name from force delete API call
Change-Id: I33ee7323fade1b237957abb8f7c79b87eb20148f
Creation of a single cluster and creation of multiple clusters will now
share an API endpoint (in the APIv2 case). More specifically, the
original single-cluster endpoint will accept a `count` parameter in the
request and the multiple-cluster endpoint has been removed.
We can make this kind of change because APIv2 is still experimental.
Also, when creating multiple clusters, the response will now contain
all details about the clusters; previously, the response simply gave
cluster IDs.
Change-Id: I90faf4956a8ea4b4ae31a29382732771fdfddecb
Story: 2002099
Task: 19777
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
* Check if plugin_version key is in dict before doing something to it
* Fix references to non-existent policies
* Generally, correct how some responses get tweaked (in many cases the
old way was throwing an error)
* Fix an incorrect schema
Change-Id: I6b4802a614e4b58678343f12856dd531827dc7b2
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
* Add force delete operation to engine using stack abandon
* Basic unit tests for force delete
* Necessary removal of "direct engine" code
* Change schema of APIv2 cluster delete to allow force delete
* Unit tests for new cluster delete schema
* Basic docs about force delete
* Release note
bp sahara-force-delete
Partial-Bug: #1647411
Change-Id: Ida72677c0a4110cb78edf9d62d8330cd4608ff76
Adding the option to decommission specific node from cluster.
Partially implements bp: decommission-specific-instance
Change-Id: I1a858fecc1b32f91c76aea6db14e0d5a419211d1
The feature should be supported in both API versions.
bp v2-api-experimental-impl
bp portable-node-group-and-cluster-templates
Change-Id: I102fb2ad16d0256e3a9aa364586332a13826cc90
Co-Authored-By: Iwona Kotlarska <pinus314@gmail.com>
We don't need to be special/annoying. Other services whose APIs don't
need project ID in the URL do just fine trusting keystonemiddleware to
provide that info.
bp v2-api-experimental-impl
Change-Id: I8397ed7c134f0742de8c38466ed3f9035d8103d4
By not including support for job binary internal in APIv2 at all, there
will be a clearer path towards the eventual removal of the JBI feature.
Since JBI will be an APIv1 exclusive, that means we can safely remove
support JBI upon APIv1's removal without affecting APIv2 users.
Change-Id: Iee70e9f6b4471b50105974c7c77169303c4159de
Partial-Implements: bp v2-api-experimental-impl
Partial-Implements: bp remove-job-binary-internal
Partially-Implements: bp portable-node-group-and-cluster-templates
This change adds functions to sahara to enable export of ct to JSON.
Change-Id: Ib5a2df4013840050b8034bcefd68040f508d0b31
Partially-Implements: bp portable-node-group-and-cluster-templates
This change adds function to REST api to enable user to export node
group template to JSON, so that it can be later imported on another
deployment.
Change-Id: I7a2ef7e5cff70e6034c1222252fbf7c5c35a7e1c
Remove endpoint "/jobs/{job_id}/cancel" for cancelling a job.
we can request a cancelled state on a PATCH to the new /jobs/{job_id}
endpoint to make code more consistency.
The request body should be: {"info": {"status": "cancel"}}
Change-Id: I4a427d99e533979be42a84d388324ec2f933acc2
Partial-Implements: bp v2-api-experimental-impl
The endpoint /jobs/{job_id}/refresh-status has been removed in favor
of using a GET on the new /jobs/{job_id} endpoint with parameter.
To refresh job status, we can GET on:
http://{host:ip}/v2/jobs/{job_id}?refresh_status=True
Change-Id: I8674a9f26512702f1732c0fefb230a1c0ab90e1e
Partial-Implements: bp v2-api-experimental-impl
oozie_job_id should be changed to engine_job_id.
This patch only changes json responses, the complete
change should be done when APIv2 is stable
and APIv1 deprecated. Along with this should be a
data model change as well.
Change-Id: I2ecfbb56d1e53d6b005ae6a52c70576238341da2
Partial-Implements: bp v2-api-experimental-impl
Log messages are no longer being translated. This removes all use of
the _LE, _LI, _LW and _LC translation markers to simplify logging and to
avoid confusion with new contributions.
See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.htmlhttp://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html
It will be a giant patch if all these _LE, _LI, _LW and _LC being deleted
within one patch, so this patch only delete _LW, _LC and _LE has been
handled in previous patch; deletion of _LI will be in the following patches
related with this one.
Change-Id: Ia696ee76f22e488b9a219305f4f220eca2161cee