diff options
Diffstat (limited to 'nfvbench/chain_workers.py')
-rw-r--r-- | nfvbench/chain_workers.py | 46 |
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 |