Fix libvirt rescue to work with whole disk images

 * fixes bug 1007266
 * passes rescue image data to get_config so it only adds
   the kernel and ramdisk if necessary
 * adds tests to make sure that the kernel and ramdisk
   only appear if they are needed

Change-Id: I32e0369a066ce2b6189b4a015b30ffd8b6d3ec66
Implements resume_state_on_host_boot for libvirt.

Adds a new virt driver function to help resume guest states
on host boot. This fixes a couple issue with using a reboot
(like we did previously):

 * Using reboot would clear some task states (VERIFY_RESIZE for example)
 * Provides a mechanism for hypervisor specific guest restarts.
   Reboot would not have worked for XenServer for example...
 * Updates libvirt to use a hard reboot (instead of soft)

Fixes LP Bug #985162.

Change-Id: Iaf5aad75ec9b91f44710a18ddaf3a93378573a62
Make live_migration a first-class compute API.

* Move the trivial implementation from admin_actions to compute.api
* Remove the dependency to scheduler from admin_actions
* Add check_instance_state like all other compute APIs to prevent
undesirable behavior

Change-Id: Ib5176718eae624de982f641bf3ec201fc7b4efcc
Fix bug 1006664: describe non existent ec2 keypair

Change-Id: I92bfd6b51aa31abb06e21893174101da31baffd8
Update libvirt imagecache to support resizes.

Updates the libvirt image cache manage so that it accounts
for instances which are resizing.

Also fixes an issue where an exception was thrown when
the image cache manager ran while instances were resizing.
This is because instances which are resizing may have files in the
Nova instances directory which are missing backing files.

Fixes LP Bug #1006616.

Change-Id: I724c6855b68eca24a00893fd96b26b1443f9da5c
Merge "Implements resume_state_on_host_boot for libvirt."
Fix whitespace in sqlite steps

Change-Id: Ieab9c492aa526903c55f17b87b70fe7c25372f5e
Merge "Update libvirt imagecache to support resizes."
Refactor libvirt create calls

 * minimizes duplicated code for create
 * makes wait_for_destroy happen on shutdown instead of undefine
 * allows for destruction of an instance while leaving the domain
 * uses reset for hard reboot instead of create/destroy
 * makes resume_host_state use new methods instead of hard_reboot
 * makes rescue/unrescue not use hard reboot to recreate domain

Change-Id: I2072f93ad6c889d534b04009671147af653048e7
Cleans up power_off and power_on semantics

compute.api changes:
  * improves state handling for delete/restrore
  * removes hack to deal with SHUTOFF on start
  * fixes api tests (volume shouldn't detach on stop)

compute.manager changes:
  * uses power_off/power_on for stop/start

virt.libvirt changes:
  * implements power_off/power_on for libvirt
  * synchronizes usage of domain.create()
  * cleans up usage of instance.name
  * added tests for power_on and power_off
  * fixes bug 1006950

Change-Id: I91845a643e3f97955e7c81ca57c6ee5aa0a3d295
Merge "Make live_migration a first-class compute API."
Merge "Fix libvirt rescue to work with whole disk images"
Merge "Fix whitespace in sqlite steps"
Merge "Refactor libvirt create calls"
Merge "Fix bug 1006664: describe non existent ec2 keypair"
Don't query nova-network on startup.

Fix bug 999698.

nova-compute requested network info for each instance on startup via rpc.
If all services get (re)started at the same time, nova-network may not
be available to take this request, resulting in a lost request.  To
combat this issue, get the network info from the cache in the database
on startup.  If by some chance this information is not correct, it will
get fixed up by a periodic task.

Change-Id: I0bbd475e078ac2a67c99c2be4711e86d617c609a
Replace standard json module with openstack.common.jsonutils

Implements blueprint use-common-jsonutils

1. Edit openstack-common.conf and import nova/openstack/common/jsonutils.py
2. Remove json package imports and replace with jsonutils

Places where using json.load hasn't changed.

Change-Id: Ie6feab605fb0474fd505c56ef57b7a9ecfa5269d
Convert consoles to use instance uuid.

Continued work on blueprint finish-uuid-conversion.

Change-Id: I4032419d66e9bbb17b770d8974a92a136bf9c5d2
Merge "Cleans up power_off and power_on semantics"
Finalize tox config.

Shrink tox.ini to the new short version.
Fix the test cases to be able to be run in nosetets plus the
openstack.nose_plugin, which finally removes the need for
nova/testing/runner.py
Also, now we'll just output directly to stdout, which will
make nose collect the trace logging directly and either output
it at the end of the run, or inject it into the xunit output
appropriately.

Change-Id: I1456e18a11a840145492038108bdfe812c8230d1