[VOL-3552] OpenOnu-Go-Adapter: Introduction of testcase tags instead of proprietary flags

Change-Id: I6129f03b987c5c224a0717e722d50bff5cb33473
diff --git a/Makefile b/Makefile
index 88a2f6a..ad378a6 100755
--- a/Makefile
+++ b/Makefile
@@ -88,61 +88,61 @@
 functional-multi-olt: voltha-test
 
 # target to invoke openonu go adapter
-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i onutest $(ROBOT_DEBUG_LOG_OPT)
-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i sanityOnuGo -i functionalOnuGo -v timeout:180s
+openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
 openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke test with openonu go adapter applying 1T4GEM tech-profile at single ONU
-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T4GEM -v logging:True
-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i onutest $(ROBOT_DEBUG_LOG_OPT)
-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T4GEM -v logging:True -v timeout:180s
+1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
+1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 1t4gem-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
 1t4gem-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 1t4gem-openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke test with openonu go adapter applying 1T8GEM tech-profile at single ONU
-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T8GEM -v logging:True
-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i onutest $(ROBOT_DEBUG_LOG_OPT)
-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T8GEM -v logging:True -v timeout:180s
+1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
+1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 1t8gem-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_SINGLE_PON_FILE)
 1t8gem-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 1t8gem-openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke multiple openonu go adapter
-multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i onutest $(ROBOT_DEBUG_LOG_OPT)
-multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v logging:True -i sanityOnuGo -i functionalOnuGo -v timeout:180s
+multi-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 multi-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SCALE_MULT_ONU_FILE)
 multi-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 multi-openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke test with openonu go adapter applying 1T4GEM tech-profile at multiple ONU
-multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T4GEM -v logging:True
-multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i onutest $(ROBOT_DEBUG_LOG_OPT)
-multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T4GEM -v logging:True -v timeout:180s
+multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
+multi-1t4gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 multi-1t4gem-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SCALE_MULT_ONU_FILE)
 multi-1t4gem-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 multi-1t4gem-openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke test with openonu go adapter applying 1T8GEM tech-profile at multiple ONU
-multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:6 -v testmode:SingleStateTime -v timeout:180s
-multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T8GEM -v logging:True
-multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i onutest $(ROBOT_DEBUG_LOG_OPT)
-multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v state2test:omci-flows-pushed -v testmode:SingleStateTime
+multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v techprofile:1T8GEM -v logging:True -v timeout:180s
+multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i sanityOnuGo -i functionalOnuGo
+multi-1t8gem-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 multi-1t8gem-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SCALE_MULT_ONU_FILE)
 multi-1t8gem-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUStateTests.robot
 multi-1t8gem-openonu-go-adapter-test: openonu-go-adapter-tests
 
 # target to invoke test with openonu go adapter applying MIB-Upload-Templating
 mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -v timeout:60s -v logging:True
-mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i onutest $(ROBOT_DEBUG_LOG_OPT)
-mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -X
+mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -i functionalOnuGo
+mib-upload-templating-openonu-go-adapter-test: ROBOT_MISC_ARGS += -e notreadyOnuGo -X $(ROBOT_DEBUG_LOG_OPT)
 mib-upload-templating-openonu-go-adapter-test: ROBOT_CONFIG_FILE := $(ROBOT_SANITY_MULT_PON_FILE)
 mib-upload-templating-openonu-go-adapter-test: ROBOT_FILE := Voltha_ONUTemplateTests.robot
 mib-upload-templating-openonu-go-adapter-test: openonu-go-adapter-tests
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 73cef1f..696041b 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -35,35 +35,21 @@
 # 5 -> tech-profile-config-download-success
 # 6 -> omci-flows-pushed
 # example: -v state2test:5
