From: ahothan Date: Sun, 25 Mar 2018 07:46:25 +0000 (-0700) Subject: [NFVBENCH-77] Config plugin misses config options coming from REST requests X-Git-Tag: 1.3.0~1 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=aea0c395c0eb20b34a289aa4ed0f3f023e9f57b2;p=nfvbench.git [NFVBENCH-77] Config plugin misses config options coming from REST requests Pass latest config to get_run_spec() Change-Id: I169f482faa0ba016d266db006da45e3fe0bb4331 Signed-off-by: ahothan --- diff --git a/nfvbench/config_plugin.py b/nfvbench/config_plugin.py index 78c2ebb..f6654eb 100644 --- a/nfvbench/config_plugin.py +++ b/nfvbench/config_plugin.py @@ -49,7 +49,7 @@ class ConfigPluginBase(object): """Returns OpenStack specs for host.""" @abc.abstractmethod - def get_run_spec(self, openstack_spec): + def get_run_spec(self, config, openstack_spec): """Returns RunSpec for given platform.""" @abc.abstractmethod @@ -81,9 +81,9 @@ class ConfigPlugin(ConfigPluginBase): """Returns OpenStack specs for host.""" return specs.OpenStackSpec() - def get_run_spec(self, openstack_spec): + def get_run_spec(self, config, openstack_spec): """Returns RunSpec for given platform.""" - return specs.RunSpec(self.config.no_vswitch_access, openstack_spec) + return specs.RunSpec(config.no_vswitch_access, openstack_spec) def validate_config(self, config, openstack_spec): pass diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index bf6e5d0..5899652 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -68,7 +68,7 @@ class NFVBench(object): sys.stdout.flush() def setup(self): - self.specs.set_run_spec(self.config_plugin.get_run_spec(self.specs.openstack)) + self.specs.set_run_spec(self.config_plugin.get_run_spec(self.config, self.specs.openstack)) self.chain_runner = ChainRunner(self.config, self.clients, self.cred,