Refactor work with session in db.block_device_mapping_* methods

Remove explicit use of session where it is not required.
Also this is small performance optimization, because if we put
session parameter to Models.save() method will create subtransaction.

blueprint db-session-cleanup

Change-Id: I6064f3df2daf0178009c4cf40da293f71ca6972a
Virtual Power Driver list running vms quoting error

This patch corrects a issue with VPD when configured for virsh the
list running vms function attempts to execute $2 instead of the actual
command.

Fixes Bug 1154280

Change-Id: I6d06cc58fb0f2935c4341761908b914106bda916
Authored-by: Chris Krelle <nobodycam@gmail.com>
Make run_instance() bail quietly if instance has been deleted

Right now, we make a big mess in the logs if someone deletes an
instance before we get a chance to run it. This cleans that up
to a single warning message.

Fixes bug 1154292

Change-Id: I2de0c2993d6a16d9482878eee4eef10bfd78c3e6
Don't load system_metadata when it isn't joined.

If we always load system_metadata, it will throw a sqlalchemy
error if it isn't joined in the column. Rather than putting it
in extra keys we need to explicitly join it if it is missing.

Adds a test to make sure that system_metadata is returned
properly from the migration call even though the extra keys
parameter was removed.

Fixes bug 1146000

Change-Id: I05365906ed528a06fe5704449dab72c857fefa65
Fix: Nova aggregate API throws an uncaught exception on invalid host

Add ComputeHostNotFound to the caught exceptions.

Resolves bug 1154138.

Change-Id: I385b88b85caf534f51db70577eb62361e8cc461f
Fix use of potentially-stale instance_type in tenant_usage

The simple_tenant_usage API extension may return incorrect billing
information if a flavor is changed or deleted while an instance using
it is still running. This makes it use the stashed instance_type instead.

Fixes bug 1154707

Change-Id: Ifce33488e5ef8aa942051d882407a3e2d088aaf5
Merge "Virtual Power Driver list running vms quoting error"
Merge "Make run_instance() bail quietly if instance has been deleted"
Merge "Fix use of potentially-stale instance_type in tenant_usage"
Merge "Refactor work with session in db.block_device_mapping_* methods"
Merge "Don't load system_metadata when it isn't joined."
Merge "Fix: Nova aggregate API throws an uncaught exception on invalid host"
Merge remote-tracking branch 'm_src_repo/master' into build-temp