From aea0c395c0eb20b34a289aa4ed0f3f023e9f57b2 Mon Sep 17 00:00:00 2001 From: ahothan Date: Sun, 25 Mar 2018 00:46:25 -0700 Subject: [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 --- nfvbench/config_plugin.py | 6 +++--- nfvbench/nfvbench.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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, -- cgit 1.2.3-korg