NFVBENCH-92 nfvbench should not look for neutron network in case of l2-loopback 31/57431/1
authorahothan <ahothan@cisco.com>
Wed, 16 May 2018 07:10:36 +0000 (00:10 -0700)
committerahothan <ahothan@cisco.com>
Wed, 16 May 2018 07:10:36 +0000 (00:10 -0700)
Change-Id: I2fc7a46e23d7a989942eb62a4ca9afec8b992088
Signed-off-by: ahothan <ahothan@cisco.com>
nfvbench/cfg.default.yaml
nfvbench/chain_managers.py
nfvbench/nfvbench.py

index e1c05c3..d7e85c8 100755 (executable)
@@ -231,8 +231,8 @@ loop_vm_name: 'nfvbench-loop-vm'
 # - PVVP uses left, middle and right
 # - for EXT chains, this structure is not relevant - refer to external_networks
 # Otherwise a new internal network will be created with that name, subnet and CIDR.
-# 
-# segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id 
+#
+# segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id
 #                 will be assigned by Neutron.
 #                 Must be unique for each network
 # physical_network can be set to pick a specific phsyical network - by default (empty) the
@@ -284,14 +284,14 @@ external_networks:
     right: 'nfvbench-net1'
 
 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
-# Leave empty you do not want the traffic generator to insert the VLAN tag. This is 
+# Leave empty you do not want the traffic generator to insert the VLAN tag. This is
 # needed for example if VLAN tagging is enabled on switch (trunk mode) or if you want to hook directly to a NIC
 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex)
 vlan_tagging: true
 
 # Specify only when you want to override VLAN IDs used for tagging with own values (exactly 2).
-# Default behavior of VLAN tagging is to retrieve VLAN IDs from OpenStack networks provided above.
-# In case of VxLAN this setting is ignored and only vtep_vlan from traffic generator profile is used.
+# Default behavior (empty list) is to retrieve VLAN IDs from OpenStack networks described in external_networks.
+# This property is ignored in the case of l2-loopback
 # Example: [1998, 1999]
 vlans: []
 
index 211f9bb..9cd6c7d 100644 (file)
@@ -56,7 +56,7 @@ class StageManager(object):
         return self.client.ports
 
     def get_compute_nodes(self):
-        return self.client.compute_nodes
+        return self.client.compute_nodes if self.client else {}
 
     def set_vm_macs(self):
         if self.client and self.config.service_chain != ChainType.EXT:
index 1cb5a9c..c5c1244 100644 (file)
@@ -582,7 +582,9 @@ def main():
                 LOG.info('Disabling ARP')
                 config.no_arp = True
             config.vlans = [int(opts.l2_loopback), int(opts.l2_loopback)]
-            LOG.info('Running L2 loopback: using EXT chain and no ARP')
+            # disable any form of interface config since we loop at the switch level
+            config.no_int_config = True
+            LOG.info('Running L2 loopback: using EXT chain/no ARP')
 
         if opts.use_sriov_middle_net:
             if (not config.sriov) or (config.service_chain != ChainType.PVVP):