Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Issue #664
closedPulp API returns incorrect result from /plugins/distributors/<distributor_id> endpoint
Description
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.
+ This bug was cloned from Bugzilla Bug #1182768 +
Related issues
Updated by amacdona@redhat.com over 9 years ago
This will be fixed by the Django conversion unless there is a need to get to it sooner.
+ This comment was cloned from Bugzilla #1182768 comment 1 +
Updated by ipanova@redhat.com over 9 years ago
I think this also should be added to the api docs. I looked through and did not see anything.
+ This comment was cloned from Bugzilla #1182768 comment 2 +
Updated by amacdona@redhat.com over 9 years ago
https://github.com/pulp/pulp/pull/1542
+ This comment was cloned from Bugzilla #1182768 comment 3 +
Added by dkliban@redhat.com over 9 years ago
Updated by dkliban@redhat.com over 9 years ago
- Status changed from MODIFIED to 5
Updated by igulina@redhat.com over 9 years ago
Is it documented? I couldn't find it.
Updated by igulina@redhat.com over 9 years ago
>> rpm -qa pulp-server
pulp-server-2.7.0-0.4.beta.el7.noarch
>> curl -H "Accept: application/json" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/plugins/distributors/yum_distributor/"
{"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/"}
>> curl -H "Accept: application/json" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/plugins/distributors/puppet_file_distributor/"
{"display_name": "Puppet File Distributor", "id": "puppet_file_distributor", "types": ["puppet_module"], "_href": "/pulp/api/v2/plugins/distributors/puppet_file_distributor/"}
All distributors:
>> curl -H "Accept: applicalhost/pulp/api/v2/plugins/distributors/"
[{"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/"}, {"display_name": "Puppet Distributor", "id": "puppet_distributor", "types": ["puppet_module"], "_href": "/pulp/api/v2/plugins/distributors/puppet_distributor/"}, {"display_name": "Puppet Install Distributor", "id": "puppet_install_distributor", "types": ["puppet_module"], "_href": "/pulp/api/v2/plugins/distributors/puppet_install_distributor/"}, {"display_name": "ISO Distributor", "id": "iso_distributor", "types": ["iso"], "_href": "/pulp/api/v2/plugins/distributors/iso_distributor/"}, {"display_name": "Export Distributor", "id": "export_distributor", "types": ["rpm", "srpm", "drpm", "erratum", "distribution", "package_category", "package_group"], "_href": "/pulp/api/v2/plugins/distributors/export_distributor/"}, {"display_name": "Puppet File Distributor", "id": "puppet_file_distributor", "types": ["puppet_module"], "_href": "/pulp/api/v2/plugins/distributors/puppet_file_distributor/"}]
Non-existing distributor:
curl -H "Accept: application/json" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/plugins/distributors/no_dist/"
{"http_request_method": "GET", "exception": null, "error_message": "Missing resource(s): distributor_type_id=no_dist", "_href": "/pulp/api/v2/plugins/distributors/no_dist/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"distributor_type_id": "no_dist"}}, "description": "Missing resource(s): distributor_type_id=no_dist", "sub_errors": []}, "traceback": null, "resources": {"distributor_type_id": "no_dist"}}
Updated by amacdona@redhat.com over 9 years ago
- Related to Task #1121: document /v2/plugins/* API added
Updated by amacdona@redhat.com almost 9 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Updated by bmbouter over 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.
Merge pull request #664 from dkliban/docs-url-change
Added message about new documentation