Make libvirt use Flavor object instead of using VirtAPI

This makes the libvirt driver use the Flavor object instead of
getting that information through the VirtAPI/conductor call.

Related to blueprint compute-manager-objects

Change-Id: I484c98068a46c9780d82c886779eb58e783f9b6f
Group kvm image_meta tests for get_disk_bus

Refactoring test_get_disk_bus to eliminate duplicate code by
adding a loop to the image_meta tests.

Change-Id: Id8f342a0739db01635c2ca925788d7a258f8a478
XenAPI: Add the support for updating the status of the host.

  We added a function into the xenhost plugin to get information
about PCI devices. Roughly we run the lspci command on dom0. This
information will be used to get the list of pci devices  that are
passed on the pciback.hide dom0 command line.

  The hide option is used to hide the devices from the normal guest
drivers and assign them to the pciback kernel driver at boot on dom0
instead of their normal driver. We will parse the output of the lspci
command to find which device is using the pciback kernel driver and
thus to know if it has been passed to the pciback.hide option.

  This information will be used to perform the match with the
list of pci devices provided in pci_whitelist into /etc/nova/nova.conf.

Implements: blueprint pci-passthrough-xenapi

Change-Id: I465fc5d29f3c47ab0079adcfcc2d7d6501bd4b20
XenAPI: Add the mechanism to attach a pci device to a VM.

 Before booting a VM we check if there are PCI devices reserved
by this VM and if there are any we attach them.

 A PCI device can be asked by a VM by choosing a flavor that
request PCI devices. See the wiki about pci passthrough for more
details:

https://wiki.openstack.org/wiki/Pci_passthrough#Create_a_flavor

 We are attaching a PCI device by adding a key "pci" to the
"other-config" parameter of a VM.

Change-Id: I4aca96b11f931f70cf6442adac64e867ce1affb6
Implements: blueprint pci-passthrough-xenapi
MetricsWeigher: Added support of unavailable metrics

This patch added the support of unavailable metrics in the metric
weigher. Based on the configuration, if an unavailable metric is met,
the metric weigher might either throw an exception, or return an
configurable weight value.

This is part of the blueprint utilization-aware-scheduling.

DocImpact: Added support of unavailable metrics. 2 new config options
are added, 1) 'required' is a boolean option indicating whether all
the metrics set by 'weight_setting' are needed to be available when
calculating the weight. 2) 'weight_of_unavailable' is a float option
specifying the value to be returned if the metrics is unavailable. See
etc/nova/nova.conf.sample for details.

Change-Id: Icb951605aae28487b00a12d172a3ac4dafda2cdb
libvirt: remove retval from libvirt _set_host_enabled()

This is an internal method since commit e1fdd8f and the return value
is currently unused, so remove it.

Change-Id: I63f4ea7fdb5218c985cad73e7c795b4329f7b4c9
Treat port attachment failures correctly

Raise a more appropriate exception following the failure of a
port attachment.

Closes-bug: #1245683

Change-Id: I77e9568c8675b0dd6a0c8c741e71e936ed3998a1
Imported Translations from Transifex

Change-Id: I7473dd1635f326fb9a50a95e42c57341c36a5609
Remove unused notifier and rpc modules from oslo sync

As part of the move to oslo.messaging (1a91aacb85922f8d74733979691f0bf26249debc)
we stopped using oslo-incubator's notifier and rpc, but openstack-common.conf
wasn't updated accordingly.

Change-Id: I11e17313afa0327ba4620dd8f08ecf379efef9ac
Merge "Treat port attachment failures correctly"
Merge "Group kvm image_meta tests for get_disk_bus"
Merge "libvirt: remove retval from libvirt _set_host_enabled()"
Merge "XenAPI: Add the support for updating the status of the host."
Merge "XenAPI: Add the mechanism to attach a pci device to a VM."
Merge "Imported Translations from Transifex"
Merge "Remove unused notifier and rpc modules from oslo sync"
Merge "MetricsWeigher: Added support of unavailable metrics"
Merge "Make libvirt use Flavor object instead of using VirtAPI"