Bug 844048 - RFE: errata.listPackages API shall return associated package list also for unpublished errata
RFE: errata.listPackages API shall return associated package list also for un...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
550
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Tomas Lestach
Dimitar Yordanov
:
Depends On:
Blocks: sat560-api
  Show dependency treegraph
 
Reported: 2012-07-28 06:37 EDT by Dimitar Yordanov
Modified: 2013-10-01 17:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 17:44:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dimitar Yordanov 2012-07-28 06:37:25 EDT
Description of problem:
API call "errata.listPackages" retunts no result if the erratum is unpublished.

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

How reproducible:
100%

Steps to Reproduce:
1. Create Custom channel "aaaaaa"
2. With the help of "rhnpush" push two packages in the channel.
3. Create errata "test_erratum"
4. Execute the following script

import sys, xmlrpclib
RHN_SERVER='https://xxx/rpc/api'
RHN_USER='xxx'
RHN_PASS='xxxx'

client = xmlrpclib.Server(RHN_SERVER, verbose=0)
key = client.auth.login(RHN_USER, RHN_PASS)

ERRATA='test_erratum'
pkg=client.channel.software.listAllPackages(key,'aaaaaa')

client.errata.listPackages(key,ERRATA)
client.errata.addPackages(key,ERRATA,[pkg[0]['id'],pkg[1]['id']])
client.errata.listPackages(key,ERRATA)
client.errata.listUnpublishedErrata(key)
client.errata.publish(key,ERRATA,['aaaaaa'])
client.errata.listPackages(key,ERRATA)
client.errata.delete(key,ERRATA)  

Actual results:
API call "errata.listPackages"  returns empty list of packages if erratum is not published.

Expected results:
API call "errata.listPackages" returns the list of packages even if erratum is not published.

Additional info:
This could be a regresion. The behaviour the same for Sat 5.4.1 and Sat 5.5.0.
Accorging to JUnit test:
http://svn.rhndev.redhat.com/viewcvs/trunk/qa/rpcapi/600/java/src/com/redhat/rhn/rpc/api/errata/addPackages.java?rev=205855&view=markup

at some point it was working.
Comment 1 Tomas Lestach 2012-07-30 05:47:17 EDT
Definitely not a regression. We never had the code that would support package list of unpublished errata within the errata.listPackages API.
Comment 2 Tomas Lestach 2012-08-01 10:45:02 EDT
changing in upstream ...

spacewalk.git: c423f11113abca0b3293468c170ac09f1c7c4fba


844048 - let errata.listPackages API return also packages associated with unpublished errata
    
 - changing hibernate mappings from date to timestamp to keep the time within the dates in the API output
 - removing unused methods and query
 - list of errata packages get taken out of hibernate objects instead of making additional cached statement queries and creating extra dto objects (side effect: faster API)
Comment 5 Clifford Perry 2013-10-01 17:40:15 EDT
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

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.

http://rhn.redhat.com/errata/RHEA-2013-1395.html

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