[NFVBENCH-77] Config plugin misses config options coming from REST requests 45/54445/1
authorahothan <ahothan@cisco.com>
Sun, 25 Mar 2018 07:46:25 +0000 (00:46 -0700)
committerahothan <ahothan@cisco.com>
Sun, 25 Mar 2018 07:46:25 +0000 (00:46 -0700)
Pass latest config to get_run_spec()

Change-Id: I169f482faa0ba016d266db006da45e3fe0bb4331
Signed-off-by: ahothan <ahothan@cisco.com>
nfvbench/config_plugin.py
nfvbench/nfvbench.py

index 78c2ebb..f6654eb 100644 (file)
@@ -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
index bf6e5d0..5899652 100644 (file)
@@ -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,