[VOL-2751] Changes required to run DT tests on demo pod from jenkins

Change-Id: Iba8372b2dc11ed4a16121a65f7355105953128b0
diff --git a/Jenkinsfile-voltha-bal31-build b/Jenkinsfile-voltha-bal31-build
index 9e6653e..581735a 100644
--- a/Jenkinsfile-voltha-bal31-build
+++ b/Jenkinsfile-voltha-bal31-build
@@ -90,7 +90,11 @@
                     fi
 
                     # VOL-2194 ONOS SSH and REST ports hardcoded to 30115/30120 in tests
-                    ONOS_SSH_PORT=30115 ONOS_API_PORT=30120 VOLTHA_LOG_LEVEL=DEBUG WITH_SIM_ADAPTERS=n WITH_RADIUS=y WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no FANCY=0 ./voltha up
+                    if [[ "${workFlow}" == "DT" ]]; then
+                       ONOS_SSH_PORT=30115 ONOS_API_PORT=30120 VOLTHA_LOG_LEVEL=DEBUG WITH_SIM_ADAPTERS=n WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no WITH_EAPOL=no WITH_DHCP=no WITH_IGMP=no WITH_RADIUS=no FANCY=0 ./voltha up
+                    else
+                       ONOS_SSH_PORT=30115 ONOS_API_PORT=30120 VOLTHA_LOG_LEVEL=DEBUG WITH_SIM_ADAPTERS=n WITH_RADIUS=y WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no FANCY=0 ./voltha up
+                    fi
 
                     kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
                     kubectl get nodes -o wide
