Support sending TAGGED, untagged traffic for cord-tester test case. (dhcp,etc.)

Change-Id: I6d71a23f9f824ef3d37ec12ba372902c35addb33
diff --git a/src/test/utils/CordTestConfig.py b/src/test/utils/CordTestConfig.py
index 8234cf0..34dbb85 100644
--- a/src/test/utils/CordTestConfig.py
+++ b/src/test/utils/CordTestConfig.py
@@ -112,6 +112,10 @@
     if hasattr(class_test, 'VOLTHA_AUTO_CONFIGURE'):
         voltha_configure = getattr(class_test, 'VOLTHA_AUTO_CONFIGURE')
 
+    tagged_traffic = False
+    if hasattr(class_test, 'TAGGED_TRAFFIC'):
+        tagged_traffic = getattr(class_test, 'TAGGED_TRAFFIC')
+
     if hasattr(class_test, 'VOLTHA_HOST'):
         #update the voltha host ip based on chameleon IP for rest interface
         rest_interface = VolthaService.get_ip('chameleon')
@@ -140,7 +144,7 @@
                 setattr(class_test, 'VOLTHA_TEARDOWN', False)
 
     #load the sadis and aaa config
-    OnosCtrl.sadis_load_config(olt_switch_map = olt_switch_map)
+    OnosCtrl.sadis_load_config(olt_switch_map = olt_switch_map, tagged_traffic = tagged_traffic)
     OnosCtrl.aaa_load_config()
     #OnosCtrl('org.opencord.aaa').deactivate()
     #time.sleep(3)
diff --git a/src/test/utils/OnosCtrl.py b/src/test/utils/OnosCtrl.py
index f460450..21dbe74 100644
--- a/src/test/utils/OnosCtrl.py
+++ b/src/test/utils/OnosCtrl.py
@@ -379,7 +379,7 @@
         return switch_map
 
     @classmethod
-    def sadis_load_config(cls, controller = None, olt_switch_map = {}, olt_conf_file = ''):
+    def sadis_load_config(cls, controller = None, olt_switch_map = {}, olt_conf_file = '', tagged_traffic = False):
         sadis_app = 'org.opencord.sadis'
         aaa_app = 'org.opencord.aaa'
         sadis_cfg = {
@@ -417,8 +417,8 @@
                 sadis_entry = dict(nasId = nasId, nasPortId = nasPortId, slot = 1)
                 sadis_entry['id'] = uni_port_names[p]
                 sadis_entry['hardwareIdentifier'] = uni_port_macs[p]
-                sadis_entry['cTag'] = uni_ports[p]
-                sadis_entry['sTag'] = s_tag
+                sadis_entry['cTag'] = uni_ports[p] if tagged_traffic else -1
+                sadis_entry['sTag'] = s_tag if tagged_traffic else -1
                 sadis_entry['port'] = uni_ports[p]
                 sadis_entry['ipAddress'] = controller or cls.controller
                 sadis_entries.append(sadis_entry)
@@ -426,8 +426,8 @@
                 sadis_entry = dict(nasId = nasId, nasPortId = nasPortId, slot = 1)
                 sadis_entry['id']  = serial
                 sadis_entry['hardwareIdentifier'] = cls.device_id_to_mac(device)
-                sadis_entry['cTag'] = uni_ports[p]
-                sadis_entry['sTag'] = s_tag
+                sadis_entry['cTag'] = uni_ports[p] if tagged_traffic else -1
+                sadis_entry['sTag'] = s_tag if tagged_traffic else -1
                 sadis_entry['port'] = uni_ports[p]
                 sadis_entry['ipAddress'] = controller or cls.controller
                 sadis_entries.append(sadis_entry)