Red Hat Bugzilla – Bug 1162061
API list puppet_modules does not work
Last modified: 2017-02-23 15:49:28 EST
Description of problem: The API call /katello/api/v2/puppet_modules does not list any puppet modules, even if there are 2000+ modules available. Instead the call with a repositories filter works: List all modules: curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -d '{"per_page":"9999"}' -XGET https://localhost/katello/api/v2/puppet_modules {"total":0,"subtotal":0,"page":1,"per_page":"9999","search":null,"sort":{"by":null,"order":null},"results":[]} List of single repository: curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -d '{"per_page":"9999"}' -XGET https://localhost/katello/api/v2/repositories/10/puppet_modules | jq . | grep -c name 2084 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create product with puppet repository 2. Load puppet modules in a repo 3. List all puppet_modules Actual results: Expected results: Additional info:
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
This is satisfied in the current code base.
Verified against Satellite-6.1.0-RHEL-6-20150311.1 and Satellite-6.1.0-RHEL-7-20150311.1. Example of procedure used: >>> from robottelo import entities >>> from nailgun import client >>> url = entities.PuppetModule().path() >>> response1 = client.get(url, …) >>> response2 = client.get(url, data={'repository_id': …}, …) >>> for response in (response1, response2): ... response.raise_for_status() ... >>> # all puppet modules >= puppet modules in a repo >>> response1.json()['total'] >= response2.json()['total'] True >>> response1.json()['total'] 5
This bug is slated to be released with Satellite 6.1.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1592