+# example: -v state2test:omci-flows-pushed
 ${state2test}    6
 # test mode variable, can be passed via the command line too, valid values: SingleState, Up2State, SingleStateTime
 # example: -v testmode:SingleStateTime
 ${testmode}    SingleState
-# flag for execute Tech Profile check, can be passed via the command line too
-# example: -v profiletest:False
-${profiletest}    True
 # used tech profile, can be passed via the command line too, valid values: default (=1T1GEM), 1T4GEM, 1T8GEM
 # example: -v techprofile:1T4GEM
 ${techprofile}    default
-# flag for execute port test, can be passed via the command line too
-# example: -v porttest:False
-${porttest}    True
-# flag for execute flow test, can be passed via the command line too
-# example: -v flowtest:True
-${flowtest}    False
-# flag for execute disable/enable onu device test, can be passed via the command line too
-# example: -v disableenabletest:True
-${disableenabletest}    True
-# flag for execute reconcile onu device test, can be passed via the command line too
-# example: -v reconciletest:True
-${reconciletest}    True
 # flag debugmode is used, if true timeout calculation various, can be passed via the command line too
 # example: -v debugmode:True
 ${debugmode}    False
 # logging flag to enable Collect Logs, can be passed via the command line too
 # example: -v logging:True
 ${logging}    False
-# if True execution will be paused before clean up
+# if True execution will be paused before clean up, only use in case of manual testing, do not use in ci pipeline!
 # example: -v pausebeforecleanup:True
 ${pausebeforecleanup}    False
 ${data_dir}    ../data
@@ -72,7 +58,7 @@
 *** Test Cases ***
 ONU State Test
     [Documentation]    Validates the ONU Go adapter states
-    [Tags]    statetest    onutest
+    [Tags]    sanityOnuGo    StateTestOnuGo
     [Setup]    Run Keywords    Start Logging    ONUStateTest
     ...    AND    Setup Test
     Run Keyword If    ${has_dataplane}    Clean Up Linux
@@ -90,9 +76,10 @@
     [Documentation]    Validates the loaded Tech Profile
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
     ...    Check will be executed only the reached ONU state is 5 (tech-profile-config-download-success) or higher
-    [Tags]    onutest
+    [Tags]    functionalOnuGo   CheckTechProfileOnuGo
     [Setup]    Start Logging    ONUCheckTechProfile
-    Run Keyword If    ${state2test}>=5 and ${profiletest}    Do Check Tech Profile
+    Run Keyword If    '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+    ...    Do Check Tech Profile
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    ONUCheckTechProfile
@@ -100,9 +87,10 @@
 Onu Port Check
     [Documentation]    Validates that all the UNI ports show up in ONOS
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    PortTestOnuGo
     [Setup]    Start Logging    ONUPortTest
-    Run Keyword If    ${porttest}    Do Onu Port Check
+    Run Keyword If    '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+    ...    Do Onu Port Check
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    ONUPortTest
@@ -110,9 +98,9 @@
 Onu Flow Check
     [Documentation]    Validates the onu flows in ONOS and Voltha
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    FlowTestOnuGo    notreadyOnuGo
     [Setup]    Start Logging    ONUFlowTest
-    Run Keyword If    ${state2test}>=6 and ${flowtest}    Do Onu Flow Check
+    Run Keyword If    '${onu_state}'=='omci-flows-pushed'    Do Onu Flow Check
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    ONUFlowTest
@@ -120,9 +108,10 @@
 Disable Enable Onu Device
     [Documentation]    Disables/enables ONU Device and check states
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    DisableEnableOnuGo
     [Setup]    Start Logging    DisableEnableONUDevice
-    Run Keyword If    ${state2test}>=5 and ${disableenabletest}    Do Disable Enable Onu Test
+    Run Keyword If    '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+    ...    Do Disable Enable Onu Test
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    DisableEnableONUDevice
@@ -130,9 +119,10 @@
 Reconcile Onu Device
     [Documentation]    Reconciles ONU Device and check state
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    ReconcileOnuGo
     [Setup]    Start Logging    ReconcileONUDevice
