diff options
author | Vladik Romanovsky <vromanso@redhat.com> | 2015-11-23 23:43:07 -0500 |
---|---|---|
committer | Nikola Dipanov <ndipanov@redhat.com> | 2016-01-11 11:18:13 +0000 |
commit | 50355c4595e08f293f610da32247e405b20c1c5b (patch) | |
tree | bd4210fb323df40337689df60d62f59a0d2704ed /nova/tests/unit/pci/test_stats.py | |
parent | 5b13f1d0c533944115f4da4e85e6ddafc5d93037 (diff) | |
download | nova-50355c4595e08f293f610da32247e405b20c1c5b.tar.gz |
objects: adding a parent_addr field to the PciDevice object
The parent_addr field will help identify the relationship between
Physical and Virtual pci device functions.
This information was already available to the PciDevice objects and was
stored in extra_info['phys_function'] field, so we add code that will
migrate old data on the fly, for live upgrade scenarios where we still
have running older compute nodes alongside new ones.
We don't want to migrate, however, if there are still any API service
instances running that might access this info directly (without the help
of the conductor) but have not been upgraded yet.
Co-authored-by: Nikola Đipanov <ndipanov@redhat.com>
Partially implements blueprint sriov-physical-function-passthrough
Change-Id: I94e8ce2c2a3d1c9e8b4aa1b245076eba84f37f45
Diffstat (limited to 'nova/tests/unit/pci/test_stats.py')
-rw-r--r-- | nova/tests/unit/pci/test_stats.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/unit/pci/test_stats.py b/nova/tests/unit/pci/test_stats.py index d2860f2bf0..31ab37632e 100644 --- a/nova/tests/unit/pci/test_stats.py +++ b/nova/tests/unit/pci/test_stats.py @@ -218,6 +218,8 @@ class PciDeviceStatsWithTagsTestCase(test.NoDBTestCase): 'product_id': '0071', 'status': 'available', 'request_id': None, + 'dev_type': 'type-PCI', + 'parent_addr': None, 'numa_node': 0} self.pci_tagged_devices.append(objects.PciDevice.create(pci_dev)) @@ -229,6 +231,8 @@ class PciDeviceStatsWithTagsTestCase(test.NoDBTestCase): 'product_id': '0072', 'status': 'available', 'request_id': None, + 'dev_type': 'type-PCI', + 'parent_addr': None, 'numa_node': 0} self.pci_untagged_devices.append(objects.PciDevice.create(pci_dev)) @@ -286,6 +290,7 @@ class PciDeviceStatsWithTagsTestCase(test.NoDBTestCase): 'vendor_id': '2345', 'product_id': '0172', 'status': 'available', + 'parent_addr': None, 'request_id': None} pci_dev_obj = objects.PciDevice.create(pci_dev) self.pci_stats.add_device(pci_dev_obj) @@ -301,6 +306,7 @@ class PciDeviceStatsWithTagsTestCase(test.NoDBTestCase): 'vendor_id': '2345', 'product_id': '0172', 'status': 'available', + 'parent_addr': None, 'request_id': None} pci_dev_obj = objects.PciDevice.create(pci_dev) self.pci_stats.remove_device(pci_dev_obj) |