← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1701410] Re: different behavior when deleting with request body (no BadRequest with core resources in case of pecan)

 

I am going to close this as it is over 6 years old and no one has
stepped forward to fix it, so it's just not a priority. Please re-open
if necessary.

** Changed in: neutron
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1701410

Title:
  different behavior when deleting with request body (no BadRequest with
  core resources in case of pecan)

Status in neutron:
  Won't Fix

Bug description:
  In master environment, it is different behavior when we try to delete with
  request body.  I fixed it in [1] but CORE_RESOURCE(network/subnet/port/subnetpool) doesn't pass this code in case of web_framework = pecan in /etc/neutron/neutron.conf

  [1]
  https://github.com/openstack/neutron/blame/master/neutron/api/v2/base.py#L555

  [FloatingIP, Router]
  $ source ~/devstack/openrc admin admin; export TOKEN=`openstack token issue | grep ' id ' | get_field 2`
  $ curl -i -X DELETE -d '{"floatingip":{"description": "aaa"}}' -H "content-type:application/json" -H 'accept:application/json' -H "x-auth-token:$TOKEN" 192.168.122.33:9696/v2.0/floatingips/f4e9b845-4472-4806-bd7a-bec8f7618af2
  HTTP/1.1 400 Bad Request
  Content-Length: 113
  Content-Type: application/json
  X-Openstack-Request-Id: req-deaffdb3-7c13-4604-89d0-78fbcc184ef5
  Date: Fri, 30 Jun 2017 00:56:56 GMT

  {"NeutronError": {"message": "Request body is not supported in
  DELETE.", "type": "HTTPBadRequest", "detail": ""}}

  $ curl -i -X DELETE -d '{"router": {"name": "aaa"}}' -H "content-type:application/json" -H 'accept:application/json' -H "x-auth-token:$TOKEN" 192.168.122.33:9696/v2.0/routers/1d0ea30e-c481-4be3-a548-a659d9e3787c
  HTTP/1.1 400 Bad Request
  Content-Length: 113
  Content-Type: application/json
  X-Openstack-Request-Id: req-a2f9babb-4eb3-471e-9b42-ccfe722c44f0
  Date: Fri, 30 Jun 2017 01:44:40 GMT

  {"NeutronError": {"message": "Request body is not supported in
  DELETE.", "type": "HTTPBadRequest", "detail": ""}}

  [Core resources: Network/Subnet/Port/Subnetpool]
  $ source ~/devstack/openrc admin admin; export TOKEN=`openstack token issue | grep ' id ' | get_field 2`
  $ curl -i -X DELETE -d '{"network":{"name": "aaaa"}}' -H "content-type:application/json" -H 'accept:application/json' -H "x-auth-token:$TOKEN" 192.168.122.33:9696/v2.0/networks/1fb94931-dabe-49dc-bce4-68c8bafea8b0

  HTTP/1.1 204 No Content
  Content-Length: 0
  X-Openstack-Request-Id: req-7e838c38-e6cd-46c3-8703-c93f5bb4a503
  Date: Fri, 30 Jun 2017 01:32:12 GMT

  $ curl -i -X DELETE -d '{"subnet": {"name": "aaa"}}' -H "content-
  type:application/json" -H 'accept:application/json' -H "x-auth-
  token:$TOKEN"
  192.168.122.33:9696/v2.0/subnets/a18fb191-2a89-4193-80d1-5330a8052d64

  HTTP/1.1 204 No Content
  Content-Length: 0
  X-Openstack-Request-Id: req-901476cf-7e87-4b7c-ab20-209b81d2eb25
  Date: Fri, 30 Jun 2017 01:37:01 GMT

  $ curl -i -X DELETE -d '{"port": {"name": "aaa"}}' -H "content-
  type:application/json" -H 'accept:application/json' -H "x-auth-
  token:$TOKEN"
  192.168.122.33:9696/v2.0/ports/47f2c36a-7461-4c1a-a23e-931d5aee3f9c

  HTTP/1.1 204 No Content
  Content-Length: 0
  X-Openstack-Request-Id: req-48452706-6309-42c2-ac80-f0f4e387060e
  Date: Fri, 30 Jun 2017 01:37:33 GMT

  $ curl -i -X DELETE -d '{"subnetpool": {"description": "aaa"}}' -H
  "content-type:application/json" -H 'accept:application/json' -H
  "x-auth-token:$TOKEN"
  192.168.122.33:9696/v2.0/subnetpools/e0e09ffc-a4af-4cf0-ac2e-7a8b1475cef6

  HTTP/1.1 204 No Content
  Content-Length: 0
  X-Openstack-Request-Id: req-9601a3ae-74a0-49ca-9f99-02ad624ceacb
  Date: Fri, 30 Jun 2017 06:24:58 GMT

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1701410/+subscriptions



References