libvirt: Avoid Glance.show on hard_reboot

When a Libvirt host is rebooted, we can optionally choose to automatically
spin back up the instances using the `resume_state_on_host_boot` call. This,
in turn, uses `_hard_reboot` to bring back the instances.

The problem is that `_get_guest_xml` which `_hard_reboot` is using is always
making a call to Glance.show since `image_meta` isn't being passed into it. In
addition to this being an extra latency-heavy call, this is big problem
because the request is *server-generated* not *user-generated* so we won't
have the necessary user-request context to make the Glance call.

In the absense of a general user-impersonation mechanism, the current
workaround is to use cached image-metadata, which works in this case as well.

So the fix is to pass that `image_meta` that we already pull from instance
metadata in `_hard_reboot` and pass it into `_get_guest_xml` and thus avoid
the extra request to Glance.

Change-Id: I2203ac709405ee784ee5ec017aa475575a46a0df
Closes-Bug: 1339386
VMware: power_off_instance support

Commit 1e1915aaaca38b5691794e0e052a42b9d95dd3c2 introduced a new
utility method to shutdown a VM. This will now be moved to vm_util
similar to refactoring in blueprint vmware-spawn-refactor.

This patch does the following:
1. Creates a vm_util method - power_off_instance.
2. Corrects the unit test for the unrescue. That did not correctly validate
   the correct vm ref for the power off
3. Added specific tests for the new method that has been added
4. Drops the test test_power_off_suspended as this is not a valid test
   case.

Change-Id: I6b7c260488bbd0278f6e7ce98be77e958f1576ab
Turn periodic tasks off in all unit tests

We shouldn't rely on periodic tasks to randomly run in unit tests,
instead if we need them to run we should explicitly call them out.

Change-Id: I35850c47288e50d3146771dc7a9a54d62e36c3cf
Related-Bug: 1311778
Revert "Add extensible resources to resource tracker"

This bug added a regression to both nova-bm and ironic,
neither can deploy instances.
Fixes-bug: #1347795

This reverts commit 50b4ba4ee583d25eef10a6608172c002f9bec6f2.

Change-Id: Icc8d629467911972480b633c7808a0964c9f1c7d
Augment oslo's default log levels with nova specific ones.

Thanks to I49a82c5b3446784d254ca558f51b6c3e5c2028eb, we can augment
oslo's set of default log levels with project specific ones.

Add keystonemiddleware as warn level since its verbose and nova isn't
trying to debug keystonemiddleware.

Add routes.middleware since this generates 3 log entries per API request
and doesn't help make debugging easier.

Change-Id: Ib5164a22c5cbfa4f9d881b97bb1f623cd4d2f3f3
reduce network down time during live-migration

Called unplug_vifs() method before post_live_migration_to_destination call
because floating ip address will not work until the vifs are unplugged
from the source compute node.

Added new method post_live_migration_at_source in virt driver and
implemented it in libvirt driver to unplug the vifs at source. Other
drivers will raise NotImplementedError.
Added new keyword argument destroy_vifs to cleanup() method to verify
if unplug_vifs() is already called then do not call it again.

Closes-Bug: #1284996
Change-Id: Ida3ed3bef77239e5a0fdbf8866e8a4421d4f8222
Add Hyper-V driver in the "compute_driver" option description

The description of the option "compute_driver" should include
hyperv.HyperVDriver along with the other supported driver.

Change-Id: Ic7e16fd5154609987b2ef0b6f8ee52619ccf489c
Closes-bug: #1347777
Fix the i18n for some warnings in compute utils

Change-Id: I82a5602bdbecb931c046bb693f16917f38a075fb
Merge "VMware: power_off_instance support"
Merge "reduce network down time during live-migration"
Merge "libvirt: Avoid Glance.show on hard_reboot"
Merge "Revert "Add extensible resources to resource tracker""
Merge "Turn periodic tasks off in all unit tests"
Merge "Fix the i18n for some warnings in compute utils"
Merge "Augment oslo's default log levels with nova specific ones."
Merge "Add Hyper-V driver in the "compute_driver" option description"