Bug 455312 - system.setChildChannels only works on one channel at a time.
system.setChildChannels only works on one channel at a time.
Status: CLOSED NOTABUG
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend (Show other bugs)
rhn505
All Linux
low Severity low
: ---
: ---
Assigned To: rhn-dev-list
Red Hat Network Quality Assurance
us=35803
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-14 15:33 EDT by Stephen Herr
Modified: 2010-12-21 09:50 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-21 09:50:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
perl api test for system.setChildChannels (2.01 KB, application/x-perl)
2008-07-14 15:33 EDT, Stephen Herr
no flags Details

  None (edit)
Description Stephen Herr 2008-07-14 15:33:23 EDT
Description of problem:
The system.setChildChannels API method is supposed to accept an "array" of
arguments according to the published API. The purpose being so you can subscribe
to more than one child channel per call. The backend functionality does not
work; it throws an error. See system.deleteSystems for an example of a working
method that accepts an array as an argument. We can either 1) make the list
functionality work or 2) change the api to correctly identify that you can only
operate on one channel at a time.

Version-Release number of selected component (if applicable):
5.0.6

How reproducible:
Always

Steps to Reproduce:
1. Run attached perl script.
  
Actual results:
Fault returned from XML RPC Server, fault code -2: unhandled internal exception:
java.lang.Integer

Expected results:
2    (indicating both channels were successfully subscribed)

Additional info:
Comment 1 Stephen Herr 2008-07-14 15:33:23 EDT
Created attachment 311761 [details]
perl api test for system.setChildChannels
Comment 2 Stephen Herr 2008-07-14 15:41:51 EDT
Here's the stack trace of this error when the Java automated tests run into it:
org.apache.xmlrpc.XmlRpcException: unhandled internal exception:
java.lang.Integer at
org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(Unknown Source)
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(Unknown
Source) at org.apache.xmlrpc.XmlRpcClientWorker.execute(Unknown Source) at
org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source) at
org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source) at
org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source) at
com.redhat.rhn.rpc.api.system.setChildChannels.testSystemSetChildChannels(setChildChannels.java:136)
Comment 4 Sebastian Skracic 2010-12-21 09:50:44 EST
# python /git/rhn-hosted/java/rhn/xml_rpc_api/callAnyMethod.py sskracicgit *** system.setChildChannels 1013709385 "[9131, 6961]"
========================================
Calling: system.setChildChannels
With args:
[1013709385, [9131, 6961]]
========================================
Returned:
1

# python /git/rhn-hosted/java/rhn/xml_rpc_api/callAnyMethod.py sskracicgit *** channel.software.listSystemChannels 1013709385 
========================================
Calling: channel.software.listSystemChannels
With args:
[1013709385]
========================================
Returned:
[{'channel_label': 'rhel-x86_64-server-sap-5',
  'channel_name': 'RHEL AP for SAP (v. 5 for 64-bit x86_64)'},
 {'channel_label': 'rhel-x86_64-server-productivity-5',
  'channel_name': 'RHEL Optional Productivity Apps (v. 5 for 64-bit x86_64)'},
 {'channel_label': 'rhel-x86_64-server-5',
  'channel_name': 'Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)'}]


Therefore, the limitation is in the client tool, not API.

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