Project

Profile

Help

Task #2948

closed

Decide how to handle missing endpoints due to master/detail model limitation

Added by ttereshc over 6 years ago. Updated about 5 years ago.

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

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The Importer model is an example of the existing master/detail model in Pulp3.
The same issue is relevant for the Publisher model or any other master/detail model.

Currently there are endpoints for the detail models only:

 ^api/v3/ ^repositories/(?P<repository_name>[^/.]+)/importers/basicfile/$
 ^api/v3/ ^repositories/(?P<repository_name>[^/.]+)/importers/file/$

The type of importer has to be always specified and the following endpoint doesn't exist (results in 404):

 ^api/v3/ ^repositories/(?P<repository_name>[^/.]+)/importers/$

Decide and agree on what the missing endpoint should do.
Suggest a solution (what kind of changes has to be made for model/serializer/viewset classes).

IRC discussion:

[20:27:53] <ttereshc> It's confusing from the user standpoint that they need to specify importer type, imho
[20:28:22] <mhrivnak> ttereshc it's a known limitation of the master/detail feature.
[20:29:27] <mhrivnak> ttereshc I think it might only matter when trying to add an importer. Do you think that's correct?
[20:29:42] <mhrivnak> You should be able to read the importers from the repository representation.
[20:30:05] <asmacdo> I want an endpoint for /api/v3/repositories/<repo_id>/importers/  that lists the types
[20:31:23] <ttereshc> mhrivnak, yeah, for me it makes sense to specify type when you create an importer and yes you can get all the importers from the repo representation, but I'd expect importers/ endpoint to list all importers (currently one per repo)
[20:31:34] <mhrivnak> asmacdo I kinda agree, but that's not what you'd expect at an importers/ endpoint
[20:32:29] <asmacdo> the trouble with listing all importers is that they would not all share the same serializer
[20:34:01] <asmacdo> Although, now that we have named serializers, we might be able to use that in combination with cast() 

Related issues

Related to Pulp - Story #3028: As a REST API user, I can see which plugins are installed.CLOSED - DUPLICATE

Actions
Actions #1

Updated by amacdona@redhat.com over 6 years ago

  • Related to Story #3028: As a REST API user, I can see which plugins are installed. added
Actions #2

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #3

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #4

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF