nova/nova/tests/unit/virt/libvirt
Hemanth Nakkina 73e631862a Update pci stat pools based on PCI device changes
At start up of nova-compute service, the PCI stat pools are
populated based on information in pci_devices table in Nova
database. The pools are updated only when new device is added
or removed but not on any device changes like device type.

If an existing device is configured as SRIOV and nova-compute
is restarted, the pci_devices table gets updated but the device
is still listed under the old pool in pci_tracker.stats.pool
(in-memory object).

This patch looks for device type updates in existing devices
and updates the pools accordingly.

Conflicts:
      nova/tests/functional/libvirt/test_pci_sriov_servers.py

To avoid the conflicts and make the new functional test execute,
following changes are performed in the new test case
- Passing hostname as argument to self._get_connection() is not
  supported in stable/stein and hence dropped the argument.
- Compute nodes cannot be retreived by host and nodename should
  also be included in stable/stein. So modified the function call
  to use objects.ComputeNode.get_by_host_and_nodename instead.

Change-Id: Id4ebb06e634a612c8be4be6c678d8265e0b99730
Closes-Bug: #1892361
(cherry picked from commit b8695de6da)
(cherry picked from commit d8b8a8193b)
(cherry picked from commit f58399cf49)
(cherry picked from commit 8378785f99)
2021-01-21 10:08:15 +05:30
..
storage Fix python3 compatibility of rbd get_fsid 2019-06-18 12:33:08 +01:00
volume Fixes multi-registry config in Quobyte driver 2019-05-24 16:03:52 +02:00
__init__.py
fake_imagebackend.py Pass disk_info dict to libvirt_info 2018-11-02 13:54:13 +00:00
fake_libvirt_utils.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
fake_os_brick_connector.py Switch to using os-brick 2015-07-27 10:47:22 -07:00
fakelibvirt.py Update pci stat pools based on PCI device changes 2021-01-21 10:08:15 +05:30
test_blockinfo.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
test_compat.py Workaround for race condition in libvirt 2015-03-14 20:17:41 -03:00
test_config.py Use assertXmlEqual() helper for all XML comparison tests 2019-03-08 11:40:41 +00:00
test_designer.py add mtu to libvirt xml for ethernet and bridge types 2018-06-06 09:39:40 -04:00
test_driver.py libvirt:driver:Disallow AIO=native when 'O_DIRECT' is not available 2020-09-11 12:26:06 +01:00
test_fakelibvirt.py Use assertXmlEqual() helper for all XML comparison tests 2019-03-08 11:40:41 +00:00
test_firewall.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_guest.py libvirt: Do not reference VIR_ERR_DEVICE_MISSING when libvirt is < v4.1.0 2020-08-28 13:42:55 +02:00
test_host.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
test_imagebackend.py Make RBD imagebackend flatten method idempotent 2020-04-23 15:53:10 +00:00
test_imagecache.py Guard against missing image cache directory 2020-07-10 07:39:22 +00:00
test_migration.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
test_utils.py libvirt: Provide the backing file format when creating qcow2 disks 2020-03-02 14:53:26 +00:00
test_vif.py Allow tap interface with multiqueue 2020-10-13 11:23:57 -03:00