[VOL-4647] Added DT FTTB Sanity Test

Change-Id: I499705bd744204a67b709234f424fcdc3c17d881
diff --git a/tests/data/bbsim-kind-dt-fttb-1OLTx1PONx2ONUx2UNI.yaml b/tests/data/bbsim-kind-dt-fttb-1OLTx1PONx2ONUx2UNI.yaml
new file mode 100644
index 0000000..0f7d502
--- /dev/null
+++ b/tests/data/bbsim-kind-dt-fttb-1OLTx1PONx2ONUx2UNI.yaml
@@ -0,0 +1,93 @@
+---
+
+# Copyright 2022-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Automated deployment configuration for systems running BBSim
+
+# Change default values in tests
+workflow: DT-FTTB
+has_dataplane: false
+teardown_device: true
+ONOS_REST_PORT: 8181
+ONOS_SSH_PORT: 8101
+OLT_PORT: 50060
+
+nodes:
+  -
+    ip: '127.0.0.1'
+
+olts:
+  -
+    ip: bbsim0
+    serial: BBSIM_OLT_10
+
+hosts:
+  src:
+    -
+      onu: 'BBSM000a0001'
+      olt: 'BBSIM_OLT_10'
+      service:
+        -
+          name: FTTB_SUBSCRIBER_TRAFFIC
+          c_tag: '101'
+          s_tag: '3101'
+        -
+          name: DPU_ANCP_TRAFFIC
+          c_tag: '4'
+          s_tag: '40'
+        -
+          name: DPU_MGMT_TRAFFIC
+          c_tag: '6'
+          s_tag: '60'
+      uni_id: '1'
+    -
+      onu: 'BBSM000a0001'
+      olt: 'BBSIM_OLT_10'
+      service:
+        -
+          name: FTTB_SUBSCRIBER_TRAFFIC
+          c_tag: '102'
+          s_tag: '3102'
+        -
+          name: DPU_ANCP_TRAFFIC
+          c_tag: '4'
+          s_tag: '40'
+        -
+          name: DPU_MGMT_TRAFFIC
+          c_tag: '6'
+          s_tag: '60'
+      uni_id: '2'
+    -
+      onu: 'BBSM000a0002'
+      olt: 'BBSIM_OLT_10'
+      service:
+        -
+          name: FTTB_SUBSCRIBER_TRAFFIC
+          c_tag: '105'
+          s_tag: '3105'
+        -
+          name: DPU_ANCP_TRAFFIC
+          c_tag: '4'
+          s_tag: '40'
+        -
+          name: DPU_MGMT_TRAFFIC
+          c_tag: '6'
+          s_tag: '60'
+      uni_id: '1'
+
+  dst:
+    - ip: null
+    - ip: null
+    - ip: null
diff --git a/tests/dt-workflow/Voltha_DT_FTTB_Tests.robot b/tests/dt-workflow/Voltha_DT_FTTB_Tests.robot
new file mode 100644
index 0000000..226988e
--- /dev/null
+++ b/tests/dt-workflow/Voltha_DT_FTTB_Tests.robot
@@ -0,0 +1,85 @@
+# Copyright 2022 - present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# FIXME Can we use the same test against BBSim and Hardware?
+
+*** Settings ***
+Documentation     Test various DT FTTB end-to-end scenarios
+Suite Setup       Setup Suite
+Test Setup        Setup
+Test Teardown     Teardown
+Suite Teardown    Teardown Suite
+Library           Collections
+Library           String
+Library           OperatingSystem
+Library           XML
+Library           RequestsLibrary
+Library           ../../libraries/DependencyLibrary.py
+Resource          ../../libraries/onos.robot
+Resource          ../../libraries/voltctl.robot
+Resource          ../../libraries/voltha.robot
+Resource          ../../libraries/utils.robot
+Resource          ../../libraries/k8s.robot
+Resource          ../../variables/variables.robot
+Resource          ../../libraries/power_switch.robot
+
+*** Variables ***
+${POD_NAME}       flex-ocp-cord
+${KUBERNETES_CONF}    ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
+${KUBERNETES_CONFIGS_DIR}    ~/pod-configs/kubernetes-configs
+#${KUBERNETES_CONFIGS_DIR}    ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
+${KUBERNETES_YAML}    ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
+${HELM_CHARTS_DIR}    ~/helm-charts
+${VOLTHA_POD_NUM}    8
+${NAMESPACE}      voltha
+${INFRA_NAMESPACE}      default
+${timeout}        60s
+${of_id}          0
+${logical_id}     0
+${uprate}         0
+${dnrate}         0
+${has_dataplane}    True
+${teardown_device}    True
+${scripts}        ../../scripts
+
+# Per-test logging on failure is turned off by default; set this variable to enable
+${container_log_dir}    ${None}
+
+# logging flag to enable Collect Logs, can be passed via the command line too
+# example: -v logging:False
+${logging}    True
+
+*** Test Cases ***
+Sanity E2E Test for OLT/ONU on POD for DT FTTB
+    [Documentation]    Validates E2E Ping Connectivity and object states for the given scenario:
+    ...    Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used
+    ...    Traffic sent with same vlan from different RGs,
+    ...    should reach the NNI port on the OLT with the expected double tagged vlan ids
+    ...    Inner vlans from the RG should not change
+    [Tags]    sanityDtFttb
+    [Setup]    Start Logging    SanityTestDtFttb
+    [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
+    ...           AND             Stop Logging    SanityTestDtFttb
+    Setup
+    Run Keyword If    ${has_dataplane}    Clean Up Linux
+    Perform Sanity Test DT FTTB
+
+*** Keywords ***
+Setup Suite
+    [Documentation]    Set up the test suite
+    Common Test Suite Setup
+    #Restore all ONUs
+    #Run Keyword If    ${has_dataplane}    RestoreONUs    ${num_all_onus}
+    #power_switch.robot needs it to support different vendor's power switch
+    ${switch_type}=    Get Variable Value    ${web_power_switch.type}
+    Run Keyword If  "${switch_type}"!=""    Set Global Variable    ${powerswitch_type}    ${switch_type}