Project

Profile

Help

Issue #319

closed

404 is not raised if the content installation is made on non existent consumer

Added by ipanova@redhat.com about 9 years ago. Updated almost 4 years 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 POST -k -u admin:admin -d '{}' "https://localhost/pulp/api/v2/consumers/no-consumer/actions/content/install/"
HTTP/1.1 400 Bad Request
Date: Thu, 26 Feb 2015 10:29:56 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: 465
Connection: close
Content-Type: application/json

{"http_request_method": "POST", "exception": null, "error_message": "Missing values for: ['units', 'options']", "_href": "/pulp/api/v2/consumers/no-consumer/actions/content/install/", "http_status": 400, "error": {"code": "PLP0016", "data": {"property_names": ["units", "options"], "properties": "['units', 'options']"}, "description": "Missing values for: ['units', 'options']", "sub_errors": []}, "missing_property_names": ["units", "options"], "traceback": null}[

I expect:
{"http_request_method": "POST", "exception": null, "error_message": "Missing resource(s): resource_id=no-consumer", "_href": "/pulp/api/v2/consumers/no-consumer/actions/content/install/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"resource_id": "no-consumer"}}, "description": "Missing resource(s): resource_id=no-consumer", "sub_errors": []}, "traceback": null, "resources": {"resource_id": "no-consumer"}}

Actions #1

Updated by ipanova@redhat.com about 9 years ago

Same with update and uninstall content

Actions #2

Updated by ipanova@redhat.com about 9 years ago

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

Updated by bmbouter about 9 years ago

  • Triaged changed from No to Yes
  • Severity set to Low
Actions #4

Updated by ipanova@redhat.com about 9 years ago

  • Status changed from ASSIGNED to POST
Actions #5

Updated by bmbouter almost 9 years ago

  • Severity changed from Low to 1. Low
Actions #6

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by dkliban@redhat.com almost 9 years ago

  • Platform Release set to 2.7.0
Actions #8

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #9

Updated by igulina@redhat.com almost 9 years ago

  • Status changed from 5 to 6

Verified. Checked on f20 and rhel6 for pulp 2.7.0

>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el6.noarch

>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X POST -k -u admin:admin -d '{}' "https://localhost/pulp/api/v2/consumers/no_such_consumer/actions/content/install/"

HTTP/1.1 404 NOT FOUND
Date: Thu, 18 Jun 2015 08:39:34 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Encoding: utf-8
Content-Length: 462
Connection: close
Content-Type: application/json

{"http_request_method": "POST", "exception": null, "error_message": "Missing resource(s): consumer_id=no_such_consumer", "_href": "/pulp/api/v2/consumers/no_such_consumer/actions/content/install/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"consumer_id": "no_such_consumer"}}, "description": "Missing resource(s): consumer_id=no_such_consumer", "sub_errors": []}, "traceback": null, "resources": {"consumer_id": "no_such_consumer"}}
Actions #10

Updated by amacdona@redhat.com over 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #13

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

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

Also available in: Atom PDF