Bug 208132 - errata.listPackages Method Returns different results than docs say.
errata.listPackages Method Returns different results than docs say.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
410
All Linux
medium Severity medium
: ---
: ---
Assigned To: Devan Goodwin
Brandon Perkins
:
Depends On:
Blocks: 248642
  Show dependency treegraph
 
Reported: 2006-09-26 12:21 EDT by Brandon Perkins
Modified: 2008-04-02 17:01 EDT (History)
0 users

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-02 17:01:18 EDT
Type: ---
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 Brandon Perkins 2006-09-26 12:21:49 EDT
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 12:22:53 EDT
Third problem:
3) 'package_id' is missing from the doc's return structure.
Comment 2 Mike McCune 2006-09-28 19:37:56 EDT
moving to 420.  no time in 420
Comment 4 Brandon Perkins 2008-01-28 12:36:53 EST
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 14:48:32 EST
Sending        code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java
Transmitting file data .
Committed revision 136285.
Comment 6 Brandon Perkins 2008-02-04 14:41:41 EST
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 10:00:09 EST
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-09 20:20:47 EST
Verified.
Comment 9 Pradeep Kilambi 2008-03-26 12:04:03 EDT
>> 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 17:01:18 EDT
API call Enhancements for 5.1 Sat GA so Closed for Current Release.

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