Bug 489996 - Inconsistency in return types actually returned and those mentioned in api docs for certain API in schedule namespace
Summary: Inconsistency in return types actually returned and those mentioned in api do...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: Sayli Karmarkar
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2009-03-12 19:51 UTC by Sayli Karmarkar
Modified: 2015-03-23 01:09 UTC (History)
3 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:55:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sayli Karmarkar 2009-03-12 19:51:36 UTC
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 18:25:25 UTC
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 18:31:47 UTC
git commit: 822ad7202b85a42f2923e19de9d615bad62dac72

Comment 3 Brad Buckingham 2009-03-23 20:28:23 UTC
mass move to ON_QA

Comment 4 Sayli Karmarkar 2009-03-24 17:06:40 UTC
verified.

Comment 5 John Sefler 2009-08-28 16:17:09 UTC
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 19:55:07 UTC
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.