Adds factory methods to load Hyper-V utils classes

Blueprint: hyper-v-wmi-v2

This patchset provides further decoupling between the ops modules
(e.g. vmops, volumeops) and the utils modules which handle the
interaction with the underlying OS.

The main reason for this refactoring is the need to provide an
implementation of the Hyper-V WMI V2 API (root\virtualization\v2)
that replace the initial version introduced with Hyper-V Server
2008.

Change-Id: I8a2dd8f7dea2e4044525866a0ab26211eb17bf99
Port server_usage API to v3 part 1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being done in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements blueprint nova-v3-api

Change-Id: Ie5cbde7d9a0d77e78c9f9cc577d8cbd36fb74188
Port server_usage API to v3 part 2

Ports the server usage extension and the corresponding
unittests to the v3 API framework

DocImpact

Partially implements blueprint nova-v3-api

Change-Id: Ic5c14ef83e0ec16f36672377f1daa046044dce78
Support setting block size for block devices

cinder now supports backend with different block sizes. Sometimes
we need to set a specific block size or operations against the
backend will result in I/O errors. Additionally its a good idea
to tune the block sizes to the correct size as it can improve I/O
performance.

The basic disk configuration for libvrit now supports setting the
logical and physical block size of devices.  The block size info
is stored in connection_info of the block_device_mapping table
for later use.

By default it does not set the block sizes which defaults to
512 bytes.

DocImpact:
This feature requires libvirt 0.10.2+ and the QEMU or KVM
hypervisor. If a volume has a custom block size, cinder considers
it required. As such the hypervisor and libvirt version are
checked during the attach_volume call. If the hypervisor is not
supported or the libvirt version is too old the attach is
aborted and an exception is raised.

Change-Id: I77adc96b340680218f82bbef8f9ec14711d26a7f
Fixes Bug #1195913
Fix formatting on scheduler documentation

Change-Id: Ifac98bbd9931d9bf75f73d4263aa77867cf52522
Removed scheduler doc costs section

Since commit 820f43fc (Change-Id
Ie3e7611347c334c359dea98d759345b97c66c9c1)
costs are no longer used, so all references to them have been removed.

Change-Id: I6e02bc47643be9f9dfe9d2e42b2335626bf039e7
Check host exists before evacuate

Before an evacuate is attempted, there is no checks in
place to see if the host exists. This
results in rpc call being made to non existent host.

This patch adds a simple check to both v2 and v3 extensions
to ensure that the compute service exists before we attempt
to evacuate.

Fixes bug 1208369

Change-Id: I07103ecb8310d8a891ee5fb21a1f8aa7427e0d78
xenapi: send identity headers from glance plugin

Send identity headers while uploading/downloading images from glance. Related
to:

1) Add identity headers while calling glanceclient from nova
Ife02059abbdce7920f1f408b71e9745d777fa770

2) Pass identity headers received in glanceclient to nova
Ifbef582aa4e64a2e7a46db43a9cc6cf8c3531dbd

3) Pass identity headers received by glance api to glance registry
Ie5f07ed6dfeaa8428de4f79c4d40d182328e6ab4

NOTE: since this is a change to a Dom0 plugin API, it requires the lock-step
upgrade of both the compute-manager and the dom0 plugin.

DocImpact

Change-Id: I6d5e3448d2c0acc392d18e0b88cec25cf313da5b
Fix simultaneous timeout with smart iptables usage

Simultaneous boots were getting timeouts in allocate_for_network.
This was due to our inefficient use of iptables where we attempt
to recreate the same rules over and over using initialize_gateway,
plug, and restart_dhcp.

This patch makes the iptables code a little bit smarter by only
shelling out if the rule list has changed. Note that there is
a small difference in the interpretation of duplicate rules.
Previously, the last copy of the rule would win whereas now
the first copy of the rule will win. Multiple copies of the same
rule were never supported. This means the only thing that one
needs to remember is it is necessary to remove a rule and re-add
it if you want to move it later in the list.

Fixes bug 1199433

Change-Id: I9920f8d6aa269d9b3bfd88a8dbbb00f859deb158
Merge "Check host exists before evacuate"
Fix typo with network manager service_name

Obviously a typo in I02ab1970578bc53ba26461b533d06d1055c2d88e which
appeared between patch sets 5 and 6. Who was the lame reviewer who
missed it? Oh, that would be me.

Change-Id: Ifb9007d8e5c696ee8fd6ef74bd5bc280e331b8bd
Merge "xenapi: send identity headers from glance plugin"
Merge "Adds factory methods to load Hyper-V utils classes"
Merge "Port server_usage API to v3 part 1"
Merge "Port server_usage API to v3 part 2"
Merge "Support setting block size for block devices"
Merge "Fix formatting on scheduler documentation"
Merge "Removed scheduler doc costs section"
Merge "Fix simultaneous timeout with smart iptables usage"