Bug 1182768 - Pulp API returns incorrect result from /plugins/distributors/<distributor_id> endpoint
Summary: Pulp API returns incorrect result from /plugins/distributors/<distributor_id>...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: 2.4.3
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: amacdona@redhat.com
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-15 21:11 UTC by amacdona@redhat.com
Modified: 2015-02-28 23:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 23:19:36 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 664 0 None None None Never

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


Note You need to log in before you can comment on or make changes to this bug.