Project

Profile

Help

Issue #317

400 is never raised during consumer binding deletion

Added by ipanova@redhat.com over 6 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

$ curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin -d '{"force":"yes"}' "https://localhost/pulp/api/v2/consumers/new_consumer1/bindings/xxx/yum_distributor/"
HTTP/1.1 202 Accepted
Date: Thu, 26 Feb 2015 09:50:25 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 172
Content-Type: application/json

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/064ba133-a4a8-491a-8e4f-c1d8c5966ec9/", "task_id": "064ba133-a4a8-491a-8e4f-c1d8c5966ec9"}], "result": null, "error": null}

I expect:

{"http_request_method": "DELETE", "exception": null, "error_message": "Invalid properties: ['force']", "property_names": ["force"], "_href": "/pulp/api/v2/consumers/new_consumer1/bindings/xxx/yum_distributor/", "http_status": 400, "error": {"code": "PLP0015", "data": {"property_names": ["force"], "properties": "['force']"}, "description": "Invalid properties: ['force']", "sub_errors": []}, "traceback": null}

History

#1 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com

#2 Updated by bmbouter over 6 years ago

  • Triaged changed from No to Yes
  • Severity set to Low

#3 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from ASSIGNED to POST

#4 Updated by bmbouter over 6 years ago

  • Severity changed from Low to 1. Low

#5 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from POST to MODIFIED

#6 Updated by dkliban@redhat.com over 6 years ago

  • Platform Release set to 2.7.0

#7 Updated by dkliban@redhat.com over 6 years ago

  • Status changed from MODIFIED to 5

#8 Updated by igulina@redhat.com over 6 years ago

  • Status changed from 5 to ASSIGNED
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch

For invalid parameter I got 202:

>> pulp-consumer rpm bind --repo-id=zoo_repoBind tasks successfully created:

Task Id: be03d103-44b2-47e7-b01e-3e5d86a5c090

>>  curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin -d '{"invalid":"yes"}' "https://localhost/pulp/api/v2/consumers/maruska/bindings/zoo_repo/yum_distributor/"

HTTP/1.1 202 ACCEPTED
Date: Sat, 27 Jun 2015 13:40:59 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 447
Content-Type: application/json

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/49927a76-29cc-4af7-9fc6-ffc22dea11ab/", "task_id": "49927a76-29cc-4af7-9fc6-ffc22dea11ab"}], "result": {"notify_agent": true, "repo_id": "zoo_repo", "deleted": false, "_ns": "consumer_bindings", "distributor_id": "yum_distributor", "consumer_id": "maruska", "consumer_actions": [], "binding_config": {}, "_id": {"$oid": "558ea7e1e512ed777daefd80"}, "id": "558ea7e1e512ed777daefd80"}, "error": null}

and it's 400 for force:


>> pulp-consumer rpm bind --repo-id zoo_repo
Bind tasks successfully created:

Task Id: 72742f22-834e-441f-a469-4bf5360a3e6a

>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X DELETE -k -u admin:admin -d '{"force":"yes"}' "https://localhost/pulp/api/v2/consumers/maruska/bindings/zoo_repo/yum_distributor/"
HTTP/1.1 400 BAD REQUEST
Date: Sat, 27 Jun 2015 13:44:30 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 410
Connection: close
Content-Type: application/json

{"http_request_method": "DELETE", "exception": null, "error_message": "Invalid properties: ['force']", "property_names": ["force"], "_href": "/pulp/api/v2/consumers/maruska/bindings/zoo_repo/yum_distributor/", "http_status": 400, "error": {"code": "PLP0015", "data": {"property_names": ["force"], "properties": "['force']"}, "description": "Invalid properties: ['force']", "sub_errors": []}, "traceback": null}

#9 Updated by igulina@redhat.com over 6 years ago

  • Status changed from ASSIGNED to 6

An issue #1070 for invalid parameters has been created.

#10 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#13 Updated by bmbouter over 1 year ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF