Bug 489996 - Inconsistency in return types actually returned and those mentioned in api docs for certain API in schedule namespace
Inconsistency in return types actually returned and those mentioned in api do...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2009-03-12 15:51 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:09 EDT (History)
3 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:07 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-03-12 15:51:36 EDT
Description of problem:

1. listInProgressActions: 
    
   Doc says:
   Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed


   It actually returns: 
       * array:
          o struct - action
                + int "id" - Action Id.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed
  
    
2. listCompletedActions and listAllActions and listArchivedActions
   
   Doc says: 
   Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed

    It actually returns: String 'type' as additional return value along with all above.
Comment 1 Brad Buckingham 2009-03-16 14:25:25 EDT
It looks like at some point new items were to the return for listCompletedActions, listAllActions and listArchivedActions, but we failed to do the same for listInProgressActions.

In order to address this, I plan to update listInProgressActions to be consistent so that all 4 methods:
  - listAllActions
  - listAchivedActions
  - listCompletedActions
  - listFailedActions

return the same content, including:
  - struct
    - int id
    - string name
    - string type
    - string scheduler
    - dateTime.iso8601 earliest
Comment 2 Brad Buckingham 2009-03-16 14:31:47 EDT
git commit: 822ad7202b85a42f2923e19de9d615bad62dac72
Comment 3 Brad Buckingham 2009-03-23 16:28:23 EDT
mass move to ON_QA
Comment 4 Sayli Karmarkar 2009-03-24 13:06:40 EDT
verified.
Comment 5 John Sefler 2009-08-28 12:17:09 EDT
Verified on staged (Satellite-5.3.0-RHEL5-re20090724.0) with updates from Aug 20, 2009

moving to RELEASE_PENDING

verified api unit tests:
[jsefler@jsefler rpcapi]$ ant -Dnamespace=schedule
....
invoke-tests-subsystem:
     [echo] 
     [echo] --------------------------------------------------------------------
     [echo] Running all tests in schedule subsystem ...
     [echo] --------------------------------------------------------------------
     [echo]       
    [mkdir] Created dir: /home/jsefler/workspace/rpcapi/reports
    [junit] Running com.redhat.rhn.rpc.api.schedule.cancelActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 12.41 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listAllActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 4.892 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listArchivedActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.573 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listCompletedActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.658 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listCompletedSystems
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.687 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listFailedActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 4.034 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listFailedSystems
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.763 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listInProgressActions
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.369 sec
    [junit] Running com.redhat.rhn.rpc.api.schedule.listInProgressSystems
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.682 sec



also verified API docs:
click Help|About > API > schedule

 Method: listAllActions
Description:
Returns a list of all actions. This includes completed, in progress, failed and archived actions.

Parameters:

    * string sessionKey

Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "type" - Action type.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed

Method: listArchivedActions
Description:
Returns a list of actions that have been archived.

Parameters:

    * string sessionKey

Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "type" - Action type.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed

Method: listCompletedActions
Description:
Returns a list of actions that have completed successfully.

Parameters:

    * string sessionKey

Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "type" - Action type.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed


Method: listFailedActions
Description:
Returns a list of actions that have failed.

Parameters:

    * string sessionKey

Returns:

    * array:
          o struct - action
                + int "id" - Action Id.
                + string "name" - Action name.
                + string "type" - Action type.
                + string "scheduler" - The user that scheduled the action.
                + dateTime.iso8601 "earliest" - The earliest date and time the action will be performed
Comment 6 Brandon Perkins 2009-09-10 15:55:07 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.