Bug 1182768

Summary: Pulp API returns incorrect result from /plugins/distributors/<distributor_id> endpoint
Product: [Retired] Pulp Reporter: amacdona <austin>
Component: API/integrationAssignee: amacdona <austin>
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: medium Docs Contact:
Priority: low    
Version: 2.4.3CC: ipanova, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 23:19:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description amacdona@redhat.com 2015-01-15 21:11:59 UTC
Description of problem:

The `/plugins/distributors/<distributor_id>/` endpoint should return the distributor that matches the distributor_id.

Version-Release number of selected component (if applicable):

Probably present in all currently supported versions of pulp.

How reproducible:

always

Steps to Reproduce:

1.  curl -H "Accept: application/json" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/plugins/distributors/yum_distributor/"

Actual results:

{"display_name": "Pulp Nodes HTTP Distributor", "id": "nodes_http_distributor", "types": ["node"], "_href": "/pulp/api/v2/plugins/distributors/yum_distributor/"}%     

Expected results:

{"display_name": "Yum Distributor", "id": "yum_distributor", "types": ["rpm", "srpm", "drpm", "erratum", "package_group", "package_category", "distribution", "yum_repo_metadata_file"], "_href": "/pulp/api/v2/plugins/distributors/yum_distributor/"}%  

Additional info:

The Distributor controller creates a list of all distributors and simply returns the first of the list rather than matching the parameter.

Comment 1 amacdona@redhat.com 2015-01-15 21:17:40 UTC
This will be fixed by the Django conversion unless there is a need to get to it sooner.

Comment 2 Ina Panova 2015-01-16 08:16:54 UTC
I think this also should be added to the api docs. I looked through and did not see anything.

Comment 3 amacdona@redhat.com 2015-02-20 16:03:14 UTC
https://github.com/pulp/pulp/pull/1542

Comment 4 Brian Bouterse 2015-02-28 23:19:36 UTC
Moved to https://pulp.plan.io/issues/664