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
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
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
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"