[V1,1/3] framework/dut: add an attribute nic in dut
Commit Message
get the instance of NetDevice from the port_info,
and save it in dut as attribute nic.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
framework/dut.py | 3 +++
1 file changed, 3 insertions(+)
@@ -81,6 +81,7 @@ class Dut(Crb):
self.apps_name_conf = {}
self.apps_name = {}
self.dpdk_version = ''
+ self.nic = None
def filter_cores_from_crb_cfg(self):
# get core list from crbs.cfg
@@ -405,6 +406,8 @@ class Dut(Crb):
# print latest ports_info
for port_info in self.ports_info:
self.logger.info(port_info)
+ if self.nic is None:
+ self.nic = port_info['port']
if self.ports_map is None or len(self.ports_map) == 0:
self.logger.warning("ports_map should not be empty, please check all links")