xenapi: virt rescue method now supports objects

Commit a37a96fd13b933123e80ad24e37fc37d73c16059 ensured
that the compute API and manager are now getting objects
for the rescue method.

This patch adds support to the virt driver code.

Change-Id: I06e5032526f791dfc0c523f2302d2edff5023f78
Replace assertTrue(not *) with assertFalse(*)

Replacements were done in tests to have
clearer messages in case of failure

Change-Id: I7eedc62e0d570ee5818c4aa9b28ad8163c63b775
Replace assertTrue/False with assertIn/NotIn

The following replacements were done in tests to have
clearer messages in case of failure:
- assertTrue(* in *) with assertIn
- assertTrue(* not in *) with assertNotIn
- assertFalse(* in *) with assertNotIn

assertTrue/False with custom error messages weren't
replaced because assertIn/NotIn doesn't have argument
'message' and we'll lose error messages if we replace it.

Also assertTrue/False with operator 'any' were
replaced with more simpler asserts assertIn/NotIn.

Change-Id: If5e78db21d5302259a4d69fd82c62baf39a5d8f8
VMware: validate the network_info is defined

Ensure that the network info is defined correctly prior to allocating
networks.

Commit 6fb9cc8b278ceab05e65e1c5145141203211d246 caused a degradation.

Change-Id: I74eddc0ff744ee5d80df825a52527c67583bacea
Fixes Hyper-V SCSI slot selection

Currently, when attaching volumes, the Hyper-V driver selects the
slot on the SCSI controller by using the number of drives
attached to that controller.

This leads to exceptions when detaching volumes having lower
numbered slots and then attaching a new volume, as Hyper-V will
then try to use an occupied slot.

This patch fixes the issue by simply getting a list of used slots
and getting a slot that it's not among those. It also checks
for the slot number to be smaller than the maximum number of slots
per SCSI controller.

Fixes bug: #1329764

Change-Id: Id0c09c4debc848004a78971670cc3caef2f77ce3
VMware: DatastorePath join() and __eq__()

There are quite a number of use cases where we construct additional
datastore paths out of one representing some ancestor directory,
so implemented a join() method that allows for just that.
It is useful to define equality operator when comparing two DatstorePath
objects, so added that as well.

partial blueprint vmware-spawn-refactor
Change-Id: Iec44fdd0beba232b57bcd0a07c39e628208ca9b2
Merge "Replace assertTrue/False with assertIn/NotIn"
Merge "Fixes Hyper-V SCSI slot selection"
Merge "VMware: validate the network_info is defined"
Merge "Replace assertTrue(not *) with assertFalse(*)"
Merge "VMware: DatastorePath join() and __eq__()"
Merge "xenapi: virt rescue method now supports objects"