Actions
Task #5198
closedMove CollectionVersion.metadata JSON field to be top-level fieldson the Model
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 57
Quarter:
Description
Problem¶
'metadata' contains data that isn't being exposed in the bindings directly. Here's an example of 'metadata' data:
"metadata": {
"namespace": "my_namespace",
"name": "my_collection",
"version": "1.2.0",
"description": "A collection that performs...",
"license": [
"MIT",
],
"authors": [
"John Smith <jsmith@example.com>",
],
"readme": "README.md",
"tags": [
"deployment",
],
"dependencies": {},
"documentation": null,
"license_file": null,
"issues": null,
"homepage": null,
"repository": null,
},
Solution¶
Make each it's own field. Use ArrayField, CharField, TextField. Also use some ForeignKey modeling for 'dependencies' and 'tags'. Tags needs to become its own Model and it will needs its own Viewset also. This allows for filter searching on the current known Tags through that viewset.
Actions
Moving 'metadata' to be fields
This adds many fields to CollectionVersion. Also it adds a migration to introduce the field changes. Also the fields are added to the serializer.
A new
Tag
model is introduced which uniquely tags many CollectionVersion objects.https://pulp.plan.io/issues/5198 closes #5198