Actions
Issue #3232
closedAs a user, I should be told what I have just uploaded
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.15.1
Target Release - Docker:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
It is helpful to know the unit_key data for the manifest that was uploaded
in order to facilitate further processing.
Typically, in an automated workflow, a docker image upload is immediately
followed by an image tag, and the digest is needed in that case.
The importer's upload_unit does not return any information about what got uploaded:
return {'success_flag': True, 'summary': '', 'details': {}}
The Debian and Windows plugins do this:
unit = unit.save_and_associate(file_path, repo)
return dict(success_flag=True, summary="",
details=dict(
unit=dict(unit_key=unit.unit_key,
metadata=unit.all_properties)))
which seems more useful.
A somewhat similar pattern exists in the core's unit_association.py, where information about units that were successfully associated is present under the task's ["details"]["units_successful"]
Actions
upload_unit returns the unit key for what got uploaded
It is helpful to know the unit_key data for the manifest that was uploaded in order to facilitate further processing.
Typically, in an automated workflow, a docker image upload is immediately followed by an image tag, and the digest is needed in that case.
The return data is similar to what the association code returns.
closes #3232 https://pulp.plan.io/issues/3232