CA-137238: Revert "CA-90424: Does not migrate VDI if it is already migrating."

The added assert meant that we couldn't make use of the queuing
functionality of VM.with_vm_operation. After the change which this
commit reverts, if one of a VM's disks was undergoing a VDI.pool_migrate
then attempting to VDI.pool_migrate another of the VM's disks would fail
immediately with OTHER_OPERATION_IN_PROGRESS.

After reverting this commit, the second VDI.pool_migrate gets queued up
behind the first.

This reverts commit 8598ea5b2dcda479a0c01ee081a3f7f999091087.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1785 from johnelse/ca-137238-xs64bit

CA-137238: Revert "CA-90424: Does not migrate VDI if it is already migrating."
CP-8358: Don't filter out quotes before parsing lspci output

Instead take them into account when doing the sscanf.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Rename field pci.id to pci.pci_id

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Decompose Xapi_pci_helpers.pci into a collection of int64/string pairs

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Add subsystem IDs to PCI objects

PCI objects now have four new fields:

* subsystem_vendor_id
* subsystem_vendor_name
* subsystem_device_id
* subsystem_device_name

If a device doesn't implement these IDs then the fields will be left as
empty strings in the database.

If a device implements the IDs but the IDs are not present in pci.ids,
then the names will be set to "Unknown (xxxx)" where xxxx is the
corresponding ID.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Log the new pci fields after test failures

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Add more tests of lspci subsystem ID parsing

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Typo fix in comment

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Read physical subsystem device from vgpu config files

If the value of plugin0.pdev_id in the config file is of the form

"0x1234"

then store None as the physical subsystem device ID.

If the value is of the form

"0x1234:0x5678"

then store (Some 0x5678) as the physical subsystem device ID.

In both cases 0x1234 will be stored as the physical device ID.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Refactor print_vgpu_conf into two functions

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Print the new psubdev_id on test failure

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Add tests of the vgpu config parser

Includes a couple of example config files.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Log physical subsystem device ID of relevant VGPU types

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Only pass one PCI ID to relevant_vgpu_types

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Take subsystem device ID into account in relevant_vgpu_types

If the VGPU config file specifies a particular physical subsystem ID,
then the device must have the same ID for that VGPU configuration to be
supported.

If the config file doesn't specify a physical subsystem ID, then the ID
of the device doesn't matter.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1787 from johnelse/cp-8358-xs64bit

CP-8358: PCI subsystem device/vendor ID handling
Remove unnecessary scanning indications

This breaks the sscanf in OCaml 4.01.0

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1791 from johnelse/redundant-scanning-indications

Remove unnecessary scanning indications
CA-137468: Wait for ofport to settle before modifying ovs rules

The database may take some time for this value to become valid. Until then it
may return -1. In the VIF plug case we wait for this value to become valid
using the wait-until command provided with ovs-vsctl. For the VIF unplug case
we do not wait because once the value is -1 it will never become not -1 again.
In the case where the ofport returned is -1 (now only the unplug case) we no
longer delete the rules in the flow table since, in some versions of ovs,
the -1 can act as a wildcard in the deletion, deleting far more than desired.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>