def test_persist_config(self, mock_rconfig): sriov.persist_numvfs(PCI1, NUMVFS) mock_rconfig.return_value.set_device.assert_called_once_with( PCI1, {'sriov': { 'numvfs': NUMVFS }}) mock_rconfig.return_value.save.assert_called_once()
def change_numvfs(numvfs, devname): """Change number of virtual functions of a device. The persistence is stored in the same place as other network persistence is stored. A call to setSafeNetworkConfig() will persist it across reboots. """ logging.info(f'Changing number of vfs on device {devname} -> {numvfs}.') update_num_vfs(devname, numvfs) sriov.persist_numvfs(devname, numvfs)
def change_numvfs(pci_path, numvfs, devname): """Change number of virtual functions of a device. The persistence is stored in the same place as other network persistence is stored. A call to setSafeNetworkConfig() will persist it across reboots. """ logging.info('Changing number of vfs on device %s -> %s.', pci_path, numvfs) sriov.update_numvfs(pci_path, numvfs) sriov.persist_numvfs(devname, numvfs) link_iface.iface(devname).up()
def change_numvfs(pci_path, numvfs, net_name): """Change number of virtual functions of a device. The persistence is stored in the same place as other network persistence is stored. A call to setSafeNetworkConfig() will persist it across reboots. """ # TODO: net_name is here only because it is hard to call pf_to_net_name # TODO: from here. once all our code will be under lib/vdsm this should be # TODO: removed. logging.info('Changing number of vfs on device %s -> %s.', pci_path, numvfs) sriov.update_numvfs(pci_path, numvfs) sriov.persist_numvfs(pci_path, numvfs) link_iface.iface(net_name).up()
def change_numvfs(pci_path, numvfs, net_name): """Change number of virtual functions of a device. The persistence is stored in the same place as other network persistence is stored. A call to setSafeNetworkConfig() will persist it across reboots. """ # TODO: net_name is here only because it is hard to call pf_to_net_name # TODO: from here. once all our code will be under lib/vdsm this should be # TODO: removed. logging.info('Changing number of vfs on device %s -> %s.', pci_path, numvfs) sriov.update_numvfs(pci_path, numvfs) sriov.persist_numvfs(pci_path, numvfs) link_iface.up(net_name)
def test_persist_config(self, mock_rconfig): sriov.persist_numvfs(PCI1, NUMVFS) mock_rconfig.return_value.set_device.assert_called_once_with( PCI1, {'sriov': {'numvfs': NUMVFS}}) mock_rconfig.return_value.save.assert_called_once()