From 6c4e55c53c65b7e63c17c85367b4813443c5d942 Mon Sep 17 00:00:00 2001 From: Yichen Wang Date: Tue, 22 Aug 2017 12:03:14 -0700 Subject: Change the signature for config validation function Change-Id: I4ef3d18f1b068165cdfc8d08278d12ec6eac4a4c Signed-off-by: Yichen Wang --- nfvbench/config_plugin.py | 4 ++-- nfvbench/nfvbench.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nfvbench') diff --git a/nfvbench/config_plugin.py b/nfvbench/config_plugin.py index 417402a..78c2ebb 100644 --- a/nfvbench/config_plugin.py +++ b/nfvbench/config_plugin.py @@ -53,7 +53,7 @@ class ConfigPluginBase(object): """Returns RunSpec for given platform.""" @abc.abstractmethod - def validate_config(self, cfg): + def validate_config(self, cfg, openstack_spec): """Validate config file.""" @abc.abstractmethod @@ -85,7 +85,7 @@ class ConfigPlugin(ConfigPluginBase): """Returns RunSpec for given platform.""" return specs.RunSpec(self.config.no_vswitch_access, openstack_spec) - def validate_config(self, config): + def validate_config(self, config, openstack_spec): pass def prepare_results_config(self, cfg): diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 5b94ce7..d3f7f02 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -206,7 +206,7 @@ class NFVBench(object): raise Exception('Please provide existing path for storing results in JSON file. ' 'Path used: {path}'.format(path=self.config.std_json_path)) - self.config_plugin.validate_config(self.config) + self.config_plugin.validate_config(self.config, self.specs.openstack) def parse_opts_from_cli(): -- cgit 1.2.3-korg