diff options
author | Michael Pedersen <michael.soelvkaer@gmail.com> | 2017-12-20 14:38:22 -0700 |
---|---|---|
committer | Michael Pedersen <michaelx.pedersen@intel.com> | 2018-01-17 16:09:32 -0700 |
commit | 5a7cb16e9b178ee70b29a554fcbd6f582a1f031a (patch) | |
tree | cee7a9cc640864d08e4cd6aa5c3a3219c047d2a8 /nfvbench/nfvbench.py | |
parent | 02c8ed97e27b6e417945d27d4d3c2ab8e7dbfa7e (diff) |
[NFVBENCH-58] Add option to specify dest MAC with EXT CHAIN when ARP is
disabled
Change-Id: Ia605d7314d8047e84c5e17088ed5ce588a50e256
Signed-off-by: Michael Pedersen <michael.soelvkaer@gmail.com>
Diffstat (limited to 'nfvbench/nfvbench.py')
-rw-r--r-- | nfvbench/nfvbench.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 8c88248..18bdc70 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -164,6 +164,25 @@ class NFVBench(object): self.config.duration_sec = float(self.config.duration_sec) self.config.interval_sec = float(self.config.interval_sec) + # 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 + self.config.generator_config.mac_addrs_right is None): + if (self.config.generator_config.mac_addrs_left is None or + self.config.generator_config.mac_addrs_right is None): + raise Exception("mac_addrs_left and mac_addrs_right must either " + "both be None or have a number of entries matching " + "service_chain_count") + if not (len(self.config.generator_config.mac_addrs_left) == + self.config.service_chain_count and + len(self.config.generator_config.mac_addrs_right) == + self.config.service_chain_count): + raise Exception("length of mac_addrs_left ({a}) and/or mac_addrs_right ({b}) " + "does not match service_chain_count ({c})" + .format(a=len(self.config.generator_config.mac_addrs_left), + 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 |