delete backup_schedule error while running nosetests

Bug #660818 reported by Eric Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Eric Day

Bug Description

When running nosetests on nova/tests/api, the openstack servers/backup_schedule delete test fails since it calls the delete method with an object id (which is empty). The method should take the id and just ignore it, or the routing should be changed to note have backup_schedule a strict resource mapping (so it doesn't send an ID). The routes package doesn't let you disable this (at least I can't find it), so we would need to manually add routes for the three different methods. Simply ignoring the id and using the normal resource mapping may be the easiest though.

ERROR: test_delete_backup_schedules (nova.tests.api.openstack.test_servers.Serve
rsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/eday/bzr/nova/lp660668/nova/tests/api/openstack/test_servers.py", line 179, in test_delete_backup_schedules
    res = req.get_response(nova.api.API())
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 918, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 886, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 130, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 130, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/eday/bzr/nova/lp660668/nova/wsgi.py", line 217, in __call__
    result = method(**arg_dict)
TypeError: delete() got an unexpected keyword argument 'id'
-------------------- >> begin captured logging << --------------------
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
routes.middleware: DEBUG: Matched DELETE /v1.0/servers/1/backup_schedules
routes.middleware: DEBUG: Route path: 'v1.0/{path_info:.*}', defaults: {'action': u'index', 'controller': <nova.api.openstack.API object at 0x261ab50>}
routes.middleware: DEBUG: Match dict: {'action': u'index', 'controller': <nova.api.openstack.API object at 0x261ab50>, 'sub_domain': None, 'path_info': 'servers/1/backup_schedules'}
routes.middleware: DEBUG: Matched DELETE /servers/1/backup_schedules
routes.middleware: DEBUG: Route path: 'servers/:server_id/backup_schedules/:(id)', defaults: {'action': u'delete', 'controller': <nova.api.openstack.backup_schedules.Controller object at 0x381e910>, 'id': None}
routes.middleware: DEBUG: Match dict: {'server_id': u'1', 'req': <Request at 0x21c2a10 DELETE http://localhost/v1.0/servers/1/backup_schedules>, 'id': None}
--------------------- >> end captured logging << ---------------------

Related branches

Eric Day (eday)
Changed in nova:
assignee: nobody → Eric Day (eday)
status: New → Fix Committed
milestone: none → austin-final-freeze
Eric Day (eday)
Changed in nova:
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.