diff --git a/nova/pci/manager.py b/nova/pci/manager.py index 9b0f30efdf73..c3889e7584cc 100644 --- a/nova/pci/manager.py +++ b/nova/pci/manager.py @@ -112,9 +112,6 @@ class PciDevTracker(object): devices = [] for dev in jsonutils.loads(devices_json): - if dev.get('dev_type') == fields.PciDeviceType.SRIOV_PF: - continue - if self.dev_filter.device_assignable(dev): devices.append(dev) self._set_hvdevs(devices) diff --git a/nova/tests/unit/compute/test_resource_tracker.py b/nova/tests/unit/compute/test_resource_tracker.py index d066fea28e43..4ca1c2c770e8 100644 --- a/nova/tests/unit/compute/test_resource_tracker.py +++ b/nova/tests/unit/compute/test_resource_tracker.py @@ -105,7 +105,8 @@ class FakeVirtDriver(driver.ComputeDriver): 'vendor_id': '8086', 'status': 'available', 'extra_k1': 'v1', - 'numa_node': 1 + 'numa_node': 1, + 'parent_addr': '0000:00:01.0', }, { 'label': 'label_8086_0443', @@ -116,7 +117,8 @@ class FakeVirtDriver(driver.ComputeDriver): 'vendor_id': '8086', 'status': 'available', 'extra_k1': 'v1', - 'numa_node': 1 + 'numa_node': 1, + 'parent_addr': '0000:00:01.0', }, { 'label': 'label_8086_0443', @@ -127,7 +129,8 @@ class FakeVirtDriver(driver.ComputeDriver): 'vendor_id': '8086', 'status': 'available', 'extra_k1': 'v1', - 'numa_node': 1 + 'numa_node': 1, + 'parent_addr': None, }, { 'label': 'label_8086_0123', @@ -138,7 +141,8 @@ class FakeVirtDriver(driver.ComputeDriver): 'vendor_id': '8086', 'status': 'available', 'extra_k1': 'v1', - 'numa_node': 1 + 'numa_node': 1, + 'parent_addr': None, }, { 'label': 'label_8086_7891', @@ -149,12 +153,13 @@ class FakeVirtDriver(driver.ComputeDriver): 'vendor_id': '8086', 'status': 'available', 'extra_k1': 'v1', - 'numa_node': None + 'numa_node': None, + 'parent_addr': '0000:08:01.0', }, ] if self.pci_support else [] self.pci_stats = [ { - 'count': 2, + 'count': 3, 'vendor_id': '8086', 'product_id': '0443', 'numa_node': 1