[VOL-4256] Upgraded DT soak job with bbsim subscriber provisioning

Change-Id: I7a828927f29b652feff1dc769912b35f03566139
diff --git a/libraries/onos.robot b/libraries/onos.robot
index 82d6f76..d5a859c 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -742,6 +742,14 @@
     ...    /onos/olt/oltapp/${of_id}/${onu_port}
     Should Be Equal As Strings    ${resp.status_code}    200
 
+Count Enabled UNI Ports
+    [Documentation]    Count all the UNI Ports on a Device
+    [Arguments]     ${ip}    ${port}   ${of_id}
+    ${count}=    Execute ONOS CLI Command use single connection    ${ip}    ${port}
+    ...    ports -e ${of_id} | grep -v SWITCH | grep -v nni | wc -l
+    Log    ${count}
+    [Return]    ${count}
+
 List Enabled UNI Ports
     [Documentation]  List all the UNI Ports, the only way we have is to filter out the one called NNI
     ...     Creates a list of dictionaries
diff --git a/tests/data/onf-soak-pod-sadis-DT.json b/tests/data/onf-soak-pod-sadis-DT.json
index 14a34ac..b79e236 100644
--- a/tests/data/onf-soak-pod-sadis-DT.json
+++ b/tests/data/onf-soak-pod-sadis-DT.json
@@ -3,7 +3,7 @@
     "org.opencord.sadis": {
       "sadis": {
         "integration": {
-          "url" : "http://bbsim-sadis-server.voltha.svc:58080/subscribers/%s",
+          "url" : "http://bbsim-sadis-server.infra.svc:58080/subscribers/%s",
           "cache": {
             "enabled": false,
             "maxsize": 50,
@@ -52,7 +52,7 @@
       },
       "bandwidthprofile":{
         "integration":{
-          "url" : "http://bbsim-sadis-server.voltha.svc:58080/profiles/%s",
+          "url" : "http://bbsim-sadis-server.infra.svc:58080/profiles/%s",
           "cache":{
             "enabled":true,
             "maxsize":40,
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 4ea2937..d088bb4 100755
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -98,6 +98,7 @@
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    soakPodCreateBBSimLoad
     ${num_bbsim}    Get Length    ${bbsim}
+    @{bbsim_olt_of_id_list}=    Create List
     FOR    ${I}    IN RANGE    0    ${num_bbsim}
         ${ip}    Evaluate    ${bbsim}[${I}].get("ip")
         ${serial_number}    Evaluate    ${bbsim}[${I}].get("serial")
@@ -108,12 +109,22 @@
         Enable Device    ${bbsim_olt_device_id}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Validate OLT Device    ENABLED    ACTIVE    REACHABLE    ${serial_number}
-        ${olt_of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS
+        ${bbsim_olt_of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS
         ...    ${serial_number}
-        Log    ${olt_of_id}
+        Log    ${bbsim_olt_of_id}
+        Append To List    ${bbsim_olt_of_id_list}    ${bbsim_olt_of_id}
     END
     # Extra sleep time for ONUs to come up Active
-    Sleep    30s
+    Sleep    60s
+    FOR    ${bbsim_olt_of_id}    IN    @{bbsim_olt_of_id_list}
+        Provision all subscribers on device    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${ONOS_SSH_IP}    ${ONOS_REST_PORT}
+        ...    ${bbsim_olt_of_id}
+        ${total_onus_per_bbsim_olt}=    Count Enabled UNI Ports    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+        ...    ${bbsim_olt_of_id}
+        Wait for all flows to in ADDED state    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+        ...     ${bbsim_olt_of_id}     dt    ${total_onus_per_bbsim_olt}    1    true
+        ...     false    false    false    true
+    END
 
 Sanity E2E Test for OLT/ONU on POD for DT
     [Documentation]    Validates E2E Ping Connectivity and object states for the given scenario: