Project

Profile

Help

Issue #325

closed

Missingresource consumer_id not raised when retieval of schedules if performed on invalid 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

http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/scheduled_content.html#listing-schedules

404 - if the consumer does not exist

$ curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/no-consumer/schedules/content/install/"| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 394 100 394 0 0 1242 0 -
:--:-- --:--:-- --:--:-- 1246
{
"_href": "/pulp/api/v2/consumers/no-consumer/schedules/content/install/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"schedule": null
}
},
"description": "Missing resource(s): schedule=None",
"sub_errors": []
},
"error_message": "Missing resource(s): schedule=None",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"schedule": null
},
"traceback": null
}

Actions #1

Updated by ipanova@redhat.com about 9 years ago

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

Updated by bmbouter about 9 years ago

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

Updated by ipanova@redhat.com about 9 years ago

  • Status changed from ASSIGNED to POST
Actions #4

Updated by bmbouter almost 9 years ago

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

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
Actions #6

Updated by dkliban@redhat.com almost 9 years ago

  • Platform Release set to 2.7.0
Actions #7

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by igulina@redhat.com almost 9 years ago

  • Status changed from 5 to 6

Verified. Checked on f20 and rhel6 on pulp 2.7.0

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

>>  curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/cheburashka/schedules/content/install/"| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: H
curl: (6) Could not resolve host: Accept
100     2  100     2    0     0      5      0 --:--:-- --:--:-- --:--:--     5

[]

>> curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/no_such_consumer/schedules/content/install/"| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: H
curl: (6) Could not resolve host: Accept
100   463  100   463    0     0   1392      0 --:--:-- --:--:-- --:--:--  1394

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

Updated by amacdona@redhat.com over 8 years ago

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

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #12

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