Implements config_drive as extension

Adding config drive as an extension allows users to turn it off in case they
do not want to use it. Config drive was not intended to be a part of the core
functionality.

Fixes bug 833331

Change-Id: Icf4b5a21d8cc9df0f140a1a87908ff48c447004b
Revert "Add additional capabilities for computes"

This reverts commit bd30eb36bbf2c5164ac47256355c543f6b77e064.

From the original commit message:
" This is an interim solution to provide this functionality until
  it is replaced by more general HostAggregate functionality later
  in Folsom."

Now that general host aggregates is in, this is ready to be removed.

Partially implements blueprint general-host-aggregates

Change-Id: Ic5f418a5d15117888198c79c3a32cec8f19d1a88
Send a full instance via rpc for inject_file.

Change the inject_file 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: Ife38a87cb8a597b40b2b87d9a6a8c7e81d4439c4
Send a full instance via rpc for inject_network_info.

Change the inject_network_info 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: I1bcf55e2819be321c3ea0a64fe136cd993a2443b
Send a full instance via rpc for post_live_migration_at_destination.

Change the post_live_migration_at_destination 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.

The method got moved in rpcapi.py, but that was just to restore
alphabetical order.

Part of blueprint no-db-messaging.

Change-Id: Ib36cb065f838f644e97b6e82b39409737df15558
Make instance_uuid backwards compat actually work.

In some refactoring of the decorator modifications I made for
eebc64f949ccb2acb7462efc18f538f1827985af, I ended up breaking the case
where an instance_uuid was passed to one of the methods that is supposed
to be able to accept either an instance or instance_uuid.  Oops.  :-(

This patch makes them work again, and adds one unit test that
verifies that it works.

These decorators are really ugly right now, but keep in mind that the
2-version stuff is temporary.  As soon as this patch series is finished
(changing methods to take an instance), these decorators will get
simplified.

Part of blueprint no-db-messaging.

Change-Id: Ic1b1269d90e147035c4eb7b4bd47de81eff3ffdc
Send a full instance in power_off_instance and stop_instance.

Change the power_off_instance and stop_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: I641d5e7941c7de430c0ca3c9b961f967d947d963
Send a full instance in power_on_instance and start_instance.

Change the power_on_instance and start_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: I5a95e72c6441f47f014dbcd52f346e8d2e94069c
Send a full instance in pre_live_migration.

Change the pre_live_migration 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: Ib628d375254fc1539cd79ceaaad83c1c326863b4
Don't store system_metadata in xenstore

Fixes bug 1029774

system_metadata should not be exposed to users.

This reverts part of commit 82afe7ad5 / ChangeID I88a59f1b783

Change-Id: Id454dbcbafef861db3f88620a56d8dd2ccd30e1d
Sanitize xenstore keys for metadata injection

Xenstore only allows certain characters in key names.  Change disallowed
characters as well as '/' to '_'.

Fixes bug 1029773

Change-Id: I04055bfbe662f3f3e9d90336d03670aa5468e780
Moving where the fixed ip deallocation happens.

Fixes bug 1021352.

In network/manager/deallocate_fixed_ip the call
to mark the IP as no longer allocated occurs before
the call to update security group rules. This means
that if an error occurs in the security group
processing, or if for some reason it is very slow
there is a risk that that the address is reused by
another tenant before the rules relating to this address
have been fully revoked.

Moving the db call to after the call to trigger the
security group refresh would avoid the issue when an
error occurs (the fixed_ip should not be released in
this case).

Change-Id: Iaba1af5c9a17fbbb82e42522b1060773de61550a
Merge "Send a full instance via rpc for inject_file."
Merge "Send a full instance via rpc for inject_network_info."
Merge "Send a full instance via rpc for post_live_migration_at_destination."
Merge "Make instance_uuid backwards compat actually work."
Merge "Send a full instance in power_off_instance and stop_instance."
Merge "Send a full instance in power_on_instance and start_instance."
Merge "Send a full instance in pre_live_migration."
Merge "Moving where the fixed ip deallocation happens."