-    Run Keyword If    ${state2test}>=5 and ${reconciletest}    Do Reconcile Onu Device
+    Run Keyword If    '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+    ...    Do Reconcile Onu Device
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    ReconcileONUDevice
@@ -140,9 +130,10 @@
 Power Off Power On Onu Device
     [Documentation]    Power off and Power on of all ONU Devices and check state
     ...    Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    PowerOffPowerOnOnuGo
     [Setup]    Start Logging    PowerOffPowerOnONUDevice
-    Run Keyword If    ${state2test}>=5    Do Power Off Power On Onu Device
+    Run Keyword If    '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+    ...    Do Power Off Power On Onu Device
     ...    ELSE    Pass Execution    ${skip_message}    skipped
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...    AND    Stop Logging    PowerOffPowerOnONUDevice
@@ -152,9 +143,7 @@
     [Documentation]    Set up the test suite
     ${LogInfo}=    Catenate
     ...    \r\nPassed arguments:
-    ...    state2test:${state2test}, testmode:${testmode}, profiletest:${profiletest}, techprofile:${techprofile},
-    ...    porttest:${porttest}, flowtest:${flowtest}, reconciletest:${reconciletest},
-    ...    disableenabletest:${disableenabletest},
+    ...    state2test:${state2test}, testmode:${testmode}, techprofile:${techprofile},
     ...    debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
     Log    ${LogInfo}    console=yes
     Common Test Suite Setup
@@ -171,6 +160,14 @@
     ...    ELSE    Fail    The TechProfile (${techprofile}) is not valid!
     ${onos_ssh_connection}    Open ONOS SSH Connection    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
     Set Suite Variable  ${onos_ssh_connection}
+    # map the passed onu state to reached and make it visible for test suite
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=
+    ...    Map State    ${state2test}
+    Set Suite Variable    ${admin_state}
+    Set Suite Variable    ${oper_status}
+    Set Suite Variable    ${connect_status}
+    Set Suite Variable    ${onu_state_nb}
+    Set Suite Variable    ${onu_state}
     # delete etcd MIB Template Data
     Delete MIB Template Data
 
@@ -216,27 +213,27 @@
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-        Run Keyword If   ${state2test}>=1
+        Run Keyword If   ${onu_state_nb}>=1
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVATING    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=activating-onu
-        Run Keyword If   ${state2test}>=2
+        Run Keyword If   ${onu_state_nb}>=2
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVATING    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=starting-openomci
-        Run Keyword If   ${state2test}>=3
+        Run Keyword If   ${onu_state_nb}>=3
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVATING    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=discovery-mibsync-complete
-        Run Keyword If   ${state2test}>=4
+        Run Keyword If   ${onu_state_nb}>=4
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVE    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=initial-mib-downloaded
-        Run Keyword If   ${state2test}>=5
+        Run Keyword If   ${onu_state_nb}>=5
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVE    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=tech-profile-config-download-success
-        Run Keyword If   ${state2test}>=6
+        Run Keyword If   ${onu_state_nb}>=6
         ...    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ENABLED    ACTIVE    REACHABLE
         ...    ${src['onu']}    onu=True    onu_reason=omci-flows-pushed
@@ -248,7 +245,6 @@
     FOR    ${I}    IN RANGE    0    ${num_onus}
         ${src}=    Set Variable    ${hosts.src[${I}]}
         ${dst}=    Set Variable    ${hosts.dst[${I}]}
-        ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Map State    ${state2test}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
         ...    Validate Device    ${admin_state}    ${oper_status}    ${connect_status}
         ...    ${src['onu']}    onu=True    onu_reason=${onu_state}
@@ -263,7 +259,6 @@
     Create File    ONU_Startup_Time.txt    This file contains the startup times of all ONUs.
     ${list_onus}    Create List
     Build ONU SN List    ${list_onus}
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Map State    ${state2test}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
     ...    Validate ONU Devices MIB State With Duration
     ...    ${onu_state}    ${list_onus}    ${timeStart}    print2console=True
