Description of problem: API call system.getUnscheduledErrata returns id and date, while the documentations says it should also return advisory_synopsis, advisory_type, advisory_name. Version-Release number of selected component (if applicable): Satellite 5.1.0. How reproducible: Dterministic. Steps to Reproduce: 1. Check https://your-satellite/rhn/apidoc/system/SystemHandler.jsp#getUnscheduledErrata 2. Run Perl code below. Actual results: Method: getUnscheduledErrata Description: Provides an array of errata that are applicable to a given system. Parameters: * string sessionKey * int serverId Returns: array * struct (errata) o int "id" - Errata ID. o string "date" - Date erratum was created. o string "advisory_synopsis" - Summary of the erratum. o string "advisory_type" - type label such as Security, Bug Fix o string "advisory_name" - name such as RHSA, etc. and $VAR1 = { 'date' => bless( do{\(my $o = '20080527T06:00:00')}, 'Frontier::RPC2::DateTime::ISO8601' ), 'id' => '5506' }; Expected results: Either the call should return all five values, or the docs should be fixed. Additional info: This comes from rhn-satellite-users maililng list: Hi all Is it just me or does system.getUnscheduledErrata not behave as advertised? https://your.sat.com/rhn/apidoc/system/SystemHandler.jsp#getUnscheduledE rrata --- Method: getUnscheduledErrata Description: Provides an array of errata that are applicable to a given system. Parameters: * string sessionKey * int serverId Returns: array * struct (errata) o int "id" - Errata ID. o string "date" - Date erratum was created. o string "advisory_synopsis" - Summary of the erratum. o string "advisory_type" - type label such as Security, Bug Fix o string "advisory_name" - name such as RHSA, etc. --- But when I do the following --- -=snip=- my $Systems = $client->call('system.listUserSystems', $session); for my $sys (@$Systems) { my $Erratum = $client->call('system.getUnscheduledErrata', $session, $sys->{'id'}); print "$sys->{'name'} ($sys->{'id'})\n"; for my $errata (@$Erratum) { print Dumper $errata; exit; -=snip=- --- I get the following output: --- $VAR1 = { 'date' => bless( do{\(my $o = '20080318T13:00:00')}, 'Frontier::RPC2::DateTime::ISO8601' ), 'id' => '1070' }; --- Anyone know where advisory_synopsis, advisory_type, and advisory_name are? CC
Please don't change the doco, fix the API call. Just returning an errata ID isn't very helpful (I can't see a corresponding API call to match the errata ID to a advisory name). CC
Fixed (by adding the expected return values) in trunk: Sending code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml Sending code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ErrataSerializer.java Sending code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java Sending code/src/com/redhat/rhn/manager/system/SystemManager.java Sending scripts/api/systemtests.py Transmitting file data ..... Committed revision 173052. Backported to 5.1: Sending code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml Sending code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ErrataSerializer.java Sending code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java Sending code/src/com/redhat/rhn/manager/system/SystemManager.java Sending scripts/api/systemtests.py Transmitting file data ..... Committed revision 173053.
Good points, reverted previous fix due to some technical issues, changed/fixed xmlrpc docs and made the date return as a string in short form similar to getRelevantErrata. Trunk: Sending code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml Sending code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ErrataSerializer.java Sending code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java Sending code/src/com/redhat/rhn/manager/system/SystemManager.java Transmitting file data .... Committed revision 173339. 5.1: Sending code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml Sending code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ErrataSerializer.java Sending code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java Sending code/src/com/redhat/rhn/manager/system/SystemManager.java Transmitting file data .... Committed revision 173340.
5.1.1 Satellite is now GA, bugs Closed for Current Release.