diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-09-20 12:27:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-20 12:27:13 +0000 |
commit | 6dfabefd6cac3cd4b8fd29abf5a5b6ab9e6ae956 (patch) | |
tree | 1372bb6fa418c1844d0e9b2650648aa9b2ad07b1 /vnfs/qemu/qemu_pci_passthrough.py | |
parent | a325eb33fbe408243209b19f2d9cc288b2e57548 (diff) | |
parent | 9b1af783ec53050129239102355e1a5c3ceb1d97 (diff) |
Merge "paths: Support binary packages"
Diffstat (limited to 'vnfs/qemu/qemu_pci_passthrough.py')
-rw-r--r-- | vnfs/qemu/qemu_pci_passthrough.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vnfs/qemu/qemu_pci_passthrough.py b/vnfs/qemu/qemu_pci_passthrough.py index ba1f1010..f32f33d3 100644 --- a/vnfs/qemu/qemu_pci_passthrough.py +++ b/vnfs/qemu/qemu_pci_passthrough.py @@ -19,7 +19,6 @@ import logging import subprocess import os -import glob from conf import settings as S from vnfs.qemu.qemu import IVnfQemu @@ -27,7 +26,6 @@ from tools import tasks from tools.module_manager import ModuleManager _MODULE_MANAGER = ModuleManager() -_RTE_PCI_TOOL = glob.glob(os.path.join(S.getValue('RTE_SDK'), 'tools', 'dpdk*bind.py'))[0] class QemuPciPassthrough(IVnfQemu): """ @@ -60,7 +58,7 @@ class QemuPciPassthrough(IVnfQemu): # bind every interface to vfio-pci driver try: nics_list = list(tmp_nic['pci'] for tmp_nic in self._host_nics) - tasks.run_task(['sudo', _RTE_PCI_TOOL, '--bind=vfio-pci'] + nics_list, + tasks.run_task(['sudo', S.getValue('TOOLS')['bind-tool'], '--bind=vfio-pci'] + nics_list, self._logger, 'Binding NICs %s...' % nics_list, True) except subprocess.CalledProcessError: @@ -78,7 +76,7 @@ class QemuPciPassthrough(IVnfQemu): for nic in self._host_nics: if nic['driver']: try: - tasks.run_task(['sudo', _RTE_PCI_TOOL, '--bind=' + nic['driver'], nic['pci']], + tasks.run_task(['sudo', S.getValue('TOOLS')['bind-tool'], '--bind=' + nic['driver'], nic['pci']], self._logger, 'Binding NIC %s...' % nic['pci'], True) except subprocess.CalledProcessError: |