VMware: allow selection of vSAN datastores

With support for handling of stream-optimized disk images added, the
vmware driver is now able to deploy to vSAN datastores, so add support
for the the 'vsan' datastore type, and update the datastore selection
logic to take this type into account when when spawning a
stream-optimized image.

Implements: blueprint vmware-vsan-support
Co-authored-by: Radoslav Gerganov <rgerganov@vmware.com>

Change-Id: Id43ad4adcad212a8e0d8ab3830af62d4afda1442
Compute Add build_instance hook in compute manager

The build_instance hook provides a hook close to the actual spawn
of an instance. It distinguishes itself from the create_instance
hook because, in the case of a successful build, the instance will
exist on the hypervisor when the build_instance post hook is
called, instead of simply just being scheduled as is the case with
the create_instance post hook. This is useful as some details may
not be available until after scheduling.

Co-Authored-By: Corey Wright <corey.wright@rackspace.com>
Change-Id: Ic12abf6315bbc6b010b8222ef296ec65cb4b4f95
rename oslo.concurrency to oslo_concurrency

oslo.concurrency-0.3.0 has moved its path to oslo_concurrency,
the old path oslo.concurrency can still work but is deprecated now.

Change-Id: I1538dad5cbacf1e6041c571d5bc55994689c08b0
Closes-Bug: #1398656
Libvirt: Fsfreeze during live-snapshot of qemu/kvm instances

Currently it is required to execute fsfreeze command manually before
taking snapshots of active instances, otherwise the snapshot may be
inconsistent. When qemu-guest-agent is installed in a kvm instance,
we can request the instance to fsfreeze via libvirt's fsFreeze API
which is introduced in libvirt 1.2.5. To utilize this feature,
the image metadata must have 'os_require_quiesce=yes' property.
'hw_qemu_guest_agent=yes' is also needed to enable qemu-guest-agent.

Implements: blueprint quiesced-image-snapshots-with-qemu-guest-agent
Change-Id: I137efe00839ae0cb35e142b0c8f8d75ae61cfb64
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Merge "Libvirt: Fsfreeze during live-snapshot of qemu/kvm instances"
Merge "Compute Add build_instance hook in compute manager"
Merge "rename oslo.concurrency to oslo_concurrency"
Merge "VMware: allow selection of vSAN datastores"
Refactor unit tests for scheduler weights

Remove external depenencies from scheduler weight tests in an attempt
to make the tests cleaner and to only test the weight code itself.

FakeHostState() is used to avoid having to go through host manager and
then mock it's db calls. Additionally, weigher classes are referenced
directly instead of having the weight handler load them first.

Related to blueprint scheduler-optimization

Change-Id: Ifd3577aec6c5fc82e4864623e0545f380fb75b6e
Make scheduler filters/weighers only load once

Right now, filters/weighers are instantiated on every invocation of the
scheduler. This is both time consuming and unnecessary. In cases where
a filter/weigher tries to be smart and store/cache something in between
invocations this actually prohibits that.

This change make base filter/weigher functions take objects instead of
classes and then let schedulers create objects only once and then reuse
them.

This fixes a known bug in trusted_filter that tries to cache things.

Related to blueprint scheduler-optimization

Change-Id: I3174ab7968b51c43c0711033bac5d4bc30938b95
Closes-Bug: #1223450
Pre-load default filters during scheduler initialization

To avoid a time penalty for the first caller, make scheduler pre-load
default filters at startup.

To avoid extra initialization during testing, stub this out where
applicable.

Related to blueprint scheduler-optimization

Change-Id: Ie982387cc7bb5425e9cb8f4ca328caf6eae35c08
Cleanup and removal of unused code in scheduler unit tests

This change does some refactoring of test_filter_scheduler.py and
additionally remove a bunch of unused scheduler test code.

Change-Id: Ife979bca1699fc06e5a40264ba3e8173b9e0143b