diff options
author | Alec Hothan <ahothan@cisco.com> | 2018-02-23 02:26:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-23 02:26:41 +0000 |
commit | 1000fc2ad1230a694ffcc16797a4ef528e63ed8e (patch) | |
tree | e4f5521d9781b6ec4a61015c531c88a834691893 | |
parent | 00d3c4f29644b28476a38849bc2abc3a6bce920c (diff) | |
parent | 4cc2ddf79eed6fdc30c668c64fc961da09703631 (diff) |
Merge "Fix for bug with external chain and no arp"
-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." |