@@ -135,12 +139,13 @@
                     sadis_out = sh returnStatus: true, script: """
                     if [[ "${onosVersion}" == "1.13.9" ]]; then
                         curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-${onosVersion}-sadis.json
+                    elif [[ "${workFlow}" == "DT" ]]; then
+                        curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis-DT.json
                     else
                         curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis.json
                     fi
-
-                        """
-                        return sadis_out == 0
+                    """
+                    return sadis_out == 0
                 }
             }
             if ( params.reinstallOlt ) {
diff --git a/tests/data/TechProfile-1T8GEM.json b/tests/data/TechProfile-1T8GEM.json
new file mode 100644
index 0000000..adc5021
--- /dev/null
+++ b/tests/data/TechProfile-1T8GEM.json
@@ -0,0 +1,253 @@
+{
+  "name": "8QueueHybridProfileMap1",
+  "profile_type": "XGS-PON",
+  "version": 1,
+  "num_gem_ports": 8,
+  "instance_control": {
+    "onu": "multi-instance",
+    "uni": "single-instance",
+    "max_gem_payload_size": "auto"
+  },
+  "us_scheduler": {
+    "additional_bw": "AdditionalBW_BestEffort",
+    "direction": "UPSTREAM",
+    "priority": 0,
+    "weight": 0,
+    "q_sched_policy": "StrictPriority"
+  },
+  "ds_scheduler": {
+    "additional_bw": "AdditionalBW_BestEffort",
+    "direction": "DOWNSTREAM",
+    "priority": 0,
+    "weight": 0,
+    "q_sched_policy": "StrictPriority"
+  },
+  "upstream_gem_port_attribute_list": [
+    {
+      "pbit_map": "0b10000000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 7,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b01000000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 6,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00100000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 5,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00010000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 4,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00001000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 3,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000100",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 2,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000010",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 1,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000001",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 0,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    }
+  ],
+  "downstream_gem_port_attribute_list": [
+    {
+      "pbit_map": "0b10000000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 7,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b01000000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 6,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00100000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 5,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00010000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 4,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00001000",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 3,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "max_threshold": 0,
+        "min_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000100",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 2,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000010",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 1,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    },
+    {
+      "pbit_map": "0b00000001",
+      "aes_encryption": "True",
+      "scheduling_policy": "StrictPriority",
+      "priority_q": 0,
+      "weight": 100,
+      "discard_policy": "TailDrop",
+      "max_q_size": "auto",
+      "discard_config": {
+        "min_threshold": 0,
+        "max_threshold": 0,
+        "max_probability": 0
+      }
+    }
+  ]
+}
diff --git a/tests/data/onf-demo-pod-sadis-DT.json b/tests/data/onf-demo-pod-sadis-DT.json
new file mode 100644
index 0000000..b2b9a4d
--- /dev/null
+++ b/tests/data/onf-demo-pod-sadis-DT.json
@@ -0,0 +1,120 @@
+{
+  "devices": {
+    "of:000000000a80645a": {
+      "basic": {
+        "driver": "voltha"
+      }
+    }
+  },
+  "apps": {
+    "org.opencord.sadis": {
+      "sadis": {
+        "integration": {
+          "cache": {
+            "enabled": false,
+            "maxsize": 50,
+            "ttl": "PT0m"
+          }
+        },
+        "entries": [
+          {
+            "id": "BRCM22222222-1",
+            "nasPortId": "BRCM22222222-1",
+            "circuitId": "",
+            "remoteId": "",
+            "uniTagList": [{
+              "uniTagMatch": 4096,
+              "ponCTag": 4096,
+              "ponSTag": 11,
+              "technologyProfileId": 64,
+              "downstreamBandwidthProfile": "Default",
+              "upstreamBandwidthProfile": "Default",
+              "isDhcpRequired": false
+            }]
+          },
+          {
+            "id": "ALPHe3d1cf9d-1",
+            "nasPortId": "ALPHe3d1cf9d-1",
+            "circuitId": "",
+            "remoteId": "",
+            "uniTagList": [{
+              "uniTagMatch": 4096,
+              "ponCTag": 4096,
+              "ponSTag": 22,
+              "technologyProfileId": 64,
+              "downstreamBandwidthProfile": "Default",
+              "upstreamBandwidthProfile": "Default",
+              "isDhcpRequired": false
+            }]
+          },
+          {
+            "id": "ALPHe3d1ced5-1",
+            "nasPortId": "ALPHe3d1ced5-1",
+            "circuitId": "",
+            "remoteId": "",
+            "uniTagList": [{
+              "uniTagMatch": 4096,
+              "ponCTag": 4096,
+              "ponSTag": 33,
+              "technologyProfileId": 64,
+              "downstreamBandwidthProfile": "Default",
+              "upstreamBandwidthProfile": "Default",
+              "isDhcpRequired": false
+            }]
+          },
+          {
+            "id": "EC1904000654",
+            "hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
+            "ipAddress": "10.192.20.206",
+            "nasId": "EC1904000654",
+            "uplinkPort": 1048576
+          }
+        ]
+      },
+      "bandwidthprofile":{
+          "integration":{
+              "cache":{
+                  "enabled":true,
+                  "maxsize":40,
+                  "ttl":"PT1m"
+              }
+          },
+          "entries":[
+              {
+                  "id": "Default",
+                  "air": 100000,
+                  "cbs": 30,
+                  "cir": 16000,
+                  "ebs": 30,
+                  "eir": 16000
+              },
+              {
+                  "id": "User_Bandwidth1",
+                  "air": 100000,
+                  "cbs": 10000,
+                  "cir": 30000,
+                  "ebs": 1000,
+                  "eir": 20000
+              },
+              {
+                  "id": "User_Bandwidth2",
+                  "air": 100000,
+                  "cbs": 5000,
+                  "cir": 100000,
+                  "ebs": 5000,
+                  "eir": 100000
+              },
+              {
+                  "id": "User_Bandwidth3",
+                  "air": 100000,
+                  "cbs": 5000,
+                  "cir": 1000000,
+                  "ebs": 5000,
+                  "eir": 1000000
+              }
+
+          ]
+      }
+    }
+  }
+}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 68fa5e0..c4f8025 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -223,6 +223,7 @@
     # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
     Run Keyword    Setup
     Wait Until Keyword Succeeds    ${timeout}   2s    Perform Sanity Test DT
+    Run Keyword If    ${has_dataplane}    Clean Up Linux
 
 *** Keywords ***
 Setup Suite