[VOL-4647] Added DT FTTB Sanity Test

Change-Id: I499705bd744204a67b709234f424fcdc3c17d881
diff --git a/Makefile b/Makefile
index bbc4052..e483a0d 100755
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@
              --configure TooManyTestCases:50 -e TooManyTestCases \
              --configure TooFewTestSteps:1 \
              --configure TooFewKeywordSteps:1 \
-             --configure FileTooLong:1600 -e FileTooLong \
+             --configure FileTooLong:2000 -e FileTooLong \
              -e TrailingWhitespace
 
 PYTHON_FILES := $(wildcard libraries/*.py)
@@ -55,6 +55,7 @@
 ROBOT_SANITY_MULTI_UNI_MULTIPLE_OLT_FILE     ?= $(ROOT_DIR)/tests/data/bbsim-kind-multi-uni-2OLTx2ONUx2PON.yaml
 ROBOT_SANITY_TT_MULTI_UNI_SINGLE_PON_FILE    ?= $(ROOT_DIR)/tests/data/bbsim-kind-multi-uni-tt.yaml
 ROBOT_SANITY_TT_MULTI_UNI_MULTIPLE_OLT_FILE     ?= $(ROOT_DIR)/tests/data/bbsim-kind-multi-uni-2OLTx2ONUx2PON-tt.yaml
+ROBOT_SANITY_DT_FTTB_SINGLE_PON_FILE    ?= $(ROOT_DIR)/tests/data/bbsim-kind-dt-fttb-1OLTx1PONx2ONUx2UNI.yaml
 
 # for backwards compatibility
 sanity-kind: sanity-single-kind
@@ -90,6 +91,12 @@
 sanity-kind-dt: ROBOT_FILE := Voltha_DT_PODTests.robot
 sanity-kind-dt: voltha-dt-test
 
+# target to invoke DT FTTB Workflow Sanity
+sanity-kind-dt-fttb: ROBOT_MISC_ARGS += -i sanityDtFttb $(ROBOT_DEBUG_LOG_OPT)
+sanity-kind-dt-fttb: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_DT_FTTB_SINGLE_PON_FILE)
+sanity-kind-dt-fttb: ROBOT_FILE := Voltha_DT_FTTB_Tests.robot
+sanity-kind-dt-fttb: voltha-dt-test
+
 functional-single-kind: ROBOT_MISC_ARGS += -i sanityORfunctional -e PowerSwitch $(ROBOT_DEBUG_LOG_OPT)
 functional-single-kind: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
 functional-single-kind: bbsim-kind
diff --git a/libraries/onos.robot b/libraries/onos.robot
index aff9866..cecfc19 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -349,6 +349,109 @@
     ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:Any | grep OUTPUT:${onu_port}
     Should Not Be Empty    ${downstream_flow_1_added}
 
+Verify Subscriber Access Flows Added for DT FTTB
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${s_tag}    ${c_tag}
+    [Documentation]    Verifies if the Subscriber Access Flows are added in ONOS for the ONU
+    # Upstream
+    # ONU
+    ${us_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${c_tag} | grep transition=TABLE:1
+    Should Not Be Empty    ${us_flow_onu_added}
+    # OLT
+    ${us_flow_olt_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${c_tag} |
+    ...    grep VLAN_ID:${s_tag} | grep OUTPUT:${nni_port}
+    ${us_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${us_flow_olt_cmd}
+    Should Not Be Empty    ${us_flow_olt_added}
+    # Downstream
+    # OLT
+    ${ds_flow_olt_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
+    ...    grep VLAN_ID:${c_tag} | grep transition=TABLE:1
+    ${ds_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${ds_flow_olt_cmd}
+    Should Not Be Empty    ${ds_flow_olt_added}
+    # ONU
+    ${ds_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${c_tag} | grep OUTPUT:${onu_port}
+    Should Not Be Empty    ${ds_flow_onu_added}
+
+Verify DPU ANCP Flows Added for DT FTTB
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${s_tag}    ${c_tag}
+    [Documentation]    Verifies if the DPU ANCP Flows are added in ONOS for the ONU
+    # Upstream
+    # ONU
+    ${us_flow_onu_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${c_tag} |
+    ...    grep VLAN_ID:${s_tag} | grep transition=TABLE:1
+    ${us_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${us_flow_onu_cmd}
+    Should Not Be Empty    ${us_flow_onu_added}
+    # OLT
+    ${us_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${s_tag} | grep OUTPUT:${nni_port}
+    Should Not Be Empty    ${us_flow_olt_added}
+    # Downstream
+    # OLT
+    ${ds_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} | grep transition=TABLE:1
+    Should Not Be Empty    ${ds_flow_olt_added}
+    # ONU
+    ${ds_flow_onu_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
+    ...    grep VLAN_ID:${c_tag} | grep OUTPUT:${onu_port}
+    ${ds_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${ds_flow_onu_cmd}
+    Should Not Be Empty    ${ds_flow_onu_added}
+
+Verify DPU MGMT Flows Added for DT FTTB
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${s_tag}    ${c_tag}
+    [Documentation]    Verifies if the DPU MGMT Flows are added in ONOS for the ONU
+    # Upstream
+    # ONU
+    ${us_flow_onu_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${c_tag} |
+    ...    grep VLAN_ID:${s_tag} | grep transition=TABLE:1
+    ${us_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${us_flow_onu_cmd}
+    Should Not Be Empty    ${us_flow_onu_added}
+    # OLT
+    ${us_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${s_tag} | grep OUTPUT:${nni_port}
+    Should Not Be Empty    ${us_flow_olt_added}
+    # Downstream
+    # OLT
+    ${ds_flow_olt_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} | grep transition=TABLE:1
+    Should Not Be Empty    ${ds_flow_olt_added}
+    # ONU
+    ${ds_flow_onu_cmd}=    Catenate
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
+    ...    grep VLAN_ID:${c_tag} | grep OUTPUT:${onu_port}
+    ${ds_flow_onu_added}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ${ds_flow_onu_cmd}
+    Should Not Be Empty    ${ds_flow_onu_added}
+
+Verify ONOS Flows Added for DT FTTB
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${service}
+    [Documentation]    Verifies if the Flows are added in ONOS for the ONU
+    ${num_services}=    Get Length    ${service}
+    FOR     ${I}    IN RANGE    0    ${num_services}
+        ${service_name}=    Set Variable    ${service[${I}]['name']}
+        ${stag}=    Set Variable    ${service[${I}]['s_tag']}
+        ${ctag}=    Set Variable    ${service[${I}]['c_tag']}
+        Run Keyword If    '${service_name}' == 'FTTB_SUBSCRIBER_TRAFFIC'
+        ...    Verify Subscriber Access Flows Added for DT FTTB    ${ip}    ${port}
+        ...    ${olt_of_id}    ${onu_port}    ${nni_port}    ${stag}    ${ctag}
+        ...    ELSE IF    '${service_name}' == 'DPU_ANCP_TRAFFIC'
+        ...    Verify DPU ANCP Flows Added for DT FTTB    ${ip}    ${port}
+        ...    ${olt_of_id}    ${onu_port}    ${nni_port}    ${stag}    ${ctag}
+        ...    ELSE IF    '${service_name}' == 'DPU_MGMT_TRAFFIC'
+        ...    Verify DPU MGMT Flows Added for DT FTTB    ${ip}    ${port}
+        ...    ${olt_of_id}    ${onu_port}    ${nni_port}    ${stag}    ${ctag}
+    END
+
 Verify Subscriber Access Flows Added Count DT
     [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${expected_flows}
     [Documentation]    Matches for total number of subscriber access flows added for all onus
@@ -391,13 +494,26 @@
     Should Not Be Empty    ${downstream_flow_igmp_added}
 
 Get Programmed Subscribers
-    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${filter}=${EMPTY}
     [Documentation]    Retrieves the subscriber details at a given location
-    ${sub_location}=    Catenate    SEPARATOR=/    ${olt_of_id}    ${onu_port}
-    ${programmed_sub}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
-    ...    volt-programmed-subscribers | grep ${sub_location}
+    ${cmd}=    Set Variable If    '${filter}' == '${EMPTY}'
+    ...    volt-programmed-subscribers ${olt_of_id} ${onu_port}
+    ...    volt-programmed-subscribers ${olt_of_id} ${onu_port} | grep ${filter} --color=none
+    ${programmed_sub}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}    ${cmd}
     [Return]    ${programmed_sub}
 
+Verify Programmed Subscribers DT FTTB
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${service}
+    [Documentation]    Verifies the subscriber is present at a given location
+    ${num_services}=    Get Length    ${service}
+    FOR    ${I}    IN RANGE    0    ${num_services}
+        ${service_name}=    Set Variable    ${service[${I}]['name']}
+        ${programmed_subscriber}=    Get Programmed Subscribers    ${ip}    ${port}    ${olt_of_id}    ${onu_port}
+        ...    ${service_name}
+        Log    ${programmed_subscriber}
+        Should Not Be Empty    ${programmed_subscriber}
+    END
+
 Get Upstream and Downstream Bandwidth Profile Name
     [Arguments]    ${programmed_sub}
     [Documentation]    Retrieves the upstream and downstream bandwidth profile name
@@ -500,11 +616,11 @@
     [Return]    ${cir}    ${cbs}    ${pir}    ${pbs}    ${gir}
 
 Verify Meters in ONOS Ietf
-    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${filter}=${EMPTY}
     [Documentation]    Verifies the meters with BW Ietf format (currently, DT workflow uses this format)
     # Get programmed subscriber
     ${programmed_sub}=    Get Programmed Subscribers    ${ip}    ${port}
-    ...    ${olt_of_id}    ${onu_port}
+    ...    ${olt_of_id}    ${onu_port}    ${filter}
     Log    ${programmed_sub}
     ${us_bw_profile}    ${ds_bw_profile}    Get Upstream and Downstream Bandwidth Profile Name
     ...    ${programmed_sub}
diff --git a/libraries/utils.robot b/libraries/utils.robot
index ec94c5f..defd154 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -351,6 +351,69 @@
         ...    ${dst['container_name']}
     END
 
+Perform Sanity Test DT FTTB
+    [Documentation]    This keyword iterate all OLTs and performs Sanity Test Procedure for DT-FTTB workflow
+    ...    For repeating sanity test without subscriber changes set flag supress_add_subscriber=True.
+    ...    In all other (common) cases flag has to be set False (default).
+    [Arguments]    ${supress_add_subscriber}=False
+    FOR    ${J}    IN RANGE    0    ${num_olts}
+        ${olt_serial_number}=    Set Variable    ${list_olts}[${J}][sn]
+        ${olt_device_id}=    Get OLTDeviceID From OLT List    ${olt_serial_number}
+        ${of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS
+        ...    ${olt_serial_number}
+        ${nni_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get NNI Port in ONOS    ${of_id}
+        Perform Sanity Test DT FTTB Per OLT    ${of_id}    ${nni_port}    ${olt_serial_number}
+        ...    ${supress_add_subscriber}
+    END
+
+Perform Sanity Test DT FTTB Per OLT
+    [Arguments]    ${of_id}    ${nni_port}    ${olt_serial_number}    ${supress_add_subscriber}=False
+    [Documentation]    This keyword performs Sanity Test Procedure for DT-FTTB Workflow
+    ...    Sanity test performs dhcp and pings (without EAPOL and DHCP flows) for all the ONUs given for the POD
+    ...    This keyword can be used to call in any other tests where sanity check is required
+    ...    and avoids duplication of code.
+    ...    For repeating sanity test without subscriber changes set flag supress_add_subscriber=True.
+    ...    In all other (common) cases flag has to be set False (default).
+    FOR    ${I}    IN RANGE    0    ${num_all_onus}
+        ${src}=    Set Variable    ${hosts.src[${I}]}
+        ${dst}=    Set Variable    ${hosts.dst[${I}]}
+        Continue For Loop If    "${olt_serial_number}"!="${src['olt']}"
+        ${onu_device_id}=    Get Device ID From SN    ${src['onu']}
+        ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s
+        ...    Get ONU Port in ONOS    ${src['onu']}    ${of_id}    ${src['uni_id']}
+        # Check ONU port is Enabled in ONOS
+        Wait Until Keyword Succeeds   120s   2s
+        ...    Verify UNI Port Is Enabled   ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${src['onu']}    ${src['uni_id']}
+        Run Keyword Unless    ${supress_add_subscriber}
+        ...    Execute ONOS CLI Command use single connection    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+        ...    volt-add-subscriber-access ${of_id} ${onu_port}
+        # Verify ONOS flows are added for the ONU port
+        Wait Until Keyword Succeeds    ${timeout}    5s
+        ...    Verify ONOS Flows Added For DT FTTB    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+        ...    ${onu_port}    ${nni_port}    ${src['service']}
+        # Verify that the Subscriber is present at the given location
+        Wait Until Keyword Succeeds    ${timeout}    5s
+        ...    Verify Programmed Subscribers DT FTTB    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+        ...    ${onu_port}    ${src['service']}
+        # Verify ONU state in voltha
+        ${onu_reasons}=  Create List     omci-flows-pushed
+        Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
+        ...    ENABLED    ACTIVE    REACHABLE
+        ...    ${src['onu']}    onu=True    onu_reason=${onu_reasons}
+        # Verify Meters in ONOS
+        Wait Until Keyword Succeeds    ${timeout}    5s
+        ...    Verify Meters in ONOS Ietf    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}    ${onu_port}
+        ...    ${src['service'][0]['name']}
+        # Verify Mac Learner Mappings
+        Wait Until Keyword Succeeds    ${timeout}    5s    Validate Mac Learner Mapping in ONOS
+        ...    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}    ${onu_port}    ${src['service'][2]['s_tag']}
+        Run Keyword If    ${has_dataplane}    Validate DHCP and Ping    True
+        ...    True    ${src['dp_iface_name']}    ${src['s_tag']}    ${src['c_tag']}    ${dst['dp_iface_ip_qinq']}
+        ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
+        ...    ${dst['dp_iface_name']}    ${dst['ip']}    ${dst['user']}    ${dst['pass']}    ${dst['container_type']}
+        ...    ${dst['container_name']}
+    END
+
 Validate All OLT Flows
     [Documentation]    This keyword iterate all OLTs and performs Sanity Test Procedure for DT workflow
     FOR    ${J}    IN RANGE    0    ${num_olts}
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}