Bug 1013672 - RFE: let errata.getdetails API return errata id
Summary: RFE: let errata.getdetails API return errata id
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: 1113221
TreeView+ depends on / blocked
 
Reported: 2013-09-30 14:57 UTC by graeme
Modified: 2015-01-13 10:18 UTC (History)
4 users (show)

Fixed In Version: spacewalk-java-2.3.8-39
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 10:18:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description graeme 2013-09-30 14:57:11 UTC
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):

5.5 

How reproducible:

Always


Steps to Reproduce:

N/A

Actual results:


Expected results:


Additional info:

Comment 1 Tomas Lestach 2013-10-24 12:57:26 UTC
Makes sense. Interesting nobody requested it before.

spacewalk.git: b5bf577e61de27a1d88b7612a515a6496db95317

Comment 3 Lukas Pramuk 2014-10-13 18:24:28 UTC
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
https://tomcat.apache.org/security-6.html',
            '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 12:35:20 UTC
Lukas pointed on missing APIdoc ...

spacewalk.git: 7321e9a365f3935d34709eaef83edc0c47270980

Comment 7 Lukas Pramuk 2014-10-15 19:16:31 UTC
VERIFIED DOCS. spacewalk-java-2.3.8-40.el6sat.noarch

https://<SAT_FQDN>/rhn/apidoc/handlers/ErrataHandler.jsp#getDetails

Method: getDetails
...
Returns:

    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 15:47:44 UTC
Reverified with spacewalk-java-2.3.8-96.el6sat.noarch

>>> client.errata.getDetails(key,"RHSA-2015:0016")["id"]
2821

Comment 10 Clifford Perry 2015-01-13 10:18:57 UTC
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:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

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

Cliff


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