Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 603890

Summary: RHN API Satellite 5.3: system.listSubscribableBaseChannels returns null if trying to get returned attrs in upper case
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Suchý <msuchy>
Severity: medium Docs Contact:
Priority: medium    
Version: 530CC: cperry, jhutar, msuchy, pnovotny, xdmoon
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: Fixed in the 5.4.0 Release - GA'd 2010-10-27
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-28 15:01:44 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: 608754    
Attachments:
Description Flags
reproducer script
none
SystemHandler.java.TEST.1013723.1.patch none

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