behave_tests: refactor TestAPI DB lookup
[nfvbench.git] / nfvbench / chain_runner.py
index 62a3751..f045528 100644 (file)
@@ -71,6 +71,8 @@ class ChainRunner(object):
             # VLAN is discovered from the networks
             gen_config.set_vlans(0, self.chain_manager.get_chain_vlans(0))
             gen_config.set_vlans(1, self.chain_manager.get_chain_vlans(1))
+        else:
+            LOG.info("Ports: untagged")
 
         # the only case we do not need to set the dest MAC is in the case of
         # l2-loopback (because the traffic gen will default to use the peer MAC)
@@ -117,6 +119,10 @@ class ChainRunner(object):
         LOG.info('ChainRunner initialized')
 
     def __setup_traffic(self):
+        # possibly skip connectivity check
+        if self.config.no_e2e_check:
+            LOG.info('Skipping end to end connectivity check')
+            return
         self.traffic_client.setup()
         if not self.config.no_traffic:
             # ARP is needed for EXT chain or VxLAN overlay or MPLS unless disabled explicitly
@@ -149,7 +155,10 @@ class ChainRunner(object):
             if self.config.single_run:
                 result['run_config'] = self.traffic_client.get_run_config(result)
                 required = result['run_config']['direction-total']['orig']['rate_pps']
-                actual = result['stats']['total_tx_rate']
+                if self.config.periodic_gratuitous_arp:
+                    actual = result['stats']['total_tx_rate'] + self.config.gratuitous_arp_pps
+                else:
+                    actual = result['stats']['total_tx_rate']
                 warning = self.traffic_client.compare_tx_rates(required, actual)
                 if warning is not None:
                     result['run_config']['warning'] = warning
@@ -204,8 +213,8 @@ class ChainRunner(object):
                 LOG.info('Clean up skipped.')
             try:
                 self.traffic_client.close()
-            except Exception:
-                LOG.exception()
+            except Exception as exc:
+                LOG.exception(exc)
             if self.stats_manager:
                 self.stats_manager.close()
         except Exception: