diff mbox series

[V1,2/2] nics/net_device:add nics name attribute

Message ID 20210108053754.13590-3-weix.xie@intel.com (mailing list archive)
State Accepted
Headers show
Series replace i40evf with iavf | expand

Commit Message

Xie, WeiX Jan. 8, 2021, 5:37 a.m. UTC
Add an atrribute for getting nic's name.

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 nics/net_device.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/nics/net_device.py b/nics/net_device.py
index a08c0da6..bdc9d37d 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -62,6 +62,7 @@  class NetDevice(object):
         self.pci = domain_id + ':' + bus_id + ':' + devfun_id
         self.pci_id = get_pci_id(crb, domain_id, bus_id, devfun_id)
         self.default_driver = settings.get_nic_driver(self.pci_id)
+        self.name = settings.get_nic_name(self.pci_id)
 
         if self.nic_is_pf():
             self.default_vf_driver = ''