Fixes Hyper-V agent force_hyperv_utils_v1 flag issue

WMI root\virtualization namespace v1 (in Hyper-V) has been removed
from Windows Server / Hyper-V Server 2012 R2.

Hyper-V compute agent now creates instances which uses
root\virtualization\v2 namespace if the agent's OS is
Windows Server / Hyper-V Server 2012 R2 or newer.

Closes-Bug: #1344036

Change-Id: I874ade4456b92a63959a765c7851bcd001befa32
Updated from global requirements

Change-Id: I21afa9b0b3465ef24246a5c20bc7ebfcd2f6b780
virt: helper for processing NUMA topology configuration

Add helper class / methods to nova/virt/hardware.py to assist
in handling the various NUMA related image & flavor extra spec
properties and calculating host usage.

Blueprint: virt-driver-numa-placement
Change-Id: I46c92166d5252f3bf9867dc08935df8c636d9b7d
Add dict and json methods to VirtNUMATopology classes

We will need to serialize and de-serialise these, so we add a method to
base Cell and Topology classes that will handle transformations to and
from JSON. Internally this uses (also newly added) _{to,from}_dict()
methods, which are handy to have (especially for testing), but should
not be used outside of the serialization logic.

We also add defaults to the VirtNUMATopologyCellUsage for the usage
bits, and add a class attribute 'cell_class'  to VirtNUMATopology that
makes it possible to write most of the serialization methods in a
more general manner.

Blueprint: virt-driver-numa-placement
Change-Id: I552d642994f273215c307da7e0f11d77ee410acb
Direct-load Instance.fault when lazy-loading

This breaks out instance.fault lazy-loading from the other attributes,
since we have a direct and more efficient way of fetching the fault than
re-querying the entire instance with the fault attached.

This also should help address fault-related races in the API where a
list of instances is queried, one of those is deleted, and the fault
attribute later triggers an InstanceNotFound whilst trying to do the
lazy-load.

Change-Id: Iceb552663db93fa2a01fb90ece0c1eebecdb783f
Closes-bug: #1352659
Include child_versions in object hashes

This adds the child_versions array to the object hash test. This helps
remind contributors and reviewers that changing that mapping also requires
a bump to the list object version.

Change-Id: Ieb9c6ebe0dc1ca65d0541187fcbba4e73fe0f8d1
Pull transfer module unit tests from glance tests

Separates the unit tests of the file transfer download module (the only
one that is implemented in nova.image.download) out into its own unit
test file test_transfer_modules.py out of test_glance.py. In the
process, properly limited the unit test boundaries of the transfer module
unit tests to just the transfer module class' download() method, instead
of testing all the way through the GlanceImageService class
unnecessarily (since that is already tested thoroughly in
test_glance.py). As an added benefit, the unit tests of the download and
transfer module stuff went from around 4 seconds to less than a
quarter-second for all the tests.

Change-Id: I2ff6e31359d343b78dc4d03cf2beafd8a99b0a29
Removes GlanceClient stubs

Refactors the tests in nova.tests.image.test_glance that were checking
the behaviour of both the GlanceClientWrapper retry logic and the
glanceclient.Client creation to use mock instead of the FakeGlanceClient
in nova.tests.glance.stubs. The fake stub client was actually masking
issues in the existing test cases, including not properly checking the
identity headers that are actually supplied to the real
glanceclient.Client constructor.

Change-Id: I1c114df8e4ab2fccd966ed4af22181881590c443
Partial-bug: #1293938
Merge "Pull transfer module unit tests from glance tests"
Merge "virt: helper for processing NUMA topology configuration"
Merge "Add dict and json methods to VirtNUMATopology classes"
Merge "Fixes Hyper-V agent force_hyperv_utils_v1 flag issue"
Merge "Direct-load Instance.fault when lazy-loading"
Merge "Include child_versions in object hashes"
Merge "Removes GlanceClient stubs"
Merge "Updated from global requirements"