"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "nova/tests/unit/pci/test_stats.py" between
nova-22.0.0.tar.gz and nova-22.0.1.tar.gz

About: OpenStack Nova (Core Service: Compute) manages the lifecycle of compute instances in an OpenStack environment. Responsibilities include spawning, scheduling and decomissioning of machines on demand.
The "Victoria" series (latest release).

test_stats.py  (nova-22.0.0):test_stats.py  (nova-22.0.1)
skipping to change at line 559 skipping to change at line 559
self._assertPools() self._assertPools()
def test_remove_device(self): def test_remove_device(self):
self._create_pci_devices() self._create_pci_devices()
dev1 = self.pci_untagged_devices.pop() dev1 = self.pci_untagged_devices.pop()
self.pci_stats.remove_device(dev1) self.pci_stats.remove_device(dev1)
dev2 = self.pci_tagged_devices.pop() dev2 = self.pci_tagged_devices.pop()
self.pci_stats.remove_device(dev2) self.pci_stats.remove_device(dev2)
self._assertPools() self._assertPools()
def test_update_device(self):
# Update device type of one of the device from type-PCI to
# type-PF. Verify if the existing pool is updated and a new
# pool is created with dev_type type-PF.
self._create_pci_devices()
dev1 = self.pci_tagged_devices.pop()
dev1.dev_type = 'type-PF'
self.pci_stats.update_device(dev1)
self.assertEqual(3, len(self.pci_stats.pools))
self._assertPoolContent(self.pci_stats.pools[0], '1137', '0072',
len(self.pci_untagged_devices))
self.assertEqual(self.pci_untagged_devices,
self.pci_stats.pools[0]['devices'])
self._assertPoolContent(self.pci_stats.pools[1], '1137', '0071',
len(self.pci_tagged_devices),
physical_network='physnet1')
self.assertEqual(self.pci_tagged_devices,
self.pci_stats.pools[1]['devices'])
self._assertPoolContent(self.pci_stats.pools[2], '1137', '0071',
1,
physical_network='physnet1')
self.assertEqual(dev1,
self.pci_stats.pools[2]['devices'][0])
class PciDeviceVFPFStatsTestCase(test.NoDBTestCase): class PciDeviceVFPFStatsTestCase(test.NoDBTestCase):
def setUp(self): def setUp(self):
super(PciDeviceVFPFStatsTestCase, self).setUp() super(PciDeviceVFPFStatsTestCase, self).setUp()
white_list = ['{"vendor_id":"8086","product_id":"1528"}', white_list = ['{"vendor_id":"8086","product_id":"1528"}',
'{"vendor_id":"8086","product_id":"1515"}'] '{"vendor_id":"8086","product_id":"1515"}']
self.flags(passthrough_whitelist=white_list, group='pci') self.flags(passthrough_whitelist=white_list, group='pci')
self.pci_stats = stats.PciDeviceStats() self.pci_stats = stats.PciDeviceStats()
def _create_pci_devices(self, vf_product_id=1515, pf_product_id=1528): def _create_pci_devices(self, vf_product_id=1515, pf_product_id=1528):
 End of changes. 1 change blocks. 
0 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)