@@ -291,9 +286,9 @@
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Verify Subscriber Access Flows Added For ONU    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
         ...    ${onu_port}    ${nni_port}    ${src['c_tag']}    ${src['s_tag']}
-        #check  for previous state is kept (normally omci-flows-pushed)
-        Do Current State Test    ${state2test}    ${src['onu']}
     END
+    #check  for previous state is kept (normally omci-flows-pushed)
+    Do Current State Test All Onus    ${state2test}
 
 Set Tech Profile
     [Documentation]    This keyword set the passed TechProfile for the test
@@ -378,7 +373,7 @@
     Sleep    5s
     Wait For Pods Ready    ${namespace}    ${list_openonu_apps}
     Do Disable Enable Onu Test
-    Run Keyword If    ${porttest}    Do Onu Port Check
+    Do Onu Port Check
 
 Do Power Off Power On Onu Device
     [Documentation]    This keyword power off/on all onus and checks the states.
@@ -426,7 +421,7 @@
 Do Current State Test
     [Documentation]    This keyword checks the passed state of the given onu.
     [Arguments]    ${state}    ${onu}
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Map State    ${state}
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=    Map State    ${state}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
     ...    Validate Device    ${admin_state}    ${oper_status}    ${connect_status}
     ...    ${onu}    onu=True    onu_reason=${onu_state}
@@ -437,7 +432,7 @@
     [Arguments]    ${state}
     ${list_onus}    Create List
     Build ONU SN List    ${list_onus}
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Map State    ${state}
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=    Map State    ${state}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
     ...    Validate ONU Devices With Duration
     ...    ${admin_state}    ${oper_status}    ${connect_status}
@@ -477,17 +472,17 @@
     [Documentation]    This keyword converts the passed numeric value or name of a onu state to its state values.
     [Arguments]    ${state}
     # create state lists with corresponding return values
-    #                             ADMIN-STATE OPER-STATUS   CONNECT-STATUS ONU-STATE
-    ${state1}    Create List      ENABLED     ACTIVATING    REACHABLE      activating-onu
-    ${state2}    Create List      ENABLED     ACTIVATING    REACHABLE      starting-openomci
-    ${state3}    Create List      ENABLED     ACTIVATING    REACHABLE      discovery-mibsync-complete
-    ${state4}    Create List      ENABLED     ACTIVE        REACHABLE      initial-mib-downloaded
-    ${state5}    Create List      ENABLED     ACTIVE        REACHABLE      tech-profile-config-download-success
-    ${state6}    Create List      ENABLED     ACTIVE        REACHABLE      omci-flows-pushed
-    ${state7}    Create List      DISABLED    UNKNOWN       REACHABLE      omci-admin-lock
-    ${state8}    Create List      ENABLED     ACTIVE        REACHABLE      onu-reenabled
-    ${state9}    Create List      ENABLED     DISCOVERED    UNREACHABLE    stopping-openomci
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Set Variable If
+    #                             ADMIN-STATE OPER-STATUS   CONNECT-STATUS ONU-STATE (number/name)
+    ${state1}    Create List      ENABLED     ACTIVATING    REACHABLE      1    activating-onu
+    ${state2}    Create List      ENABLED     ACTIVATING    REACHABLE      2    starting-openomci
+    ${state3}    Create List      ENABLED     ACTIVATING    REACHABLE      3    discovery-mibsync-complete
+    ${state4}    Create List      ENABLED     ACTIVE        REACHABLE      4    initial-mib-downloaded
+    ${state5}    Create List      ENABLED     ACTIVE        REACHABLE      5    tech-profile-config-download-success
+    ${state6}    Create List      ENABLED     ACTIVE        REACHABLE      6    omci-flows-pushed
+    ${state7}    Create List      DISABLED    UNKNOWN       REACHABLE      7    omci-admin-lock
+    ${state8}    Create List      ENABLED     ACTIVE        REACHABLE      8    onu-reenabled
+    ${state9}    Create List      ENABLED     DISCOVERED    UNREACHABLE    9    stopping-openomci
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=    Set Variable If
     ...    '${state}'=='1' or '${state}'=='activating-onu'                          ${state1}
     ...    '${state}'=='2' or '${state}'=='starting-openomci'                       ${state2}
     ...    '${state}'=='3' or '${state}'=='discovery-mibsync-complete'              ${state3}
