pulp / pulp/pulp_container

Add a new serializer related field pointing to the PRN

Open
#1,793 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
31
Forks
56
Avg merge
2d 22h
Merged PRs (30d)
22

Description

Is your feature request related to a problem? Please describe.
Now that the support to PRN has been released, we could add some serialized related fields to "point" to the corresponding PRN value too.

Describe the solution you'd like
For example, when I retrieve the list of blobs, artifact will output the pulp_href from the artifact:

$ pulp container content -tblob list
[{
    "pulp_href": "/pulp/api/v3/content/container/blobs/01927297-4d46-70da-afda-b31f1096674e/",
    "prn": "prn:container.blob:01927297-4d46-70da-afda-b31f1096674e",
    "pulp_created": "2024-10-09T18:42:51.335387Z",
    "pulp_last_updated": "2024-10-09T18:42:51.335416Z",
    "artifact": "/pulp/api/v3/artifacts/01927297-4cfc-705d-b421-2a4475250f19/",    <-------------    
    "digest": "sha256:8a42acc72d918655d404d0b043616b95198b234fdd608fb177cb96cd18713721"
},

an idea of output (artifact_prn):

[{
    "pulp_href": "/pulp/api/v3/content/container/blobs/01927297-4d46-70da-afda-b31f1096674e/",
    "prn": "prn:container.blob:01927297-4d46-70da-afda-b31f1096674e",
    "pulp_created": "2024-10-09T18:42:51.335387Z",
    "pulp_last_updated": "2024-10-09T18:42:51.335416Z",
    "artifact": "/pulp/api/v3/artifacts/01927297-4cfc-705d-b421-2a4475250f19/",
    "artifact_prn": "prn:core.artifact:01927297-4cfc-705d-b421-2a4475250f19",   <----------- new serialized field
    "digest": "sha256:8a42acc72d918655d404d0b043616b95198b234fdd608fb177cb96cd18713721"
},

another example is for tagged_manifest in the tag list:

$ pulp container content -ttag list
[
  {
    "pulp_href": "/pulp/api/v3/content/container/tags/01927297-4ded-7c39-a2a7-7b1b00dc6466/",
    "prn": "prn:container.tag:01927297-4ded-7c39-a2a7-7b1b00dc6466",
    "pulp_created": "2024-10-09T18:42:51.502500Z",
    "pulp_last_updated": "2024-10-09T18:42:51.502534Z",
    "name": "sha256-b5632cfdad13519406ab9bf454996cc4ed698b0938217bec4dca1a10c6cf5102.sig",
    "tagged_manifest": "/pulp/api/v3/content/container/manifests/01927297-4dd4-7c99-9224-671bca9ae8e6/"    <-----------
  },

with the "new" tagged_manifest_prn field:

$ pulp container content -ttag list
[
  {
    "pulp_href": "/pulp/api/v3/content/container/tags/01927297-4ded-7c39-a2a7-7b1b00dc6466/",
    "prn": "prn:container.tag:01927297-4ded-7c39-a2a7-7b1b00dc6466",
    "pulp_created": "2024-10-09T18:42:51.502500Z",
    "pulp_last_updated": "2024-10-09T18:42:51.502534Z",
    "name": "sha256-b5632cfdad13519406ab9bf454996cc4ed698b0938217bec4dca1a10c6cf5102.sig",
    "tagged_manifest": "/pulp/api/v3/content/container/manifests/01927297-4dd4-7c99-9224-671bca9ae8e6/",
    "tagged_manifest_prn": "prn:container.manifest:01927297-4dd4-7c99-9224-671bca9ae8e6" <----------- new serialized field
  },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the serializers and API entry points for blob and tag list responses, then compare how their related fields are currently exposed. Add the requested artifact_prn and tagged_manifest_prn fields, and verify the list outputs include the corresponding PRN values without changing the existing fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.