aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-04-16 16:32:59 +0200
committerVratko Polak <vrpolak@cisco.com>2019-04-17 10:39:18 +0000
commit258f2666143138f20d84665fcfed53475bc88041 (patch)
treebe45d45e1913bd0c9c738662efea52deb16ffa9c /resources/libraries/python/InterfaceUtil.py
parentc481185ca0662f4e7800af2ae6a8f3f81c753470 (diff)
Clean up traffic_profile vs osi_layer
The two types were not well distinguished before. Error introduced in: https://gerrit.fd.io/r/#/c/17811/84/resources/libraries/robot/performance/performance_setup.robot@255 Error hotfixed in: https://gerrit.fd.io/r/#/c/18847/4/resources/libraries/robot/shared/default.robot@109 + Rename some arguments and improve method docstrings. Newly introduced argument name osi_layer should be dissimilar enough. Change-Id: Ie0f6f97dc010fc6477f09c54574970f1d15462e2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index d78984b1ca..1b1dda5726 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1325,22 +1325,19 @@ class InterfaceUtil(object):
exec_cmd_no_error(node, cmd, sudo=True)
@staticmethod
- def init_avf_interface(node, ifc_key, numvfs=1, traffic_type='L2'):
+ def init_avf_interface(node, ifc_key, numvfs=1, osi_layer='L2'):
"""Init PCI device by creating VFs and bind them to vfio-pci for AVF
driver testing on DUT.
:param node: DUT node.
:param ifc_key: Interface key from topology file.
:param numvfs: Number of VFs to initialize, 0 - disable the VFs.
- :param traffic_type: Expected type of traffic, affects spoofing.
+ :param osi_layer: OSI Layer type to initialize TG with.
Default value "L2" sets linux interface spoof off.
- Other values do not do that.
- Note: This is NOT the usual traffic profile
- (which is python module name to initialize TG with).
:type node: dict
:type ifc_key: str
:type numvfs: int
- :type traffic_type: str
+ :type osi_layer: str
:returns: Virtual Function topology interface keys.
:rtype: list
"""
@@ -1379,7 +1376,7 @@ class InterfaceUtil(object):
format(pci=pf_pci_addr)
InterfaceUtil.set_linux_interface_trust_on(node, pf_dev,
vf_id=vf_id)
- if traffic_type == 'L2':
+ if osi_layer == 'L2':
InterfaceUtil.set_linux_interface_spoof_off(node, pf_dev,
vf_id=vf_id)
InterfaceUtil.set_linux_interface_mac(node, pf_dev, vf_mac_addr,