← Back to team overview

registry team mailing list archive

[Bug 660818] [NEW] delete backup_schedule error while running nosetests

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
         Status: New

-- 
delete backup_schedule error while running nosetests
https://bugs.launchpad.net/bugs/660818
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.



Follow ups

References