subscriber dataplane test re-work

Change-Id: Ie643d8b67a0f1f4d5bb350443a6206fa9014e4fe
diff --git a/Jenkinsfile-rcordlite-topdown b/Jenkinsfile-rcordlite-topdown
index 47365cd..677ab93 100644
--- a/Jenkinsfile-rcordlite-topdown
+++ b/Jenkinsfile-rcordlite-topdown
@@ -188,7 +188,7 @@
                     pybot -d Log -T RealOLT_Test.txt || true
                     sleep 90
                     pybot -d Log -T Subscriber_TopDown.txt || true
-                    pybot -d Log -T -v src_ip:${deployment_config.srcHost.ip} -v src_user:${deployment_config.srcHost.user} -v src_pass:${deployment_config.srcHost.pass} -v dst_user:${deployment_config.dstHost.user} -v dst_pass:${deployment_config.dstHost.pass} -v dst_ip:${deployment_config.dstHost.ip} -v dst_host_ip:${deployment_config.dstHost.hostIp} -v src_gateway:${deployment_config.srcHost.gateway} -v dst_gateway:${deployment_config.dstHost.gateway} -v ENABLE_STATUS:PASS -v MACIP_STATUS:PASS Subscriber_StatusChecks.txt || true
+                    pybot -d Log -T -v src_ip:${deployment_config.srcHost.ip} -v src_user:${deployment_config.srcHost.user} -v src_pass:${deployment_config.srcHost.pass} -v dst_user:${deployment_config.dstHost.user} -v dst_pass:${deployment_config.dstHost.pass} -v dst_ip:${deployment_config.dstHost.ip} -v dst_host_ip:${deployment_config.dstHost.hostIp} -v src_gateway:${deployment_config.srcHost.gateway} -v dst_gateway:${deployment_config.dstHost.gateway} -v init_state:disabled -v INITIAL_STATUS:FAIL -v ENABLE_STATUS:PASS -e zerotouch Subscriber_StatusChecks.txt || true
                     """
                 } catch(error) { currentBuild.result = 'FAILURE' }
             }
diff --git a/Jenkinsfile-rcordlite-zerotouch b/Jenkinsfile-rcordlite-zerotouch
index 3f35233..68ac580 100644
--- a/Jenkinsfile-rcordlite-zerotouch
+++ b/Jenkinsfile-rcordlite-zerotouch
@@ -206,7 +206,7 @@
                     export KUBECONFIG=/home/cord/${deployment_config.pod_config}
                     cd /home/cord/cord-tester/src/test/cord-api/Tests/
                     pybot -d Log -T HippieOSS_instances.txt || true
-                    pybot -d Log -T -v src_ip:${deployment_config.srcHost.ip} -v src_user:${deployment_config.srcHost.user} -v src_pass:${deployment_config.srcHost.pass} -v dst_user:${deployment_config.dstHost.user} -v dst_pass:${deployment_config.dstHost.pass} -v dst_ip:${deployment_config.dstHost.ip} -v dst_host_ip:${deployment_config.dstHost.hostIp} -v src_gateway:${deployment_config.srcHost.gateway} -v dst_gateway:${deployment_config.dstHost.gateway} -v ENABLE_STATUS:FAIL -v MACIP_STATUS:PASS Subscriber_StatusChecks.txt || true
+                    pybot -d Log -T -v src_ip:${deployment_config.srcHost.ip} -v src_user:${deployment_config.srcHost.user} -v src_pass:${deployment_config.srcHost.pass} -v dst_user:${deployment_config.dstHost.user} -v dst_pass:${deployment_config.dstHost.pass} -v dst_ip:${deployment_config.dstHost.ip} -v dst_host_ip:${deployment_config.dstHost.hostIp} -v src_gateway:${deployment_config.srcHost.gateway} -v dst_gateway:${deployment_config.dstHost.gateway} -v init_state:awaiting-auth -v ENABLE_STATUS:FAIL -v MACIP_STATUS:PASS Subscriber_StatusChecks.txt || true
                     """
                 } catch(error) { currentBuild.result = 'FAILURE' }
             }
diff --git a/src/test/cord-api/Tests/HippieOSS_instances.txt b/src/test/cord-api/Tests/HippieOSS_instances.txt
index a22dfe6..b2c8d1a 100644
--- a/src/test/cord-api/Tests/HippieOSS_instances.txt
+++ b/src/test/cord-api/Tests/HippieOSS_instances.txt
@@ -32,27 +32,9 @@
     [Arguments]    ${listIndex}
     Set Global Variable    ${HippieOSS_Id}    ${EMPTY}
     Log    ${HippieOSS_Id}
