Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NFVBENCH-153 Add support for python3
[nfvbench.git]
/
nfvbench
/
traffic_gen
/
traffic_base.py
diff --git
a/nfvbench/traffic_gen/traffic_base.py
b/nfvbench/traffic_gen/traffic_base.py
index
9c78d7e
..
3bff7da
100644
(file)
--- 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 sys
from nfvbench.log import LOG
-import traffic_utils
+
from .
import traffic_utils
class Latency(object):
class Latency(object):
@@
-27,7
+27,7
@@
class Latency(object):
latency_list: aggregate all latency values from list if not None
"""
latency_list: aggregate all latency values from list if not None
"""
- self.min_usec = sys.max
int
+ self.min_usec = sys.max
size
self.max_usec = 0
self.avg_usec = 0
self.hdrh = None
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."""
def available(self):
"""Return True if latency information is available."""
- return self.min_usec != sys.max
int
+ return self.min_usec != sys.max
size
class TrafficGeneratorException(Exception):
"""Exception for traffic generator."""
class TrafficGeneratorException(Exception):
"""Exception for traffic generator."""
- pass
-
-
class AbstractTrafficGenerator(object):
def __init__(self, traffic_client):
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."""
def clear_streamblock(self):
"""Clear all streams from the traffic generator."""
- pass
@abc.abstractmethod
def resolve_arp(self):
@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
"""
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):
@abc.abstractmethod
def get_macs(self):
@@
-124,7
+119,6
@@
class AbstractTrafficGenerator(object):
return: a list of MAC addresses indexed by the port#
"""
return: a list of MAC addresses indexed by the port#
"""
- pass
@abc.abstractmethod
def get_port_speed_gbps(self):
@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#
"""
return: a list of speed in Gbps indexed by the port#
"""
- pass