From 391dcf76fefb747888a3411ae3b8df7b1ad26685 Mon Sep 17 00:00:00 2001 From: ahothan Date: Sun, 7 Oct 2018 15:55:25 -0700 Subject: 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 --- nfvbench/chain_workers.py | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'nfvbench/chain_workers.py') 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 -- cgit 1.2.3-korg