Bug 1132914

Summary: Duplicate route sync plan
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: APIAssignee: Christine Fouant <cfouant>
Status: CLOSED ERRATA QA Contact: jaudet
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, cwelton, jaudet, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/7292
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:12:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Peter Vreman 2014-08-22 09:43:59 UTC
Description of problem:
There is a duplicate route in sync_plan modification

# grep 'PUT.*sync.*prod' sync_plans_controller.rb.old
  api :PUT, "/organizations/:organization_id/sync_plans/:id/products", N_("Add products to sync plan")
  api :PUT, "/organizations/:organization_id/sync_plans/:id/products", N_("Remove products from sync plan")


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Use DELETE for Remove of products


Expected results:


Additional info:

Comment 1 Peter Vreman 2014-08-22 09:44:38 UTC
Patch to fix

--- /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/v2/sync_plans_controller.rb
+++ /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/v2/sync_plans_controller.rb
@@ -126,7 +126,7 @@
     respond_for_show
   end

-  api :PUT, "/organizations/:organization_id/sync_plans/:id/products", N_("Remove products from sync plan")
+  api :DELETE, "/organizations/:organization_id/sync_plans/:id/products", N_("Remove products from sync plan")
   param :id, String, :desc => N_("ID of the sync plan"), :required => true
   param :product_ids, Array, :desc => N_("List of product ids to remove from the sync plan"), :required => true
   def remove_products

Comment 2 RHEL Program Management 2014-08-22 09:53:10 UTC
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 5 Christine Fouant 2014-08-28 13:08:58 UTC
Created redmine issue http://projects.theforeman.org/issues/7292 from this bug

Comment 6 Bryan Kearney 2014-08-28 20:05:19 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7292 has been closed
-------------
Christine Fouant
Applied in changeset commit:katello|9faf11f0dd90ada679446c83acf725788234969c.

Comment 9 jaudet 2015-03-05 14:59:10 UTC
Verified against Satellite-6.1.0-RHEL-7-20150303.0 and Satellite-6.1.0-RHEL-6-20150303.0 using these tests: https://github.com/SatelliteQE/robottelo/pull/1969

Comment 10 Bryan Kearney 2015-08-11 13:33:39 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 errata-xmlrpc 2015-08-12 05:12:55 UTC
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