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