aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2018-02-13 21:11:11 -0800
committerEmma Foley <emma.l.foley@intel.com>2018-02-14 11:04:21 +0000
commit5367e37da4e39b872c0f7ab8ea110d2d83f90ccf (patch)
treeacd50a7924ac79cb403701cbd87b8925525651a7 /yardstick
parentf1f059b05efbb4f31be4d82f93e1e901cf68b239 (diff)
NSB traffic_profile: fix pylint warnings and return partial
also fix unittests Change-Id: Ie3026f5a0df8e690271afb71fe36ac531cbae2a0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/network_services/traffic_profile/traffic_profile.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yardstick/network_services/traffic_profile/traffic_profile.py b/yardstick/network_services/traffic_profile/traffic_profile.py
index 2f97945c0..3b19ff9be 100644
--- a/yardstick/network_services/traffic_profile/traffic_profile.py
+++ b/yardstick/network_services/traffic_profile/traffic_profile.py
@@ -70,6 +70,7 @@ class TrexProfile(TrafficProfile):
def _ethernet_range_action_partial(self, direction, _):
def partial(min_value, max_value, count):
+ # pylint: disable=unused-argument
stl_vm_flow_var = STLVmFlowVar(name="mac_{}".format(direction),
min_value=1,
max_value=30,
@@ -83,6 +84,7 @@ class TrexProfile(TrafficProfile):
return partial
def _ip_range_action_partial(self, direction, count=1):
+ # pylint: disable=unused-argument
def partial(min_value, max_value, count):
ip1 = int(ipaddress.IPv4Address(min_value))
ip2 = int(ipaddress.IPv4Address(max_value))
@@ -108,6 +110,7 @@ class TrexProfile(TrafficProfile):
def _ip6_range_action_partial(self, direction, _):
def partial(min_value, max_value, count):
+ # pylint: disable=unused-argument
min_value, max_value = self._get_start_end_ipv6(min_value, max_value)
stl_vm_flow_var = STLVmFlowVar(name="ip6_{}".format(direction),
min_value=min_value,
@@ -124,6 +127,7 @@ class TrexProfile(TrafficProfile):
def _dscp_range_action_partial(self, *_):
def partial(min_value, max_value, count):
+ # pylint: disable=unused-argument
stl_vm_flow_var = STLVmFlowVar(name="dscp",
min_value=min_value,
max_value=max_value,
@@ -134,8 +138,10 @@ class TrexProfile(TrafficProfile):
stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='dscp',
pkt_offset='IP.tos')
self.vm_flow_vars.append(stl_vm_wr_flow_var)
+ return partial
def _udp_range_action_partial(self, field, count=1):
+ # pylint: disable=unused-argument
def partial(min_value, max_value, count):
actual_count = int(max_value) - int(min_value)
if not actual_count: