Bug 1392595 - API should not declare HTTP DELETE verb on blueprints collection
Summary: API should not declare HTTP DELETE verb on blueprints collection
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.8.0
Assignee: Gregg Tanzillo
QA Contact: Martin Kourim
URL:
Whiteboard:
Depends On:
Blocks: 1393120
TreeView+ depends on / blocked
 
Reported: 2016-11-07 21:13 UTC by abellott
Modified: 2018-03-15 08:14 UTC (History)
3 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1393120 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:38:31 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description abellott 2016-11-07 21:13:10 UTC
Description of problem:

API should not be declaring HTTP DELETE verb on collections. In this specific case, API was allowing DELETE on the blueprints collection which causes incorrect representation of actions when fetching blueprints.

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

5.7

How reproducible:

Always

Steps to Reproduce:
1. Get Appliance
2. Fetch Blueprints via GET /api/blueprints


Actual results:

You will notice the following 2 entries in the collection actions:

    {
      "name": "delete",
      "method": "post",
      "href": "http://localhost:3000/api/blueprints"
    },
    {
      "name": "delete",
      "method": "delete",
      "href": "http://localhost:3000/api/blueprints"
    }

Expected results:

Only the "post" method one should be exposed.

Additional info:

Comment 3 CFME Bot 2016-11-08 21:31:26 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0649fdc86fd6fff37a8a398fbf2487aac890776a

commit 0649fdc86fd6fff37a8a398fbf2487aac890776a
Author:     Alberto Bellotti <abellott>
AuthorDate: Fri Nov 4 13:12:31 2016 -0400
Commit:     Alberto Bellotti <abellott>
CommitDate: Mon Nov 7 16:13:43 2016 -0500

    Should not be declaring DELETE HTTP verb on collection
    
    - Remove DELETE HTTP verb declaration on /api/blueprints
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1392595

 config/api.yml | 3 ---
 1 file changed, 3 deletions(-)

Comment 4 CFME Bot 2016-11-08 21:40:58 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/88319933622edc9ed54c9b631284ebf355388aab

commit 88319933622edc9ed54c9b631284ebf355388aab
Author:     Jason Frey <fryguy9>
AuthorDate: Tue Nov 8 16:27:23 2016 -0500
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Nov 8 16:40:09 2016 -0500

    Merge pull request #12444 from abellotti/api_delete_blueprint_collection
    
    Should not be declaring DELETE HTTP verb on collection
    (cherry picked from commit 97a2520ad8a2b8580ff21e2ca3163ef0357de1ec)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1392595

 config/api.yml | 3 ---
 1 file changed, 3 deletions(-)

Comment 6 Martin Kourim 2017-04-10 10:27:11 UTC
Verified on 5.8.0.9-alpha2 that the HTTP DELETE is no longer present for blueprints collection.


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