-    Wait Until Keyword Succeeds    300s    5s    Validate HippieOSSInstances Populated    ${listIndex}
-    ${json_result}=    restApi.ApiGet    OSS_SERVICEINSTANCE 
-    Log    ${json_result}
-    ${SubscriberList} =    Get Variable Value    ${slist}
-    ${SubscriberDict}=    utils.listToDict    ${SubscriberList}    ${listIndex}
-    Log    ${SubscriberDict}
-    ${onu_device}=    utils.getFieldValueFromDict    ${subscriberDict}   onu_device
-    ${json_result_list}=    Get From dictionary    ${json_result}    items
-    ${getJsonDict}=    utils.getDictFromListOfDict    ${json_result_list}    serial_number    ${onu_device}
-    ${serial_number}=	Get From Dictionary    ${getJsonDict}    serial_number 
-    ${of_dpid}=    Get From Dictionary    ${getJsonDict}    of_dpid 
-    ${HippieOSS_Id}=    Get From Dictionary    ${getJsonDict}   id
-    Set Global Variable    ${HippieOSS_Id}
-    # Create Dictionary
-    ${input_dict}=    Create Dictionary    serial_number=${serial_number}     of_dpid=${of_dpid}
-    # Re PUT the same data to HippieOSS Service Instances
-    ${result}=    restApi.ApiChameleonPut    OSS_SERVICEINSTANCE    ${input_dict}    ${HippieOSS_Id}
-    Should Be True    ${result}
+    Wait Until Keyword Succeeds    600s    10s    Validate Subscriber Synced
 
-Validate HippieOSSInstances Populated
-    [Arguments]    ${listIndex}
+Validate Subscriber Synced
     ${json_result}=    restApi.ApiGet    OSS_SERVICEINSTANCE
     Log    ${json_result}
     ${SubscriberList} =    Get Variable Value    ${slist}
@@ -61,6 +43,17 @@
     ${onu_device}=    utils.getFieldValueFromDict    ${subscriberDict}   onu_device
     ${json_result_list}=    Get From dictionary    ${json_result}    items
     ${getJsonDict}=    utils.getDictFromListOfDict    ${json_result_list}    serial_number    ${onu_device}
-    ${serial_number}=	Get From Dictionary    ${getJsonDict}    serial_number
+    ${serial_number}=   Get From Dictionary    ${getJsonDict}    serial_number
     ${of_dpid}=    Get From Dictionary    ${getJsonDict}    of_dpid
     ${HippieOSS_Id}=    Get From Dictionary    ${getJsonDict}   id
+    Set Global Variable    ${HippieOSS_Id}
+    # Create Dictionary
+    ${input_dict}=    Create Dictionary    serial_number=${serial_number}     of_dpid=${of_dpid}
+    # Re PUT the same data to HippieOSS Service Instances
+    ${result}=    restApi.ApiChameleonPut    OSS_SERVICEINSTANCE    ${input_dict}    ${HippieOSS_Id}
+    Should Be True    ${result}
+    ${json_result}=    restApi.ApiGet    VOLT_SUBSCRIBER
+    Log    ${json_result}
+    ${json_result_list}=    Get From dictionary    ${json_result}    items
+    ${getJsonDict}=    utils.getDictFromListOfDict    ${json_result_list}    onu_device    ${onu_device}
+    ${status}=  Get From Dictionary    ${getJsonDict}    status
diff --git a/src/test/cord-api/Tests/Subscriber_StatusChecks.txt b/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
index 5b2bf29..cebb7ff 100644
--- a/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
+++ b/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
@@ -20,10 +20,11 @@
 ${src_user}       user
 ${src_pass}       pass
 ${dst_ip}         X.X.X.X
-${dst_user}        user
+${dst_user}       user
 ${dst_pass}       pass
 ${dst_gateway}    X.X.X.X
 ${dst_host_ip}    X.X.X.X
+${init_state}     xxxxxxx
 
 *** Test Cases ***    TYPE                         LISTINDEX
 Test Status Subscriber-1
@@ -32,6 +33,7 @@
                       STATUSCHANGE             0
 Push MACandIP Subscriber-1
                       PUSH                     0
+    [Tags]    zerotouch
 
 *** Keywords ***
 Setup
@@ -67,9 +69,8 @@
     ${status}=	Get From Dictionary    ${getJsonDict}    status
     ${Subscriber_Id}=    Get From Dictionary    ${getJsonDict}   id
     Set Global Variable    ${Subscriber_Id}
-    ${expected_status}=    utils.getFieldValueFromDict    ${subscriberDict}   status
-    Should Be Equal    ${status}    ${expected_status}
-    Wait Until Keyword Succeeds    60s    2s    Test Ping    ${ENABLE_STATUS}    ${src_ip}    ${src_user}    ${src_pass}    ${dst_host_ip}
+    Should Be Equal    ${status}    ${init_state}
+    Wait Until Keyword Succeeds    60s    2s    Test Ping    ${INITIAL_STATUS}    ${src_ip}    ${src_user}    ${src_pass}    ${dst_host_ip}
     #Set Global Variable    ${Subscriber_Id}
 
 Subscriber Status Change