Bug 501376 - system.applyErrata and scheduleApplyErrata shouldn't have different names
system.applyErrata and scheduleApplyErrata shouldn't have different names
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity low
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2009-05-18 16:20 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:10 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:55:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sayli Karmarkar 2009-05-18 16:20:55 EDT
Description of problem:
system.applyErrata and  scheduleApplyErrata are doing the exact same thing. I guess scheduleApplyErrata was added later to be able to provide earliest date when it should be scheduled. So, scheduleApplyErrata has extra parameter  Date earliestOccurrence. 

Howevere, as the functionality is exact same, they should have same name. scheduleApplyErrata seems like better name as the actual action is scheduling and not applying immediately. 


Expected results:
1. scheduleApplyErrata(String sessionKey, Integer sid, List errataIds, 
            Date earliestOccurrence)
2. scheduleApplyErrata(String sessionKey, Integer sid, List errataIds)
3. Deprecate ApplyErrata(String sessionKey, Integer sid, List errataIds)
Comment 1 Brad Buckingham 2009-05-20 14:45:11 EDT
master git commit: a9de21801c2ab2a57e722b2f573a3b8b7adfec10
vader git commit: 36210ed5bf68392d2965a3092bc44a5002fecb9a
Comment 2 Sayli Karmarkar 2009-05-29 15:01:36 EDT
verified. Added api tests.
Comment 3 John Sefler 2009-08-27 10:02:47 EDT
Verified on staged (Satellite-5.3.0-RHEL5-re20090724.0) with updates from Aug 20, 2009

executed API test:
[jsefler@jsefler rpcapi]$ ant -Dtestcase=scheduleApplyErrata
......
invoke-tests-testcase:
     [echo] 
     [echo] --------------------------------------------------------------------
     [echo] Running scheduleApplyErrata ...
     [echo] --------------------------------------------------------------------
     [echo]       
    [mkdir] Created dir: /home/jsefler/workspace/rpcapi/reports
    [junit] Running com.redhat.rhn.rpc.api.system.scheduleApplyErrata
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 10.628 sec


Also verified API docs:
click Help|About > API > system > applyErrata (verified that it is deprecated)
https://sun-x4200-01.rhts.bos.redhat.com/rhn/apidoc/handlers/SystemHandler.jsp#applyErrata
Method: applyErrata
Description:
Schedules an action to apply errata updates to a system.

Deprecated as of version - being replaced by system.scheduleApplyErrata(string sessionKey, int serverId, array[int errataId])

Parameters:

    * string sessionKey
    * int serverId
    * array:
          o int - errataId

Returns:

    * int - 1 on success, exception thrown otherwise. 



click Help|About > API > system > scheduleApplyErrata
https://sun-x4200-01.rhts.bos.redhat.com/rhn/apidoc/handlers/SystemHandler.jsp#scheduleApplyErrata

 Method: scheduleApplyErrata
Description:
Schedules an action to apply errata updates to a system.

Parameters:

    * string sessionKey
    * int serverId
    * array:
          o int - errataId

Returns:

    * int - 1 on success, exception thrown otherwise. 

Available since: 10.6

Method: scheduleApplyErrata
Description:
Schedules an action to apply errata updates to a system at a given date/time.

Parameters:

    * string sessionKey
    * int serverId
    * array:
          o int - errataId
    * dateTime.iso8601 earliestOccurrence

Returns:

    * int - 1 on success, exception thrown otherwise. 


moving to RELEASE_PENDING:
Comment 4 Brandon Perkins 2009-09-10 15:55:48 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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