Bug 208132

Summary: errata.listPackages Method Returns different results than docs say.
Product: Red Hat Satellite 5 Reporter: Brandon Perkins <bperkins>
Component: APIAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: Brandon Perkins <bperkins>
Severity: medium Docs Contact:
Priority: medium    
Version: 410   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat510 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-02 21:01:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 248642    

Description Brandon Perkins 2006-09-26 16:21:49 UTC
Description of problem:
https://rhn.webqa.redhat.com/rhn/apidoc/errata/ErrataHandler.jsp#listPackages
shows a return structure different than reality.

Version-Release number of selected component (if applicable):
RHN 415 QA Push 2

How reproducible:
Always.

Steps to Reproduce:
1. call errata.listPackages(sessionKey, advisoryName) in your language of choice
2. the return doesn't match the docs.  Specifically, there is an array where the
docs say there is a string.
  
Actual results:
* array
        * struct (package)
                * package_size
                * package_epoch
                * package_build_date
                * package_last_modified_date
                * package_id
                * package_md5sum
                * package_arch_label
                * package_license
                * package_vendor
                * package_summary
                * package_file
                * package_release
                * package_version
                * providing_channels
                * package_description
                * package_build_host
                * package_payload_size
                * package_name
                * package_cookie

Expected results:
    *  array
          o struct (package)
                + string "package_build_date"
                + string "package_last_modified_date"
                + string "package_size"
                + string "package_payload_size"
                + string "package_name"
                + string "package_epoch"
                + string "package_version"
                + string "package_release"
                + string "package_arch_label"
                + string "providing_channels"
                + string "package_build_host"
                + string "package_description"
                + string "package_md5sum"
                + string "package_vendor"
                + string "package_summary"
                + string "package_cookie"
                + string "package_license"
                + string "package_file"
                + string "package_build_date"
                + string "package_last_modified_date"
                + string "package_size"
                + string "package_payload_size"


Additional info:
Two problems:
1) 'providing_channels' is an array, not a string
2) The last four strings "package_build_date", "package_last_modified_date",
"package_size", and "package_payload_size", are duplicates of the first four
strings.

Comment 1 Brandon Perkins 2006-09-26 16:22:53 UTC
Third problem:
3) 'package_id' is missing from the doc's return structure.

Comment 2 Mike McCune 2006-09-28 23:37:56 UTC
moving to 420.  no time in 420

Comment 4 Brandon Perkins 2008-01-28 17:36:53 UTC
Fails QA.

1) Doc is missing: int "id"
2) Doc is missing: int "package_id" (deprecated)

Otherwise, good.

Comment 5 Devan Goodwin 2008-01-29 19:48:32 UTC
Sending        code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java
Transmitting file data .
Committed revision 136285.


Comment 6 Brandon Perkins 2008-02-04 19:41:41 UTC
Fails QA.  Wrong datatype.

Actual results:
string "id"
string "package_id" (deprecated)

Expected results:
int "id"
int "package_id" (deprecated)


Comment 7 Devan Goodwin 2008-02-07 15:00:09 UTC
This this developer written API documentation fun or what?!

Sending        code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java
Committed revision 136615.


Comment 8 Brandon Perkins 2008-02-10 01:20:47 UTC
Verified.

Comment 9 Pradeep Kilambi 2008-03-26 16:04:03 UTC
>> client.errata.listPackages(key,"RHBA-2007:1044")
[{'package_md5sum': 'c05588d0c3a6798a85d661969678d64d', 'package_name':
'audit-libs-devel', 'package_vendor': 'Red Hat, Inc.', 'package_version':
'1.0.15', 'last_modified_date': '2007-11-15', 'package_id': 6234, 'file':
'audit-libs-devel-1.0.15-3.el4_6.1.i386.rpm', 'id': 6234, 'size': '55286',
'build_date': '2007-11-08', 'package_cookie': 'hs20-bc1-5.build.redhat.com
1194548143', 'build_host': 'hs20-bc1-5.build.redhat.com', 'package_file':
'audit-libs-devel-1.0.15-3.el4_6.1.i386.rpm', 'payload_size': '93080', ...}]
looks good ..

release pending

Comment 10 Brandon Perkins 2008-04-02 21:01:18 UTC
API call Enhancements for 5.1 Sat GA so Closed for Current Release.