@@ -497,4 +492,4 @@
     ...    '${state}'=='7' or '${state}'=='omci-admin-lock'                         ${state7}
     ...    '${state}'=='8' or '${state}'=='onu-reenabled'                           ${state8}
     ...    '${state}'=='9' or '${state}'=='stopping-openomci'                       ${state9}
-    [Return]    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}
+    [Return]    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}
diff --git a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
index dedf443..7e788ff 100755
--- a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
@@ -57,7 +57,7 @@
     ...                - duration of second ONU should be at least 10 times faster than the first one
     ...                - MIB-Upload-Data should not requested via OMCI by second ONU
     ...                - MIB-Upload-Data should read from etcd
-    [Tags]    onutest
+    [Tags]    functionalOnuGo    MibTemplateOnuGo
     [Setup]    Run Keywords    Start Logging    ONUMibTemplateTest
     ...    AND    Setup
     Perform ONU MIB Template Data Test
@@ -93,24 +93,26 @@
 
 Perform ONU MIB Template Data Test
     [Documentation]    This keyword performs ONU MIB Template Data Test
-    ${firstonu}=    Set Variable    0
-    ${secondonu}=    Set Variable    1
-    ${state2test}=    Set Variable    6
+    ${firstonu}=      Set Variable    0
+    ${secondonu}=     Set Variable    1
+    ${state2test}=    Set Variable    omci-flows-pushed
     Set Global Variable    ${state2test}
     Run Keyword If    ${has_dataplane}    Clean Up Linux
     # Start first Onu
-    Log    \r\nONU BBSM00000001: startup with MIB upload cycle and storage of template data to etcd.    console=yes
-    ${result}=    Exec Pod    ${NAMESPACE}    bbsim    bbsimctl onu poweron BBSM00000001
-    Should Contain    ${result}    successfully    msg=Can not poweron BBSM00000001    values=False
+    ${src}=    Set Variable    ${hosts.src[${0}]}
+    Log    \r\nONU ${src['onu']}: startup with MIB upload cycle and storage of template data to etcd.    console=yes
+    ${result}=    Exec Pod    ${NAMESPACE}    bbsim    bbsimctl onu poweron ${src['onu']}
+    Should Contain    ${result}    successfully    msg=Can not poweron ${src['onu']}    values=False
     ${timeStart}=    Get Current Date
     ${firstonustartup}=    Get ONU Startup Duration    ${firstonu}    ${timeStart}
     # check MIB Template data stored in etcd
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    3s
     ...    Verify MIB Template Data Available
     # Start second Onu
-    Log    ONU BBSM00000002: startup without MIB upload cycle by using of template data of etcd.    console=yes
-    ${result}=    Exec Pod    ${NAMESPACE}    bbsim    bbsimctl onu poweron BBSM00000002
-    Should Contain    ${result}    successfully    msg=Can not poweron BBSM00000002    values=False
+    ${src}=    Set Variable    ${hosts.src[${1}]}
+    Log    ONU ${src['onu']}: startup without MIB upload cycle by using of template data of etcd.    console=yes
+    ${result}=    Exec Pod    ${NAMESPACE}    bbsim    bbsimctl onu poweron ${src['onu']}
+    Should Contain    ${result}    successfully    msg=Can not poweron ${src['onu']}    values=False
     ${timeStart}=    Get Current Date
     ${secondonustartup}=    Get ONU Startup Duration    ${secondonu}    ${timeStart}
     # compare both durations, second onu should be at least 3 times faster
