Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1442397

Summary: [BUG] As per API v2 documentation for <server_url>/apidoc/v2/packages.html | GET /katello/api/compare is not working
Product: Red Hat Satellite Reporter: Abhishek Sahni <asahni>
Component: Content ManagementAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.8CC: andrew.schofield, bbuckingham, cduryee, egolov, fabrizio.waldner, jcallaha, jhutar, jomitsch, redhatbugs, stbenjam, tstrachota
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.7.0.14-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:03:42 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 Abhishek Sahni 2017-04-14 14:07:03 UTC
Description of problem:

As per API doc <server_url>/apidoc/v2/packages.html
Issuing a HTTP GET request to <server_url>/katello/api/compare should list all the packages similar to <server_url>/katello/api/packages but it seems a bug.

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


How reproducible:

100%


Steps to Reproduce:
1. Open satellite WebUI and Login,

2. Open https://<server_url>/katello/api/packages

It will list packages

3. Open https://<server_url>/katello/api/compare

It will not list packages but as per documentation - https://<server_url>/apidoc/v2/packages.html it should list.

Actual results:

API to get a comparison of packages doesn't work

Expected results:

It should list packages and also work with parameters available with this API call.

Additional info:

Comment 3 John Mitsch 2017-04-18 18:25:50 UTC
There are two issues here:

- The documentation is incorrect for the compare endpoint, /katello/api/compare does not exist

- There is only a compare endpoint for errata (katello/api/v2/errata/compare), I believe there should be one for packages. The errata endpoint is not listed in the documentation

i.e. here is a working command 
curl -X GET -k -u admin:changeme -H "Content-Type: application/json" -d '{"content_view_version_ids": [1,3]}' https://<mysat>.com/katello/api/v2/errata/compare

I'm seeing this upstream as well

Comment 4 John Mitsch 2017-04-18 18:27:45 UTC
Created redmine issue http://projects.theforeman.org/issues/19304 from this bug

Comment 5 Paul Donohue 2017-10-27 22:57:40 UTC
https://github.com/Katello/katello/pull/7043

Comment 6 Satellite Program 2017-12-05 17:11:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19304 has been resolved.

Comment 14 Satellite Program 2018-08-02 15:47:04 UTC
Upstream bug assigned to stbenjam

Comment 15 Satellite Program 2018-08-02 15:47:10 UTC
Upstream bug assigned to stbenjam

Comment 20 Bryan Kearney 2018-10-16 19:03:42 UTC
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-2018:2927