adding arping requests for subscriber ping tests

Change-Id: I978a650114ecdc981f09bc74ad2f0453e60f2664
diff --git a/Jenkinsfile-rcordlite-zerotouch b/Jenkinsfile-rcordlite-zerotouch
index 3f39f0c..414e169 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_ip:${deployment_config.dstHost.hostIp} 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_usr:${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
                     """
                 } catch(error) { currentBuild.result = 'FAILURE' }
             }
diff --git a/src/test/cord-api/Tests/Subscriber_StatusChecks.txt b/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
index c8cb507..c236bfe 100644
--- a/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
+++ b/src/test/cord-api/Tests/Subscriber_StatusChecks.txt
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test suite for checking the subscriber status after discovery
-Suite Setup       Read InputFile
+Suite Setup       Setup
 Test Template     Subscriber Status Test
 Library           Collections
 Library           String
@@ -20,6 +20,8 @@
 ${src_user}       user
 ${src_pass}       pass
 ${dst_ip}         X.X.X.X
+${dst_usr}        user
+${dst_pass}       pass
 ${dst_gateway}    X.X.X.X
 ${dst_host_ip}    X.X.X.X
 
@@ -32,6 +34,12 @@
                       PUSH                     0
 
 *** Keywords ***
+Setup
+    [Documentation]    Read input file and send arping requests from host/dst to their gateways
+    Read InputFile
+    Ping Gateway    ${src_ip}    ${src_user}    ${src_pass}    ${src_gateway}
+    Ping Gateway    ${dst_ip}    ${dst_user}    ${dst_pass}    ${dst_gateway}
+
 Read InputFile
     ${SubscriberList}=    utils.jsonToList    ${PATHFILE}   SubscriberInfo 
     Set Suite Variable    ${slist}    ${SubscriberList}
@@ -60,7 +68,7 @@
     ${Subscriber_Id}=    Get From Dictionary    ${getJsonDict}   id
     Set Global Variable    ${Subscriber_Id}
     Should Be Equal    ${status}    awaiting-auth
-    Wait Until Keyword Succeeds    60s    2s    Test Ping    FAIL    ${src_ip}    ${src_user}    ${src_pass}    ${dst_ip}
+    Wait Until Keyword Succeeds    60s    2s    Test Ping    ${ENABLE_STATUS}    ${src_ip}    ${src_user}    ${src_pass}    ${dst_host_ip}
     #Set Global Variable    ${Subscriber_Id}
 
 Subscriber Status Change
@@ -68,7 +76,7 @@
     ${status}=    Create Dictionary    status=enabled
     ${api_result_status}=    restApi.ApiChameleonPut    VOLT_SUBSCRIBER    ${status}    ${Subscriber_Id}
     Should Be True    ${api_result_status}
-    Wait Until Keyword Succeeds    60s    2s    Test Ping    PASS    ${src_ip}    ${src_user}    ${src_pass}    ${dst_ip}
+    Wait Until Keyword Succeeds    60s    2s    Test Ping    ${ENABLE_STATUS}    ${src_ip}    ${src_user}    ${src_pass}    ${dst_host_ip}
 
 Push MAC and IP For Subscriber
     [Arguments]    ${listIndex}
@@ -79,3 +87,12 @@
     ${input_dict}=    Create Dictionary    mac_address=${mac_address}    ip_address=${ip_address}
     ${api_result_status}=    restApi.ApiChameleonPut    VOLT_SUBSCRIBER    ${input_dict}    ${Subscriber_Id}
     Should Be True    ${api_result_status}
+    Wait Until Keyword Succeeds    60s    2s    Test Ping    ${MACIP_STATUS}    ${src_ip}    ${src_user}    ${src_pass}    ${dst_host_ip}
+
+Ping Gateway
+    [Documentation]    SSH's into a host and sends an arping to its gateway for host discovery
+    [Arguments]    ${ip}    ${user}    ${pass}    ${gateway}    ${prompt}=$    ${prompt_timeout}=60s
+    ${conn_id}=    SSHLibrary.Open Connection    ${ip}    prompt=${prompt}    timeout=${prompt_timeout}
+    SSHLibrary.Login    ${user}    ${pass}
+    ${result}=    SSHLibrary.Execute Command    sudo arping -c 3 ${gateway}
+    SSHLibrary.Close Connection