Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new serializer related field pointing to the PRN #1793

Open
git-hyagi opened this issue Oct 9, 2024 · 0 comments
Open

Add a new serializer related field pointing to the PRN #1793

git-hyagi opened this issue Oct 9, 2024 · 0 comments

Comments

@git-hyagi
Copy link
Contributor

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
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Not Started
Development

No branches or pull requests

1 participant