Project

Profile

Help

Issue #325

Missingresource consumer_id not raised when retieval of schedules if performed on invalid consumer

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

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
}

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 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
}

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

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

#12 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