Bug 449814 - API for system.deleteSystems() is wrong
Summary: API for system.deleteSystems() is wrong
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Backend
Version: rhn505
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Sebastian Skracic
QA Contact: Amy Owens
URL:
Whiteboard: us=28718
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-03 18:45 UTC by Stephen Herr
Modified: 2008-06-06 14:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-06 14:22:57 UTC
Embargoed:


Attachments (Terms of Use)
RHN API method caller (2.00 KB, application/x-perl)
2008-06-03 18:45 UTC, Stephen Herr
no flags Details

Description Stephen Herr 2008-06-03 18:45:10 UTC
Description of problem:
The deleteSystems method description is "Delete systems given a list of system
ids." However, the method can only handle a single system ID at a time. Either
the description (and name?) or the functionality need to change. 

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

How reproducible:
Always

Steps to Reproduce:
1. Run attached script
2. Note: systemid1 and systemid2 should be the ids of systems you don't mind
deleting.
  
Actual results:
Fault returned from XML RPC Server, fault code -1: Could not find method
deleteSystems in class class com.redhat.rhn.frontend.xmlrpc.system.SystemHandler

Expected results:
script returns and system profiles are deleted

Additional info:
It currently works fine if you only give it one system id at a time. However the
description says that you should be able to give it a list of indeterminate length.

Comment 1 Stephen Herr 2008-06-03 18:45:10 UTC
Created attachment 308277 [details]
RHN API method caller

Comment 2 Sebastian Skracic 2008-06-06 14:22:57 UTC
Nope, not a bug.  The API expects list as the last argument, therefore Perl
client code has to be adjusted like this:

# arbitrary long list of system IDs
my @systemidlist = (1011536347,  1011834030);
my $result = $client->call('system.delete_systems', $session, \@systemidlist);
...



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