Project

Profile

Help

Task #2299

Add serializer for the content models.

Added by jortel@redhat.com about 4 years ago. Updated 11 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 9
Quarter:

Description

Write a serializer for each model in content.py.


Related issues

Blocks Pulp - Task #2311: Add a RepositoryContent ViewSetCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Task #2304: Add a Content ViewSetCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Copied from Pulp - Task #2298: Add serializer for the repository models.CLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Copied to Pulp - Task #2300: Add serializer for the task models.CLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision e1c05ddd View on GitHub
Added by ttereshc almost 4 years ago

Finish content serializer and add one for artifact

closes #2299 https://pulp.plan.io/issues/2299

Revision e1c05ddd View on GitHub
Added by ttereshc almost 4 years ago

Finish content serializer and add one for artifact

closes #2299 https://pulp.plan.io/issues/2299

History

#1 Updated by jortel@redhat.com about 4 years ago

  • Copied from Task #2298: Add serializer for the repository models. added

#2 Updated by jortel@redhat.com about 4 years ago

  • Copied to Task #2300: Add serializer for the task models. added

#3 Updated by amacdona@redhat.com about 4 years ago

  • Related to Task #2311: Add a RepositoryContent ViewSet added

#4 Updated by amacdona@redhat.com about 4 years ago

  • Related to deleted (Task #2311: Add a RepositoryContent ViewSet)

#5 Updated by amacdona@redhat.com about 4 years ago

  • Blocks Task #2311: Add a RepositoryContent ViewSet added

#6 Updated by amacdona@redhat.com about 4 years ago

#7 Updated by amacdona@redhat.com about 4 years ago

#8 Updated by amacdona@redhat.com about 4 years ago

  • Groomed changed from No to Yes

#9 Updated by semyers about 4 years ago

This task cannot be started until the documentation written in #1873 is merged to 3.0-dev.

#10 Updated by mhrivnak about 4 years ago

  • Sprint/Milestone set to 27

#11 Updated by semyers about 4 years ago

This task should be considered complete when all serializers for a given models module are defined in a corresponding serializers module.

The serializers defined should expose fields "native" (defined directly on a model or in its superclasses) to the model being represented, including Generic Key/Value types (Config/Notes/Scratchpad). Relations to other models should be included where possible, but the available serializer base classes and fields may be insufficient, so only the "native" fields should be required.

This task is among several similar tasks to stub out serializers for our existing models. Please spread the work around so we gain more team-wide knowledge around these serializers. If you have any questions, ask me. Common issues and their resolutions will be added to the pulp 3.0 rest-api development guide.

#12 Updated by bmbouter about 4 years ago

I don't think we'll be porting code from the old serializers in Pulp 2, but if we do...

There is an error in the Pulp 2 content serializer where 'children' is 'hildren'. Here is a snipped from the e-mail chain. I'm not filing a bug on this because we can't change it due to backwards compatibility and it won't be an issue in Pulp 3.

The "hildren" key appears on responses due to this logic in
server/pulp/server/webservices/views/serializers/content.py
content_unit_child_link_objs method:

        # look for children fields
        if not key.endswith('children'):
            continue
        child_keys.append(key)
        # child field key format: _<child type>_children
        child_type = key.rsplit('_', 1)[0][1:]
        # ...
<pre>

#13 Updated by ttereshc about 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#14 Updated by ttereshc about 4 years ago

  • Status changed from ASSIGNED to POST

#15 Updated by ttereshc almost 4 years ago

  • Blocks deleted (Task #2305: Add a Artifact ViewSet)

#16 Updated by ttereshc almost 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#17 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 9

#18 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (27)

#19 Updated by daviddavis over 1 year ago

  • Sprint/Milestone set to 3.0.0

#20 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3)

#21 Updated by bmbouter 11 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF