nova/nova/tests/unit/pci
Hemanth Nakkina 1fb4cc03e3 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
    nova/tests/unit/virt/libvirt/fakelibvirt.py

The functional test requires to skip the capabilities of pci
device. This can be done by getting capability template out of
pci_dev_template [1] which is introduced by commit
b927748c25. Not able to clean
backport the mentioned commit and so removed funtional test
case.

[1] b0a451d428/nova/tests/unit/virt/libvirt/fakelibvirt.py (L186)

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)
(cherry picked from commit 73e631862a)
2021-02-15 12:07:39 +00:00
..
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fakes.py pci: avoid parsing whitelist repeatedly 2016-03-09 18:49:15 +00:00
test_devspec.py Merge "pci: Validate behavior of empty devname" 2017-09-21 13:57:54 +00:00
test_manager.py PCI: do not force remove allocated devices 2019-02-05 23:29:36 +00:00
test_request.py Add PCI NUMA policies 2017-12-22 15:59:54 +00:00
test_stats.py Update pci stat pools based on PCI device changes 2021-02-15 12:07:39 +00:00
test_utils.py Fix non-existent method of Mock 2019-08-16 09:13:37 +09:00
test_whitelist.py Enhance PCI passthrough whitelist to support regex 2016-12-11 00:53:14 +02:00