nova/nova/tests
Andrew Laski 1b757c328d Fix wrap_exception to get all arguments for payload
The wrap_exception decorator that attempts to send a notification when
exceptions occur was not sending all the arguments it was intending to.
It relies on getcallargs to get the arguments and argument names for the
called method but if the method has another decorator on it getcallargs
pulls information for the decorator rather than the decorated method.
This pulls the decorated method with get_wrapped_function and then calls
getcallargs.

get_wrapped_function was moved to safeutils because utils.py can't be
imported by exception.py without a circular import.

A few tests were updated to include the id on the instance object used.
This was done because serialization of the object includes the
instance.name field which assumes that id is set to populate the
CONF.instance_name_template.  When id is not set it triggers a lazy load
which fails in the test environment.

Change-Id: I87d8691a2aae6f3555177364f3c40a490a6f7591
Closes-bug: 1525282
2015-12-11 10:11:08 -05:00
..
functional Merge "Add persistence to the RequestSpec object" 2015-12-10 00:32:34 +00:00
live_migration/hooks NFS setup for live-migration job 2015-11-20 14:54:01 +03:00
unit Fix wrap_exception to get all arguments for payload 2015-12-11 10:11:08 -05:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py Merge "Use EngineFacade from oslo_db.enginefacade" 2015-11-07 08:50:31 +00:00