Bug 493111 - errata.delete API for user created errata
errata.delete API for user created errata
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
: FutureFeature
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2009-03-31 12:51 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:09 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:55:17 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-03-31 12:51:51 EDT
RFE: 

Description of problem:
errata.delete API for user created errata doesn't exist. I think that was an oversight. I think it is important for completion especially when we have create and delete api for all other entities like system, profile, channel etc. 

It would be useful as a cleanup api to customers as well as in our api automation. Otherwise lot of custom errata gets created and never gets deleted.
Comment 1 Brandon Perkins 2009-03-31 12:55:29 EDT
More of an RFE... but I have to believe that this is a trivial addition.  If it turns out to be more than a day of work, then we'll punt it.
Comment 2 Brad Buckingham 2009-03-31 13:02:35 EDT
I agree this is an RFE, but it would be worthwhile addition to the API.  I don't think it will be more than ~1/2 day effort, but will let you know if it is more once I dig in to it.
Comment 3 Brad Buckingham 2009-04-02 13:56:29 EDT
master git commit: aabbd6ec2a24997878f42050998e4852862314dc
vader git commit: ef28b81e4f725f14beefd847f0f51420d7e92ba9

Added the following API to errata namespace:

Method: delete
Description:
Delete an erratum. This method will only allow for deletion of custom errata created either through the UI or API.

Parameters:

    * string sessionKey
    * string advisoryName

Returns:

    * int - 1 on success, exception thrown otherwise. 



While adding this API also observed that APIs setDetails, addPackages and removePackages, from the errata namespace, would allow a user to invoke the method on a RH (non-custom) errata.  Updated those APIs to throw an 'invalid errata' exception when a user attempts to do this.
Comment 4 Sayli Karmarkar 2009-04-08 16:07:41 EDT
verified. Added errata.delete api automation test. Also modified setDetails, addPackages and removePackages to add additional checking for this.
Comment 5 Michael Mráka 2009-08-28 04:28:50 EDT
Verified in stage -> RELEASE_PENDING.

* created errata 'test-1' via webUI
* removed via API:
$ ./xmlrpc-client.pl dell-pem710-01.rhts.eng.bos.redhat.com admin xxx errata.delete test-1
OK
* errata disappeared from webUI, OK
* tried to remove non-existent errata
$ ./xmlrpc-client.pl dell-pem710-01.rhts.eng.bos.redhat.com admin xxx errata.delete asdf
Fault returned from XML RPC Server, fault code -208: redstone.xmlrpc.XmlRpcFault: The errata asdf cannot be found.
* tried to remove errata from RH channel
$ ./xmlrpc-client.pl dell-pem710-01.rhts.eng.bos.redhat.com admin xxx errata.delete RHEA-2009:8822
Fault returned from XML RPC Server, fault code 2600: redstone.xmlrpc.XmlRpcFault: Invalid errata: RHEA-2009:8822
Comment 6 Brandon Perkins 2009-09-10 15:55:17 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.