Change the signature for config validation function 05/39905/1
authorYichen Wang <yicwang@cisco.com>
Tue, 22 Aug 2017 19:03:14 +0000 (12:03 -0700)
committerYichen Wang <yicwang@cisco.com>
Tue, 22 Aug 2017 19:04:26 +0000 (12:04 -0700)
Change-Id: I4ef3d18f1b068165cdfc8d08278d12ec6eac4a4c
Signed-off-by: Yichen Wang <yicwang@cisco.com>
nfvbench/config_plugin.py
nfvbench/nfvbench.py

index 417402a..78c2ebb 100644 (file)
@@ -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):
index 5b94ce7..d3f7f02 100644 (file)
@@ -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():