@@ -122,7 +124,8 @@
     [Documentation]    This keyword delivers startup duration of onu
     [Arguments]    ${onu}    ${starttime}
     ${src}=    Set Variable    ${hosts.src[${onu}]}
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Map State    ${state2test}
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=
+    ...    Map State    ${state2test}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    50ms
     ...    Validate Device    ${admin_state}    ${oper_status}    ${connect_status}
     ...    ${src['onu']}    onu=True    onu_reason=${onu_state}
@@ -157,16 +160,17 @@
     [Documentation]    This keyword converts the passed numeric value or name of a onu state to its state values.
     [Arguments]    ${state}
     # create state lists with corresponding return values
-    #                             ADMIN-STATE OPER-STATUS   CONNECT-STATUS ONU-STATE
-    ${state1}    Create List      ENABLED     ACTIVATING    REACHABLE      activating-onu
-    ${state2}    Create List      ENABLED     ACTIVATING    REACHABLE      starting-openomci
-    ${state3}    Create List      ENABLED     ACTIVATING    REACHABLE      discovery-mibsync-complete
-    ${state4}    Create List      ENABLED     ACTIVE        REACHABLE      initial-mib-downloaded
-    ${state5}    Create List      ENABLED     ACTIVE        REACHABLE      tech-profile-config-download-success
-    ${state6}    Create List      ENABLED     ACTIVE        REACHABLE      omci-flows-pushed
-    ${state7}    Create List      DISABLED    UNKNOWN       REACHABLE      omci-admin-lock
-    ${state8}    Create List      ENABLED     ACTIVE        REACHABLE      onu-reenabled
-    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}=    Set Variable If
+    #                             ADMIN-STATE OPER-STATUS   CONNECT-STATUS ONU-STATE (number/name)
+    ${state1}    Create List      ENABLED     ACTIVATING    REACHABLE      1    activating-onu
+    ${state2}    Create List      ENABLED     ACTIVATING    REACHABLE      2    starting-openomci
+    ${state3}    Create List      ENABLED     ACTIVATING    REACHABLE      3    discovery-mibsync-complete
+    ${state4}    Create List      ENABLED     ACTIVE        REACHABLE      4    initial-mib-downloaded
+    ${state5}    Create List      ENABLED     ACTIVE        REACHABLE      5    tech-profile-config-download-success
+    ${state6}    Create List      ENABLED     ACTIVE        REACHABLE      6    omci-flows-pushed
+    ${state7}    Create List      DISABLED    UNKNOWN       REACHABLE      7    omci-admin-lock
+    ${state8}    Create List      ENABLED     ACTIVE        REACHABLE      8    onu-reenabled
+    ${state9}    Create List      ENABLED     DISCOVERED    UNREACHABLE    9    stopping-openomci
+    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}=    Set Variable If
     ...    '${state}'=='1' or '${state}'=='activating-onu'                          ${state1}
     ...    '${state}'=='2' or '${state}'=='starting-openomci'                       ${state2}
     ...    '${state}'=='3' or '${state}'=='discovery-mibsync-complete'              ${state3}
@@ -175,4 +179,5 @@
     ...    '${state}'=='6' or '${state}'=='omci-flows-pushed'                       ${state6}
     ...    '${state}'=='7' or '${state}'=='omci-admin-lock'                         ${state7}
     ...    '${state}'=='8' or '${state}'=='onu-reenabled'                           ${state8}
-    [Return]    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state}
+    ...    '${state}'=='9' or '${state}'=='stopping-openomci'                       ${state9}
+    [Return]    ${admin_state}    ${oper_status}    ${connect_status}    ${onu_state_nb}    ${onu_state}