Task #2948

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

Added by ttereshc over 3 years ago. Updated almost 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Platform Release:
Sprint Candidate:
Pulp 2


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

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


#1 Updated by over 3 years ago

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

#2 Updated by bmbouter almost 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#3 Updated by bmbouter almost 2 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.

#4 Updated by bmbouter almost 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF