Bug 157655 - rpc/api channel.software.list_all_packages xml rpc call returns package release as number not a string
rpc/api channel.software.list_all_packages xml rpc call returns package relea...
Status: CLOSED WONTFIX
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Web Site (Show other bugs)
rhn370
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Orazi
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-13 10:55 EDT by Aram Kananov
Modified: 2008-10-16 11:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-16 11:14:28 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 Aram Kananov 2005-05-13 10:55:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
pc/api channel.software.list_all_packages return package release as number.
so for example glibc-2.3.2-95.30 = glibc-2.3.2-95.3


following snippet of code demonstrates problem

import xmlrpclib
server = xmlrpclib.Server('https://my-rhn.example.com/rpc/api',None,None,1)
session = server.auth.login("admin","admin",100)

for pk in server.channel.software.list_all_packages(session, 'rhel-i386-es-3'):
    if pk['package_name'] == 'glibc':
           print pk

output looks like this
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.200000000000003, 'package_id': 1113, 'package_arch_name': 'i686'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.200000000000003, 'package_id': 1251, 'package_arch_name': 'i386'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.269999999999996, 'package_id': 1806, 'package_arch_name': 'i386'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.269999999999996, 'package_id': 1813, 'package_arch_name': 'i686'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.299999999999997, 'package_id': 182, 'package_arch_name': 'i386'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.299999999999997, 'package_id': 183, 'package_arch_name': 'i686'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.299999999999997, 'package_id': 2000, 'package_arch_name': 'i386'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.299999999999997, 'package_id': 2007, 'package_arch_name': 'i686'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.599999999999994, 'package_id': 846, 'package_arch_name': 'i386'}
{'package_name': 'glibc', 'package_epoch': '', 'package_version': '2.3.2', 'package_release': 95.599999999999994, 'package_id': 853, 'package_arch_name': 'i686'}

looking in the actual http response recieved from server it seems that wrong type(double) assigned to the package release in the raw response xml:

body: '>package_version</name><value><string>2.3.2</string></value></member>
</struct></value>\n<value><struct>
<member><name>package_epoch</name><value><string></string></value></member>
<member><name>package_name</name><value><string>glibc</string></value></member>
<member><name>package_id</name><value><i4>183</i4></value></member>
<member><name>package_arch_name</name><value><string>i686</string></value></member>
<member><name>package_release</name><value><double>95.3</double></value></member>
<member><name>package_version</name><value><string>2.3.2</string></value></member>
</struct></value>

Version-Release number of selected component (if applicable):
rhn satellite 3.7.1 RHEL4

How reproducible:
Always

Steps to Reproduce:
run in the python following script(replace url, username, passw with appropriate:
import xmlrpclib
server = xmlrpclib.Server('https://my-rhn.example.com/rpc/api',None,None,1)
session = server.auth.login("admin","admin",100)

for pk in server.channel.software.list_all_packages(session, 'rhel-i386-es-3'):
    if pk['package_name'] == 'glibc':
           print pk

Actual Results:  package realease is double

Expected Results:  package realease should be string

Additional info:
Comment 1 Aram Kananov 2005-05-15 18:04:07 EDT
system.list_packages has the same problem with release
Comment 2 Amanda Carter 2008-10-16 11:14:28 EDT
This bug has been closed due to inactivity.  Please open a new bug with specific details if this problem is still occurring or if an enhancement is needed.

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