Bug 1013672 - RFE: let errata.getdetails API return errata id
RFE: let errata.getdetails API return errata id
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Lestach
Lukas Pramuk
: FutureFeature
Depends On:
Blocks: 1113221
  Show dependency treegraph
Reported: 2013-09-30 10:57 EDT by graeme
Modified: 2015-01-13 05:18 EST (History)
4 users (show)

See Also:
Fixed In Version: spacewalk-java-2.3.8-39
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-01-13 05:18:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description graeme 2013-09-30 10:57:11 EDT
Description of problem:

It would be nice to have the errata id returned by the errata.getDetails api call making it easier to populate an array which can then be scheduled.

Without this it is quite difficult to use system.scheduleApplyErrata as it uses an array of errata id's with no real easy way to get them.

The "advisory name" is used as input with other calls so this seems a wee bit inconsistent to use with say a file of system names to apply errata to without parsing each system to get and then match the errata id's to advisory names for scheduling. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:


Actual results:

Expected results:

Additional info:
Comment 1 Tomas Lestach 2013-10-24 08:57:26 EDT
Makes sense. Interesting nobody requested it before.

spacewalk.git: b5bf577e61de27a1d88b7612a515a6496db95317
Comment 3 Lukas Pramuk 2014-10-13 14:24:28 EDT
VERIFIED. spacewalk-java-2.3.8-28.el6sat.noarch

manually by this reproducer:

# key=$(spacewalk-api --server=`hostname` --nologin auth.login admin <password> | cut -d\' -f2)

# spacewalk-api --server=`hostname` --nologin errata.getDetails $key RHSA-2014:0865
$result = {
            'topic' => 'Updated tomcat6 packages that fix three security issues and two bugs are ...',
            'release' => '1',
            'description' => 'Apache Tomcat is a servlet container for the Java Servlet and JavaServer ...',
            'errataFrom' => '',
            'solution' => 'Before applying this update, make sure all previously released errata ...',
            'issue_date' => '7/9/14',
            'synopsis' => 'Moderate: tomcat6 security and bug fix update',
            'notes' => '',
            'references' => 'https://access.redhat.com/security/updates/classification/#moderate
            'last_modified_date' => '2014-07-09 17:09:30.0',
            'id' => '2456',
            'type' => 'Security Advisory',
            'update_date' => '7/9/14',
            'product' => 'Red Hat Enterprise Linux'

>>> errata.getDetails call newly returns advisory 'id'

# spacewalk-api --server=`hostname` --nologin errata.findByCve $key CVE-2014-0099
$result = [
              'advisory_type' => 'Security Advisory',
              'date' => '7/9/14',
              'advisory_name' => 'RHSA-2014:0865',
              'id' => '2456',
              'advisory_synopsis' => 'Moderate: tomcat6 security and bug fix update'

>>> used errata.findByCve call to check that id is correct (RHSA-2014:0865 has id 2456)
Comment 4 Tomas Lestach 2014-10-14 08:35:20 EDT
Lukas pointed on missing APIdoc ...

spacewalk.git: 7321e9a365f3935d34709eaef83edc0c47270980
Comment 7 Lukas Pramuk 2014-10-15 15:16:31 EDT
VERIFIED DOCS. spacewalk-java-2.3.8-40.el6sat.noarch


Method: getDetails

    struct - erratum
        int "id"
        string "issue_date"
        string "update_date"
        string "last_modified_date" - This date is only included for published erratum and it represents the last time the erratum was modified.
        string "synopsis"
        int "release"
        string "type"
        string "product"
        string "errataFrom"
        string "topic"
        string "description"
        string "references"
        string "notes"
        string "solution"

>>> documented that struct newly contains int "id"
Comment 9 Pavel Studeník 2015-01-08 10:47:44 EST
Reverified with spacewalk-java-2.3.8-96.el6sat.noarch

>>> client.errata.getDetails(key,"RHSA-2015:0016")["id"]
Comment 10 Clifford Perry 2015-01-13 05:18:57 EST
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 


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