Add image_name to create and rebuild notifications

Fixes bug 1027197

Without image_name in notifications, one has to use the image_ref
and hit glance again.
The create and rebuild functions already contain image_metadata, hence
adding the image_name in their notification can prevent additional
call to glance.

Change-Id: I3813eafa24b125575bcdceac8d30ab6bd909cfe4
Provide rootwrap filters for nova-api-metadata

The metadata service in nova-api needs access to
ip[6]tables-{save-restore} to accept connections to the
metadata service. This change adds an api-metadata.filters file
that needs to be deployed on setups running nova-api-metadata
or nova-api with "metadata" in enabled_apis.

Fixes bug 1002111.

Change-Id: I5aecb223876e12550394f31dbc7df893868baa8b
Merge "Provide rootwrap filters for nova-api-metadata"
Merge "Add image_name to create and rebuild notifications"
Update decorators in compute manager.

This patch modifies two decorators in the compute manager:
checks_instance_lock and wrap_instance_fault.  Both of these assumed that
the function they are wrapping takes two positional arguments: context
and instance_uuid.  They will automatically adapt to the new form that
the functions they wrap will be taking.  These functions will all be
modified to take either a full instance dict or an instance_uuid for
backwards compatibility.

Part of blueprint no-db-messaging.

Change-Id: I93e331706aed1c97877655ce54784a0dbd8de89e
Include name in a primitive Instance.

This ensures that the name of an instance will be present in the result
of jsonutils.to_primitive(Instance).  The name isn't a column.  It's a
property that gets generated dynamically by the Instance class.

Part of blueprint no-db-messaging.

Change-Id: I45914ed55f2c037ee2efd7775bd57fbde36a2116
Convert reboot_instance to take a full instance.

Convert the reboot_instance method in the compute rpc API to take a full
instance via rpc instead of just the instance UUID.  This cuts down on
database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: Id2c455f66966a9b446e5bbbe542ed3a2b0655289
Don't use rpc to lock/unlock an instance.

Instead of converting this method to send a full instance over rpc
instead of just an instance UUID, this patch removes the usage of rpc
for this operation entirely.  All it's doing is a database update.  RPC
is expensive, so cut out the middle-man.

One functional difference with this approach is that the db update is
now synchronous on the API node, instead of kicking off an async message
to a compute node to handle it.  This seems fine, though.

Part of blueprint no-db-messaging.

Change-Id: I15ceb7625425ab097eebd5b7dd3606a171329f97
Send a full instance via rpc for (un)pause_instance.

Change the pause_instance and unpause_instance methods of the compute
rpc API to take a full instance over rpc instead of just the instance
UUID.  This cuts down on database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: Ia7e31428c7d2edb9a0c4d0958f1c7774742ea1cd
Send a full instance via rpc for suspend_instance.

Change the suspend_instance method of the compute rpc API to take a full
instance over rpc instead of just the instance UUID.  This cuts down on
database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: If881fb419a52a2486b2e7b85b4d58a17f72c48a6
Send a full instance via rpc for get_console_output.

Change the get_console_output method of the compute rpc API to take a
full instance over rpc instead of just the instance UUID.  This cuts
down on database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: I114081fceddc2c7226aab9bd560f3664000a43af