get_collection_href too many arguments

Bug #1281785 reported by Endre Karlson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Medium
Endre Karlson

Bug Description

_get_collection_href() takes at most 4 arguments (5 given)
Traceback (most recent call last):
  File "designate/api/middleware.py", line 193, in __call__
    return request.get_response(self.application)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/pecan/middleware/recursive.py", line 56, in __call__
    return self.application(environ, start_response)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/pecan/core.py", line 570, in __call__
    self.handle_request(req, resp)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/pecan/core.py", line 508, in handle_request
    result = controller(*args, **kwargs)
  File "designate/api/v2/controllers/blacklists.py", line 62, in get_all
    return self._view.list(context, request, blacklist)
  File "designate/api/v2/views/base.py", line 46, in list
    "links": self._get_collection_links(request, items, parents)
  File "designate/api/v2/views/base.py", line 105, in _get_collection_links
    parents)
  File "designate/api/v2/views/base.py", line 149, in _get_previous_href
    return self._get_collection_href(request, items, parents, extra_params)
TypeError: _get_collection_href() takes at most 4 arguments (5 given)
Resetting any allocations.
}}}

Traceback (most recent call last):
  File "designate/tests/test_api/test_v2/test_blacklists.py", line 46, in test_get_blacklists
    self._assert_paging(data, '/blacklists', key='blacklists')
  File "designate/tests/test_api/test_v2/__init__.py", line 77, in _assert_paging
    page_items = _page(page_items[-1:][0]['id'])
  File "designate/tests/test_api/test_v2/__init__.py", line 63, in _page
    r = self.client.get(url, params)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/webtest/app.py", line 212, in get
    expect_errors=expect_errors)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/webtest/app.py", line 521, in do_request
    self._check_status(status, res)
  File "/home/karlsone/projects/dnsaas/designate/.venv/local/lib/python2.7/site-packages/webtest/app.py", line 550, in _check_status
    res)
AppError: Bad response: 500 INTERNAL SERVER ERROR (not 200 OK or 3xx redirect for http://localhost/blacklists?marker=73aba70a-a8a0-44fa-8b73-f59c30d9bfd2&limit=5)
'{"code": 500, "type": "unknown", "request_id": "req-10eed6ef-e206-43c6-ba4f-ec151b5a7851"}'

Ran 1 test in 3.178s
FAILED (failures=1)

Changed in designate:
assignee: nobody → Endre Karlson (endre-karlson)
importance: Undecided → Medium
status: New → Incomplete
status: Incomplete → In Progress
milestone: none → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/74506

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/74506
Committed: https://git.openstack.org/cgit/stackforge/designate/commit/?id=059d75deab3e9c5dc58aa7ce293ca18d51c6101b
Submitter: Jenkins
Branch: master

commit 059d75deab3e9c5dc58aa7ce293ca18d51c6101b
Author: Endre Karlson <email address hidden>
Date: Tue Feb 18 22:24:57 2014 +0100

    Fix arguments in get_collection_href

    Closes-Bug: #1281785

    Change-Id: I094ce3f3622be3c77b0f6e2b2a7ea4908ef14caf

Changed in designate:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/74685

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/74685
Committed: https://git.openstack.org/cgit/stackforge/designate/commit/?id=003c59e21d6c6d9dcb090483c20efe3d265af4dc
Submitter: Jenkins
Branch: master

commit 003c59e21d6c6d9dcb090483c20efe3d265af4dc
Author: Endre Karlson <email address hidden>
Date: Wed Feb 19 13:35:55 2014 +0100

    Shouldn't pass items to get_collection_href here

    Closes-Bug: #1281785

    Change-Id: I5ba29af2866a1d3e8e27c9c0341fda77998545e4

Kiall Mac Innes (kiall)
Changed in designate:
milestone: icehouse-3 → icehouse-2
Changed in designate:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.