Add a proxy endpoint for `CancelOperation()` requests to bgd browser-backend
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests [ ] Metrics-
Documentation update(s) (docstrings)
If not required, please explain in brief why not.
Description
This adds an endpoint in browser/app.py to cancel operations.
Changes proposed in this merge request:
- Add
DELETEroute:"/api/v1/operations/{name}"(analogous to theGetOperations()route) - Add handler that forwards the
CancelOperation()request for the given operation name - Add unit tests
Validation
Issuing
curl -X "DELETE" http://localhost:8083/api/v1/operations/$OPERATION_NAME
returns silently for a known operation and cancels it; prints "404: Not Found" for an invalid/non-existing $OPERATION_NAME.
Issues addressed
Addresses #362 (closed), unblocks bgd-browser#5 (closed).
Edited by Santiago Gil