NFVBENCH-119 cli option --vxlan not working 77/65677/1
authorahothan <ahothan@cisco.com>
Sat, 8 Dec 2018 20:22:22 +0000 (12:22 -0800)
committerahothan <ahothan@cisco.com>
Sat, 8 Dec 2018 20:22:22 +0000 (12:22 -0800)
Change-Id: Ib1dbca96fc5c5108078c6de623127ca49c439a1d
Signed-off-by: ahothan <ahothan@cisco.com>
nfvbench/nfvbench.py

index f06c593..cdb99c8 100644 (file)
@@ -66,16 +66,6 @@ class NFVBench(object):
         self.specs.set_openstack_spec(openstack_spec)
         self.vni_ports = []
         sys.stdout.flush()
-        self.check_options()
-
-    def check_options(self):
-        if self.base_config.vxlan:
-            if self.base_config.vlan_tagging:
-                raise Exception(
-                    'Inner VLAN tagging is not currently supported for VXLAN')
-            vtep_vlan = self.base_config.traffic_generator.get('vtep_vlan')
-            if vtep_vlan is None:
-                LOG.warning('Warning: VXLAN mode enabled, but VTEP vlan is not defined')
 
     def set_notifier(self, notifier):
         self.notifier = notifier
@@ -223,6 +213,13 @@ class NFVBench(object):
                 raise Exception('Please provide existing path for storing results in JSON file. '
                                 'Path used: {path}'.format(path=config.std_json_path))
 
+        # VxLAN sanity checks
+        if config.vxlan:
+            if config.vlan_tagging:
+                config.vlan_tagging = False
+                LOG.info('VxLAN: vlan_tagging forced to False '
+                         '(inner VLAN tagging must be disabled)')
+
         self.config_plugin.validate_config(config, self.specs.openstack)
 
 
@@ -544,6 +541,8 @@ def main():
         if opts.hypervisor:
             # can be any of 'comp1', 'nova:', 'nova:comp1'
             config.compute_nodes = opts.hypervisor
+        if opts.vxlan:
+            config.vxlan = True
 
         # port to port loopback (direct or through switch)
         if opts.l2_loopback: