New api for editing metadata
Creates a new api for editing metadata. The idea is that all metadata should be edited using the same mechanism.
The go-to method for editing metadata is nomad.processing.MetadataEditRequestHandler.edit_metadata
. It is possible to edit a single upload (including upload level attributes), or a selection of entries defined by a query. The method can also be run with a verify_only
flag to test out the operation and get feedback on errors etc, without actually executing it. If verify_only
is False and validation succeeds, the request is executed by starting a process for each affected upload.
For the REST api, two endpoints are created: entries/edit
and uploads/{upload_id}/edit
.
Remains to do: extend tests, remove old code, make it so that metadata fetched from nomad.json files use the same logic.