CA-136885: Populates the gateway and dns fields for DHCP pifs

Signed-off-by: Ravi Pandey <ravi.pandey@citrix.com>
Merge pull request #1781 from ravippandey/ca-136885

CA-136885: Populates the gateway and dns fields for DHCP pifs
CA-134972: fix a tight loop getting xenops updates

Each barrier injected among the xenops events now holds a snapshot of
the event id counter as well as the set of events. The get function uses
this to select only the barriers newer than the "from" parameter, and
returns it as the "id of latest thing found" if it is newer than all the
events. If there are no barriers or events to return then the function
waits: this behaviour is unchanged, but now there will be no barriers to
return if there are barriers but they are all too old to be of interest
to the caller.

This means a client no longer keeps calling repeatedly with the same
"from" and getting back the same result (one or more barriers, no events
and the same next-id as the "from" param).

Because each barrier has an extra int associated with it, the formats
for RPC and Dump have changed in a backwards-incompatible way.

This commit also adds just a little debug-logging.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Merge pull request #1784 from thomassa/xenopsloop-ca-134972

CA-134972: fix a tight loop getting xenops updates
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>
Rename field pci.id to pci.pci_id

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

Signed-off-by: John Else <john.else@citrix.com>
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>
Log the new pci fields after test failures

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

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

Signed-off-by: John Else <john.else@citrix.com>
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>
Refactor print_vgpu_conf into two functions

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

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

Includes a couple of example config files.

Signed-off-by: John Else <john.else@citrix.com>