summaryrefslogtreecommitdiffstats
path: root/nfvbench/chain_workers.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-10-07 15:55:25 -0700
committerahothan <ahothan@cisco.com>2018-10-08 10:44:31 -0700
commit391dcf76fefb747888a3411ae3b8df7b1ad26685 (patch)
treeb823ae8a5f0e837bb285f53acb1502e0aad1bdf0 /nfvbench/chain_workers.py
parent99260f95219301bb5c0b58921e793bcad6ec4990 (diff)
2.0 beta NFVBENCH-91 Allow multi-chaining with separate edge networks
Includes complete refactoring of code Beta for NFVbench 2.0 Change-Id: I2997f0fb7722d5ac626cd11a68692ae458c7676e Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/chain_workers.py')
-rw-r--r--nfvbench/chain_workers.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/nfvbench/chain_workers.py b/nfvbench/chain_workers.py
index 2e36fb1..7c669d1 100644
--- a/nfvbench/chain_workers.py
+++ b/nfvbench/chain_workers.py
@@ -17,37 +17,37 @@
class BasicWorker(object):
- def __init__(self, config, clients, specs):
- self.config = config
- self.clients = clients
- self.specs = specs
+ def __init__(self, stats_manager):
+ self.stats_manager = stats_manager
+ self.chain_manager = stats_manager.chain_runner.chain_manager
+ self.config = stats_manager.config
+ self.specs = stats_manager.specs
- def set_vlan_tag(self, device, vlan):
- device.set_vlan_tag(vlan)
+ def get_compute_nodes_bios(self):
+ return {}
- def set_vlans(self, vlans):
- pass
+ def get_version(self):
+ return {}
- def config_interfaces(self):
+ def close(self):
pass
- def get_data(self):
- return {}
+ def insert_interface_stats(self, pps_list):
+ """Insert interface stats to a list of packet path stats.
- def get_network_interfaces(self, index):
- return []
+ pps_list: a list of packet path stats instances indexed by chain index
- def clear_interfaces(self):
+ Specialized workers can insert their own interface stats inside each existing packet path
+ stats for every chain.
+ """
pass
- def run(self):
- return None, None
+ def update_interface_stats(self, diff=False):
+ """Update all interface stats.
- def get_compute_nodes_bios(self):
- return {}
-
- def get_version(self):
- return {}
-
- def close(self):
+ diff: if False, simply refresh the interface stats values with latest values
+ if True, diff the interface stats with the latest values
+ Make sure that the interface stats inserted in insert_interface_stats() are updated
+ with proper values
+ """
pass