Bug 1260206 - Cannot search for puppet modules by repository
Cannot search for puppet modules by repository
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2015-09-04 14:06 EDT by jaudet
Modified: 2016-05-15 08:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-15 08:29:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of foreman-debug from a RHEL 7.1 system. (727.20 KB, application/x-xz)
2015-09-04 14:06 EDT, jaudet
no flags Details

  None (edit)
Description jaudet 2015-09-04 14:06:50 EDT
Created attachment 1070386 [details]
Output of foreman-debug from a RHEL 7.1 system.

Description of problem:
It's possible to search for puppet modules by issuing GET requests to the following paths:

* /katello/api/puppet_modules
* /katello/api/content_views/:content_view_id/filters/:filter_id/puppet_modules
* /katello/api/content_view_filters/:content_view_filter_id/puppet_modules
* /katello/api/repositories/:repository_id/puppet_modules 

The paths imply that it's possible to search for just puppet modules that belong to a certain repository. Unfortunately, this just doesn't work. Satellite ignores the "repository_id" search filter. Satellite just returns all puppet modules instead of those belonging to a particular repository.

Version-Release number of selected component (if applicable):
Tested against Satellite 6.1.2. Foreman-debug attached.

How reproducible:

Steps to Reproduce:
See description.

Actual results:
All puppet modules are returned.

Expected results:
Only puppet modules in a certain repository are returned.

Additional info:
Comment 1 jaudet 2015-09-04 14:19:39 EDT
See automated tests here: https://github.com/SatelliteQE/robottelo/pull/2740
Comment 3 Oleksandr Shtaier 2016-05-15 08:29:28 EDT
Get all modules:
{"total":6,"subtotal":6,"page":1,"per_page":20,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"id":6,"uuid":"72585823-5ba4-44a8-8094-7e59520c81a6","name":"samba","version":"0.2.0","author":"puppet","summary":"A puppet module that manages samba"},{"id":5,"uuid":"5abcc0d7-b1ec-4abc-a4aa-7b7c36c82065","name":"cron","version":"0.0.1","author":"puppet","summary":"Puppet module that manages scheduling of task trough cron"},{"id":4,"uuid":"189cb719-a8f2-4f6e-9e65-9d63d2948896","name":"pureftpd","version":"1.0.2","author":"saz","summary":""},{"id":3,"uuid":"1333e072-6f4f-44bf-bc78-f41640f25300","name":"httpd","version":"0.2.0","author":"5ubZ3r0","summary":"This module handles a standard httpd installation."},{"id":2,"uuid":"c7f26ae2-e87e-490f-a3c0-493977e3bd8e","name":"ntp","version":"3.2.1","author":"puppetlabs","summary":"NTP Module"},{"id":1,"uuid":"cb01f35b-bc55-4ba2-b052-57aba0d22246","name":"apache","version":"1.8.0","author":"puppetlabs","summary":"Installs, configures, and manages Apache virtual hosts, web services, and modules."}]}

Get modules for one repository:
{"total":1,"subtotal":1,"page":1,"per_page":20,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[{"id":2,"uuid":"c7f26ae2-e87e-490f-a3c0-493977e3bd8e","name":"ntp","version":"3.2.1","author":"puppetlabs","summary":"NTP Module"}]}
Comment 4 Oleksandr Shtaier 2016-05-15 08:32:01 EDT
Verified on 6.2 GA

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