diff options
Diffstat (limited to 'nfvbench/nfvbench.py')
-rw-r--r-- | nfvbench/nfvbench.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 7d2e037..f17b51c 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -164,6 +164,14 @@ class NFVBench(object): self.config.duration_sec = float(self.config.duration_sec) self.config.interval_sec = float(self.config.interval_sec) + # Get traffic generator profile config + if not self.config.generator_profile: + self.config.generator_profile = self.config.traffic_generator.default_profile + + generator_factory = TrafficGeneratorFactory(self.config) + self.config.generator_config = \ + generator_factory.get_generator_config(self.config.generator_profile) + # Check length of mac_addrs_left/right for serivce_chain EXT with no_arp if self.config.service_chain == ChainType.EXT and self.config.no_arp: if not (self.config.generator_config.mac_addrs_left is None and @@ -183,14 +191,6 @@ class NFVBench(object): b=len(self.config.generator_config.mac_addrs_right), c=self.config.service_chain_count)) - # Get traffic generator profile config - if not self.config.generator_profile: - self.config.generator_profile = self.config.traffic_generator.default_profile - - generator_factory = TrafficGeneratorFactory(self.config) - self.config.generator_config = \ - generator_factory.get_generator_config(self.config.generator_profile) - if not any(self.config.generator_config.pcis): raise Exception("PCI addresses configuration for selected traffic generator profile " "({tg_profile}) are missing. Please specify them in configuration file." |