def get_nic_driver(pci_id): """ Return linux driver for specified pci device """ driverlist = dict(zip(NICS.values(), DRIVERS.keys())) try: driver = DRIVERS[driverlist[pci_id]] except Exception as e: driver = None return driver
def _get_nic_driver(self, nic_name): if nic_name in DRIVERS.keys(): return DRIVERS[nic_name] return "Unknown"
def get_nic_driver(self, nic_name): if nic_name in DRIVERS.keys(): return DRIVERS[nic_name] raise ValueError(nic_name)