Bug 157655 - rpc/api channel.software.list_all_packages xml rpc call returns package release as number not a string
Summary: rpc/api channel.software.list_all_packages xml rpc call returns package relea...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Web Site
Version: rhn370
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike Orazi
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-13 14:55 UTC by Aram Kananov
Modified: 2008-10-16 15:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-16 15:14:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Aram Kananov 2005-05-13 14:55:25 UTC
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 22:04:07 UTC
system.list_packages has the same problem with release

Comment 2 Amanda Carter 2008-10-16 15:14:28 UTC
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.