Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1171092 - API Delete activation key does not respond with content
API Delete activation key does not respond with content
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.6
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: Unused
Assigned To: Christine Fouant
jaudet
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks: 1122832
  Show dependency treegraph
 
Reported: 2014-12-05 05:36 EST by Peter Vreman
Modified: 2017-02-23 15:45 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:20:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 8612 None None None 2016-04-22 12:02 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Peter Vreman 2014-12-05 05:36:35 EST
Description of problem:
There is no output in the response on a DELETE request on activation keys.

root@li-lc-1017:/home/hoiroot# curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -d '{"per_page":9999}' -XDELETE https://localhost/katello/api/v2/activation_keys/31
root@li-lc-1017:/home/hoiroot#


Applying the following patch:

--- activation_keys_controller.rb.old   2014-12-05 10:16:25.718267583 +0000
+++ activation_keys_controller.rb       2014-12-05 10:16:46.512486372 +0000
@@ -77,7 +77,7 @@
     param :id, :identifier, :desc => N_("ID of the activation key"), :required => true
     def destroy
       sync_task(::Actions::Katello::ActivationKey::Destroy, @activation_key)
-      respond :message => _("Deleted activation key '%s'") % params[:id], :status => 204
+      respond_for_destroy
     end

     api :GET, "/activation_keys/:id", N_("Show an activation key")

Makes it consistent with the other parts of the API:

root@li-lc-1017:/home/hoiroot# curl -K /opt/hoici/etc/curl-hoici.conf -H 'Content-Type: application/json' -d '{"per_page":9999}' -XDELETE https://localhost/katello/api/v2/activation_keys/28
{}
root@li-lc-1017:/home/hoiroot#


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Consistent responses throughout the API


Additional info:
Comment 1 RHEL Product and Program Management 2014-12-05 05:44:26 EST
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Christine Fouant 2014-12-08 10:28:47 EST
Created redmine issue http://projects.theforeman.org/issues/8612 from this bug
Comment 4 Bryan Kearney 2015-01-30 12:04:55 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/8612 has been closed
-------------
Christine Fouant
Applied in changeset commit:katello|16b0d916b71c6b3db929b325c094b265e69204bb.
Comment 7 jaudet 2015-03-04 10:51:44 EST
Tested against Satellite-6.1.0-RHEL-6-20150303.0 and Satellite-6.1.0-RHEL-7-20150303.0.
Comment 8 Bryan Kearney 2015-08-11 09:31:20 EDT
This bug is slated to be released with Satellite 6.1.
Comment 9 errata-xmlrpc 2015-08-12 01:20:17 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592

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