Project

Profile

Help

Task #2299

closed

Add serializer for the content models.

Added by jortel@redhat.com about 8 years ago. Updated almost 5 years 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 - CURRENTRELEASEbizhang

Actions
Blocks Pulp - Task #2304: Add a Content ViewSetCLOSED - CURRENTRELEASEttereshc

Actions
Copied from Pulp - Task #2298: Add serializer for the repository models.CLOSED - CURRENTRELEASEamacdona@redhat.com

Actions
Copied to Pulp - Task #2300: Add serializer for the task models.CLOSED - CURRENTRELEASEbizhang

Actions
Actions #1

Updated by jortel@redhat.com about 8 years ago

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

Updated by jortel@redhat.com about 8 years ago

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

Updated by amacdona@redhat.com about 8 years ago

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

Updated by amacdona@redhat.com about 8 years ago

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

Updated by amacdona@redhat.com about 8 years ago

  • Blocks Task #2311: Add a RepositoryContent ViewSet added
Actions #6

Updated by amacdona@redhat.com about 8 years ago

Actions #7

Updated by amacdona@redhat.com about 8 years ago

Actions #8

Updated by amacdona@redhat.com about 8 years ago

  • Groomed changed from No to Yes
Actions #9

Updated by semyers about 8 years ago

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

Actions #10

Updated by mhrivnak about 8 years ago

  • Sprint/Milestone set to 27
Actions #11

Updated by semyers about 8 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.

Actions #12

Updated by bmbouter about 8 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>
Actions #13

Updated by ttereshc about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #14

Updated by ttereshc about 8 years ago

  • Status changed from ASSIGNED to POST
Actions #15

Updated by ttereshc about 8 years ago

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

Added by ttereshc about 8 years ago

Revision e1c05ddd | View on GitHub

Finish content serializer and add one for artifact

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

Added by ttereshc about 8 years ago

Revision e1c05ddd | View on GitHub

Finish content serializer and add one for artifact

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

Actions #16

Updated by ttereshc about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #17

Updated by bmbouter over 6 years ago

  • Sprint set to Sprint 9
Actions #18

Updated by bmbouter over 6 years ago

  • Sprint/Milestone deleted (27)
Actions #19

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #20

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #21

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF