diff options
author | Michael S. Pedersen <michael.soelvkaer@gmail.com> | 2019-12-03 11:38:32 +0000 |
---|---|---|
committer | Michael S. Pedersen <michael.soelvkaer@gmail.com> | 2019-12-09 22:07:08 +0000 |
commit | 95f2491ed89ac99b0d8bd006b4a13cbeb1eb96ce (patch) | |
tree | 8d2d8cd00f3284036e9bf78d9ec9bfdb3e95c80b /nfvbench/traffic_gen/traffic_base.py | |
parent | 24314713446b6411cedce4329ab5ebfd6da678a2 (diff) |
NFVBENCH-153 Add support for python34.0.0
JIRA: NFVBENCH-153
Done using 2to3-3.6 with additional changes to fix data parsing and
testing (tox)
Signed-off-by: Michael S. Pedersen <michael.soelvkaer@gmail.com>
Change-Id: I242902f800da543d780507828c9bd1fbf409da6d
Diffstat (limited to 'nfvbench/traffic_gen/traffic_base.py')
-rw-r--r-- | nfvbench/traffic_gen/traffic_base.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/nfvbench/traffic_gen/traffic_base.py b/nfvbench/traffic_gen/traffic_base.py index 9c78d7e..3bff7da 100644 --- a/nfvbench/traffic_gen/traffic_base.py +++ b/nfvbench/traffic_gen/traffic_base.py @@ -16,7 +16,7 @@ import abc import sys from nfvbench.log import LOG -import traffic_utils +from . import traffic_utils class Latency(object): @@ -27,7 +27,7 @@ class Latency(object): latency_list: aggregate all latency values from list if not None """ - self.min_usec = sys.maxint + self.min_usec = sys.maxsize self.max_usec = 0 self.avg_usec = 0 self.hdrh = None @@ -42,15 +42,12 @@ class Latency(object): def available(self): """Return True if latency information is available.""" - return self.min_usec != sys.maxint + return self.min_usec != sys.maxsize class TrafficGeneratorException(Exception): """Exception for traffic generator.""" - pass - - class AbstractTrafficGenerator(object): def __init__(self, traffic_client): @@ -106,7 +103,6 @@ class AbstractTrafficGenerator(object): def clear_streamblock(self): """Clear all streams from the traffic generator.""" - pass @abc.abstractmethod def resolve_arp(self): @@ -116,7 +112,6 @@ class AbstractTrafficGenerator(object): else a dict of list of dest macs indexed by port# the dest macs in the list are indexed by the chain id """ - pass @abc.abstractmethod def get_macs(self): @@ -124,7 +119,6 @@ class AbstractTrafficGenerator(object): return: a list of MAC addresses indexed by the port# """ - pass @abc.abstractmethod def get_port_speed_gbps(self): @@ -132,4 +126,3 @@ class AbstractTrafficGenerator(object): return: a list of speed in Gbps indexed by the port# """ - pass |