Example #1
0
 def __init__(self, session):
     super(HostState, self).__init__()
     self._session = session
     self._stats = {}
     self._pci_device_filter = pci_whitelist.get_pci_devices_filter()
     self.update_status()
Example #2
0
 def test_get_pci_devices_filter(self):
     white_list_1 = '[{"product_id":"0001", "vendor_id":"8086"}]'
     self.flags(pci_passthrough_whitelist=[white_list_1])
     pci_filter = pci_whitelist.get_pci_devices_filter()
     dev = pci_device.PciDevice.create(dev_dict)
     self.assertEqual(pci_filter.device_assignable(dev), True)
Example #3
0
 def test_get_pci_devices_filter(self):
     white_list_1 = '[{"product_id":"0001", "vendor_id":"8086"}]'
     self.flags(pci_passthrough_whitelist=[white_list_1])
     pci_filter = pci_whitelist.get_pci_devices_filter()
     dev = pci_device.PciDevice.create(dev_dict)
     self.assertEqual(pci_filter.device_assignable(dev), True)
Example #4
0
 def test_get_pci_devices_filter(self):
     white_list_1 = '{"product_id":"0001", "vendor_id":"8086"}'
     self.flags(pci_passthrough_whitelist=[white_list_1])
     pci_filter = pci_whitelist.get_pci_devices_filter()
     self.assertIsNotNone(pci_filter.device_assignable(dev_dict))
Example #5
0
 def __init__(self, session):
     super(HostState, self).__init__()
     self._session = session
     self._stats = {}
     self._pci_device_filter = pci_whitelist.get_pci_devices_filter()
     self.update_status()
Example #6
0
 def test_get_pci_devices_filter(self):
     white_list_1 = '{"product_id":"0001", "vendor_id":"8086"}'
     self.flags(pci_passthrough_whitelist=[white_list_1])
     pci_filter = pci_whitelist.get_pci_devices_filter()
     self.assertIsNotNone(pci_filter.device_assignable(dev_dict))