Bug 484262 - API doc minor changes for system.getEventHistory
API doc minor changes for system.getEventHistory
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity low
: ---
: ---
Assigned To: Jay Dobies
Sayli Karmarkar
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2009-02-05 13:08 EST 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:54:28 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-02-05 13:08:01 EST
Description of problem:
system.getEventHistory API doc says:

Description:
Returns a list history items associated with the system, ordered from oldest to newest. 
...

Returns:

    * array:
          o struct - History Event
                + dateTime.iso8601 "completed" - Date that the event occurred (optional)
                + string "summary" - Summary of the event
                + string "details" - Details of the event


There are two minor modifications needed in the doc:

1. Description should say that it returns list of history items ordered from "newest to oldest" and NOT oldest to newest. I can see the most recent event first event in the list. 
  
2. Details do return details of the events for instant events like registration, channel subscription. However, it returns blank for scheduled events like package upgrade. Its expected as two events are entirely different types and scheduled event details can be obtained by system.listSystemEvents. However, I think we should specify it in the API doc.
Comment 1 Jay Dobies 2009-02-12 16:42:19 EST
One thing I'd like to investigate further in the future, I'm not sure the details have to be empty for events coming out of rhnAction. Below is the relevant chunk of the query (Action_queries:system_events_history)

SELECT SA.action_id EVENT_ID,
               AType.name || ' scheduled by ' || NVL(U.login, '(none)') AS SUMMARY,
               SA.created,
               SA.pickup_time AS picked_up,
               SA.completion_time AS completed,
               AStat.name AS history_status,
               AType.label AS history_type,
               AType.name AS history_type_name,
	       NULL AS details
          FROM rhnActionType AType,
               rhnActionStatus AStat,
               rhnUser U,
               rhnAction A,
               rhnServerAction SA

I think we can change the "NULL AS details" line to pull in rhnServerAction.result_msg to use as the details.
Comment 2 Jay Dobies 2009-02-12 16:49:54 EST
Commit: 953dd70758b05d226315531d157768c7c6d5d0c8

Updated the docs are suggested.
Comment 3 Sayli Karmarkar 2009-02-24 10:34:31 EST
Verified.
I can see API description now as :

"Returns a list history items associated with the system, ordered from newest to oldest. Note that the details may be empty for events that were scheduled against the system (as compared to instant). For more information on such events, see the system.listSystemEvents operation."

~SayliK
Comment 4 Jan Pazdziora 2009-08-19 11:34:10 EDT
With install Satellite-5.3.0-RHEL5-re20090730.0, the /rhn/apidoc/handlers/SystemHandler.jsp#getEventHistory page says

 Method: getEventHistory
Description:
Returns a list history items associated with the system, ordered from newest to oldest. Note that the details may be empty for events that were scheduled against the system (as compared to instant). For more information on such events, see the system.listSystemEvents operation.

Parameters:

    * string sessionKey
    * int serverId

Returns:

    * array:
          o struct - History Event
                + dateTime.iso8601 "completed" - Date that the event occurred (optional)
                + string "summary" - Summary of the event
                + string "details" - Details of the event

Stage validated.
Comment 5 Brandon Perkins 2009-09-10 15:54:28 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.