Bug 1094634 - Got an error instead of empty list when listing scheduled content <action>
Summary: Got an error instead of empty list when listing scheduled content <action>
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-06 08:09 UTC by Ina Panova
Modified: 2015-02-28 22:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:05:46 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 425 0 None None None Never

Description Ina Panova 2014-05-06 08:09:07 UTC
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
  % 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 --:--:--   417
{
    "_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
}

Comment 1 Brian Bouterse 2015-02-28 22:05:46 UTC
Moved to https://pulp.plan.io/issues/425


Note You need to log in before you can comment on or make changes to this bug.