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
compute: format_message is a method not an attribute

The method format_message used to convert an exception to a string
it uses as an attribute. This patch fix the problem.

Change-Id: Ia1af1644f64d9d12edc905d2ec613aef1927e644
VMware: remove unused class

The Failure class has not been used since it was added
to the code base. This was done in the commit below:-
https://code.launchpad.net/~citrix-openstack/nova/vmware-vsphere-support/+merge/53060

Change-Id: Ib4f0372f847bcbefde27c02b6ce01202482a46c0
Merge "Replace assertEqual(None, *) with assertIsNone in tests"
Merge "Update the mailmap"
Merge "Fix break in vm_vdi_cleaner after oslo changes."
Merge "VMware: remove unused class"
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
Merge "libvirt: making set_host_enabled to be a private methods"
Disable IGMP snooping on hybrid Linux bridge

By default, Linux bridge activates the IGMP snooping on his switch.
It is unnecessarily on Linux bridge created by OVS/VIF hybrid vif
drivers because that switch is limited two ports.

That patch also refactoring OVS and IVS plug and unplug unit tests of the
hybrid drivers.

Closes-Bug: #1276038
Change-Id: Ib8bb1874d7a300fddffdc76ba67851109248bebf
VMware: raise more specific exceptions

In certain cases the exception handling for backend errors
would be handled too broadly. This patch elevates the backend exception
to the application so that it can treat specific errors.

In the application we can now handle the following specific exceptions:
 - FileAlreadyExists - for example when moving a directory to a directory
                       that already exists
 - InvalidProperty - for example when using neutron and opaque networks
                     are not supported
 - AlreadyExists - for example a port group already exists
 - NotAuthenticated - for example the operation is denied as because a
                      session is not established

Related-Bug: #1266579
Related-Bug: #1266580
Closes-bug: #1276539

Co-authored-by: Matthew Booth <mbooth@redhat.com>
Change-Id: I0873f570d97345208c8d9b5bcbb5a980a7a58f9d
VMware: prevent race for vmdk deletion

Prevent a race condition for the deletion of a file when there
is more than one process trying to erase the file.

In the application we can now handle the following specific exceptions:
 - CannotDeleteFile - the file cannot be deleted
 - FileFault - a file access exception
 - FileLocked - an attempt is made to lock a file that is
                already in use
 - FileNotFound - the specific file does not exist

Change-Id: I58e07b9e630c063f894cbbb138612a39e912acd5
Closes-bug: #1266580
Add boolean convertor to "create multiple servers" API

"create multiple servers" API contains "return_reservation_id" as an
attribute, and the attribute should be boolean. There are the other
boolean attributes such as "on_shared_storage" of evacuate API, they
can be passed with either boolean or string(e.g. "True"). For the
consistency of whole Nova APIs, this patch adds boolean convertors to
multiple_create API.

Change-Id: Id6f458a2ced869a31d5d25d661309973132e9360
Closes-Bug: #1281440
Merge "Support setting a machine type to enable ARMv7/AArch64 guests to boot"
Add experimental warning for Cells

When we merged Cells a while back, we noted that the usage was
experimental but haven't had a good channel for communicating the
continued state to the user. Since we're adding warning messages
to virt drivers, this patch adds one for Cells as well, in the
Manager's init method.

Change-Id: I75b0bedf57250e7701b00f9ce0f60e4775eacfd7
Merge "Make floating_ips module use FloatingIP for all get queries"
Merge "Make floating_ips module use FloatingIP for (de-)allocations"
Merge "Make floating_ips module use FloatingIP for updates"
Merge "Convert add_fixed_ip_to_instance to objects"
Merge "Add experimental warning for Cells"