Bug 603890 - RHN API Satellite 5.3: system.listSubscribableBaseChannels returns null if trying to get returned attrs in upper case
Summary: RHN API Satellite 5.3: system.listSubscribableBaseChannels returns null if tr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Miroslav Suchý
URL:
Whiteboard: Fixed in the 5.4.0 Release - GA'd 201...
Depends On:
Blocks: sat540-api, sat540-apis
TreeView+ depends on / blocked
 
Reported: 2010-06-14 19:01 UTC by Xixi
Modified: 2018-11-14 19:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 15:01:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer script (813 bytes, application/x-perl)
2010-06-14 19:27 UTC, Xixi
no flags Details
SystemHandler.java.TEST.1013723.1.patch (880 bytes, patch)
2010-06-14 19:29 UTC, Xixi
no flags Details | Diff

Description Xixi 2010-06-14 19:01:49 UTC
Description of problem:
system.listSubscribableBaseChannels returns nothing for the actual base channel a system is subscribed to if you use upper case attributes (e.g., "CURRENT_BASE" as opposed to "current_base").

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

How reproducible:
Always.

Steps to Reproduce:
1. Have a satellite with at least 2 systems subscribed to different base channels with at least 1 other subscribable base channels for each (so it's easier to compare).
2. run attached reproducer script calling system.listSubscribableBaseChannels

Actual results:
Compare output between system's current base channel and other subscribable channels and observe that for the former only lower case (e.g., "current_base") returns results whereas for the latter does for both upper & lower case.

Expected results:
System's current base channel should also return results for upper case.

Additional info:
Proposed patch attached.

Comment 1 Xixi 2010-06-14 19:27:29 UTC
Created attachment 423964 [details]
reproducer script

Comment 2 Xixi 2010-06-14 19:29:07 UTC
Created attachment 423965 [details]
SystemHandler.java.TEST.1013723.1.patch

proposed patch

Comment 3 Tomas Lestach 2010-06-15 11:57:11 UTC
Documentation says the return value is:
array:
 struct - channel
  int "id" - Base Channel ID.
  string "name" - Name of channel.
  string "label" - Label of Channel
  int "current_base" - 1 indicates it is the current base channel

Please, use lowercase identifiers for accessing struct members.

The fact uppercase identifiers were returned for some systems, too, is WRONG. Following commit removes uppercase identifiers and the call shall behave according to doc.

spacewalk.git: 2b195123a9503541543ac3d335a7a69f4b2c4d38

Comment 5 Clifford Perry 2010-10-28 15:01:44 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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