adjustments to ATT_TEST001
Change-Id: I0965c5cd620051e64e3af1b3bc16fdf67f52df61
diff --git a/src/test/cord-api/Framework/Subscriber.robot b/src/test/cord-api/Framework/Subscriber.robot
index 3a36bf8..ea23a1f 100644
--- a/src/test/cord-api/Framework/Subscriber.robot
+++ b/src/test/cord-api/Framework/Subscriber.robot
@@ -69,3 +69,15 @@
${id}= Retrieve Subscriber ${ctag}
${api_result}= restApi.ApiChameleonDelete VOLT_SUBSCRIBER ${id}
Should Be True ${api_result}
+
+Delete IP Addresses from Interface on Remote Host
+ [Arguments] ${ip} ${user} ${pass} ${interface} ${prompt}=$ ${prompt_timeout}=60s
+ [Documentation] Deletes all ip addresses assigned to a particular interface on a remote host
+ ${conn_id}= SSHLibrary.Open Connection ${ip} prompt=${prompt} timeout=${prompt_timeout}
+ SSHLibrary.Login ${user} ${pass}
+ SSHLibrary.Write sudo ip addr flush dev ${interface}; echo $?
+ Read Until [sudo] password for ${user}:
+ SSHLibrary.Write ${pass}
+ ${result}= Read Until ${prompt}
+ SSHLibrary.Close Connection
+ Should Contain ${rc} 0
\ No newline at end of file
diff --git a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.txt b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.txt
index 767c6f7..27da4b6 100644
--- a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.txt
+++ b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.txt
@@ -77,10 +77,13 @@
Teardown
[Documentation] Delete xos objects and kill process on src host
- Kill Linux Process ${src_ip} ${src_user} ${src_pass} [w]pa_supplicant
- Kill Linux Process ${src_ip} ${src_user} ${src_pass} [d]hclient
+ ##in some tests, these processes will not get started
+ Run Keyword And Ignore Error Kill Linux Process ${src_ip} ${src_user} ${src_pass} [w]pa_supplicant
+ Run Keyword And Ignore Error Kill Linux Process ${src_ip} ${src_user} ${src_pass} [d]hclient
+ Delete IP Addresses from Interface on Remote Host ${src_ip} ${src_user} ${src_pass} ${src_iface}
Clean Up Objects ${VOLT_SUBSCRIBER}
- Clean Up Objects ${VOLT_DEVICE}
+ ##need to keep retrying to delete olt device until subscriber is completely removed from xos
+ Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_DEVICE}
Clean Up Objects ${ATT_WHITELIST}
Validate ONU States