fix sanity test tt workflow

- correct service_type from MC to mcast in yaml file
- correct and improve supress_add_subscriber handling
- remove tt sanity test mcast for openonu-go-adapter reconcile tests
  (tt sanity test mcast does not run with bbsim)

Change-Id: Ideedefd32ce0f40b41de8d84a4381e756b0a1d62
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 0936c48..2810abb 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -334,8 +334,10 @@
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Verify Subscriber Access Flows Added For ONU DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
         ...    ${onu_port}    ${nni_port}    ${src['s_tag']}
-        # Verify ONU state in voltha, in case of previous dis- and enable of ONU state will be onu-reenabled
-        ${onu_reasons}=  Create List     omci-flows-pushed    onu-reenabled
+        # Verify ONU state in voltha
+        ${onu_reasons}=  Create List     omci-flows-pushed
+        # In case of previous dis- and enable of ONU and no further subscriber add actions state will be onu-reenabled
+        Run Keyword If    ${supress_add_subscriber}    Append To List    ${onu_reasons}    onu-reenabled
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
         ...    ENABLED    ACTIVE    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=${onu_reasons}
@@ -403,7 +405,7 @@
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
         ${service_type}=    Get Variable Value    ${src['service_type']}    "null"
-        Run Keyword IF    '${service_type}' != 'mcast'    Sanity Test TT one ONU    ${src}    ${dst}
+        Run Keyword IF    '${service_type}' != 'mcast'    Sanity Test TT one ONU    ${src}    ${dst}    ${supress_add_subscriber}
         Run Keyword and Ignore Error    Collect Logs
     END
     Run Keyword and Ignore Error    Collect Logs
@@ -426,12 +428,15 @@
     # Check ONU port is Enabled in ONOS
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds   120s   2s
     ...    Verify ONU Port Is Enabled   ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${src['onu']}
-    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
+    Run Keyword Unless    ${supress_add_subscriber}
+    ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
     ...    Execute ONOS CLI Command    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
     ...    volt-add-subscriber-access ${of_id} ${onu_port}
     Sleep    30s
-    # Verify ONU state in voltha, in case of previous dis- and enable of ONU state will be onu-reenabled
-    ${onu_reasons}=  Create List     tech-profile-config-download-success    omci-flows-pushed    onu-reenabled
+    # Verify ONU state in voltha
+    ${onu_reasons}=  Create List     omci-flows-pushed
+    # In case of previous dis- and enable of ONU and no further subscriber add actions state will be onu-reenabled
+    Run Keyword If    ${supress_add_subscriber}    Append To List    ${onu_reasons}    onu-reenabled
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
     ...    ENABLED    ACTIVE    REACHABLE
     ...    ${src['onu']}    onu=True    onu_reason=${onu_reasons}
@@ -460,7 +465,7 @@
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
         ${service_type}=    Get Variable Value    ${src['service_type']}    "null"
         Run Keyword IF    '${service_type}' == 'mcast'    Sanity Test TT MCAST one ONU    ${src}
-        ...    ${dst}
+        ...    ${dst}    ${supress_add_subscriber}
         Run Keyword and Ignore Error    Collect Logs
     END
     Run Keyword and Ignore Error    Collect Logs
@@ -507,12 +512,15 @@
     # Check ONU port is Enabled in ONOS
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds   120s   2s
     ...    Verify ONU Port Is Enabled   ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${src['onu']}
-    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
+    Run Keyword Unless    ${supress_add_subscriber}
+    ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    2
     ...    Execute ONOS CLI Command    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
     ...    volt-add-subscriber-access ${of_id} ${onu_port}
     Sleep    30s
-    # Verify ONU state in voltha, in case of previous dis- and enable of ONU state will be onu-reenabled
-    ${onu_reasons}=  Create List     tech-profile-config-download-success    omci-flows-pushed    onu-reenabled
+    # Verify ONU state in voltha
+    ${onu_reasons}=  Create List     omci-flows-pushed
+    # In case of previous dis- and enable of ONU and no further subscriber add actions state will be onu-reenabled
+    Run Keyword If    ${supress_add_subscriber}    Append To List    ${onu_reasons}    onu-reenabled
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
     ...    ENABLED    ACTIVE    REACHABLE
     ...    ${src['onu']}    onu=True    onu_reason=${onu_reasons}
diff --git a/tests/data/bbsim-kind-tt.yaml b/tests/data/bbsim-kind-tt.yaml
old mode 100644
new mode 100755
index 56706cf..5e4adaf
--- a/tests/data/bbsim-kind-tt.yaml
+++ b/tests/data/bbsim-kind-tt.yaml
@@ -54,7 +54,7 @@
       olt: 'BBSIM_OLT_10'
       c_tag: '55'
       s_tag: '550'
-      service_type: 'MC'
+      service_type: 'mcast'
 
   dst:
     - ip: null
diff --git a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
index 441dc6b..9b3c80a 100755
--- a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
@@ -265,7 +265,7 @@
     Run Keyword If    ${usekill2restart}    Kill And Check Onu Adaptor    ${namespace}
     ...    ELSE    Restart And Check Onu Adaptor    ${namespace}
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT
     ...    ELSE       Perform Sanity Test
 
 Do Reconcile For Disabled Onu Device
@@ -290,7 +290,7 @@
         Enable Device    ${olt_device_id}
     END
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT
     ...    ELSE       Perform Sanity Test
     Disable Onu Device
     ${alternativeonustates}=  Create List     omci-flows-deleted
@@ -305,7 +305,7 @@
     Wait for all ONU Ports in ONOS Disabled    ${onos_ssh_connection}
     Enable Onu Device
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT     ${suppressaddsubscriber}
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT    ${suppressaddsubscriber}
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT    ${suppressaddsubscriber}
     ...    ELSE       Perform Sanity Test    ${suppressaddsubscriber}
 
 Do Reconcile In Omci-Flows-Pushed
@@ -329,12 +329,12 @@
         Enable Device    ${olt_device_id}
     END
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT
     ...    ELSE       Perform Sanity Test
     Run Keyword If    ${usekill2restart}    Kill And Check Onu Adaptor    ${namespace}
     ...    ELSE    Restart And Check Onu Adaptor    ${namespace}
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT     ${suppressaddsubscriber}
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT    ${suppressaddsubscriber}
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT    ${suppressaddsubscriber}
     ...    ELSE       Perform Sanity Test    ${suppressaddsubscriber}
     Disable Onu Device
     ${alternativeonustates}=  Create List     omci-flows-deleted
@@ -344,5 +344,5 @@
     Wait for all ONU Ports in ONOS Disabled    ${onos_ssh_connection}
     Enable Onu Device
     Run Keyword If    "${workflow}"=="DT"    Perform Sanity Test DT     ${suppressaddsubscriber}
-    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Tests TT    ${suppressaddsubscriber}
+    ...    ELSE IF    "${workflow}"=="TT"    Perform Sanity Test TT    ${suppressaddsubscriber}
     ...    ELSE       Perform Sanity Test    ${suppressaddsubscriber}