Issue #425
closedGot an error instead of empty list when listing scheduled content <action>
Description
Description of problem:
Got an error instead of empty list when listing scheduled content install/update/uninstall
[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------
The following resource(s) could not be found:
None (schedule)
from /root/.pulp/server_calls.log:
2014-05-06 08:01:38,983 - INFO - GET request to /pulp/api/v2/consumers/c1/schedules/content/install/ with parameters None
2014-05-06 08:01:38,984 - INFO - Response status : 404
2014-05-06 08:01:38,984 - INFO - Response body :
{
"exception": null,
"traceback": null,
"_href": "/pulp/api/v2/consumers/c1/schedules/content/install/",
"error_message": "Missing resource(s): schedule=None",
"http_request_method": "GET",
"http_status": 404,
"error": {
"code": "PLP0009",
"data": {
"resources": {
"schedule": null
}
},
"description": "Missing resource(s): schedule=None",
"sub_errors": []
},
"resources": {
"schedule": null
}
}
[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules create --schedule PT1M --consumer-id c1 --name wolf
Schedule successfully created
[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------
Schedule: PT1M
Id: 536896064fb9b50229bf5f10
Enabled: True
Next Run: 2014-05-06T07:58:04Z
[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules delete --schedule-id 536896064fb9b50229bf5f10 --consumer-id c1
Schedule successfully deleted
[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------
The following resource(s) could not be found:
None (schedule)
Version-Release number of selected component (if applicable):
pulp-2.4.0-0.11.beta
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
Same issue with API
http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/consumer/scheduled_content.html#scheduled-content-management
$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/consumers/c1/schedules/content/install/'| python -m json.tool:--:-- 417
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 385 100 385 0 0 364 0 0:00:01 0:00:01 -
{
"_href": "/pulp/api/v2/consumers/c1/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
}
+ This bug was cloned from Bugzilla Bug #1094634 +