creating Reset SIAB keyword
Change-Id: I32c70f1175726a16bf857ca897a45a9fd278149e
diff --git a/src/test/cord-api/Tests/WorkflowValidations/SIAB.robot b/src/test/cord-api/Tests/WorkflowValidations/SIAB.robot
index c653188..8031bee 100644
--- a/src/test/cord-api/Tests/WorkflowValidations/SIAB.robot
+++ b/src/test/cord-api/Tests/WorkflowValidations/SIAB.robot
@@ -85,7 +85,7 @@
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Service Chain ${onu_device} True
Wait Until Keyword Succeeds 60s 2s Validate Fabric CrossConnect SI ${s_tag} True
Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER}
- Restart RG Pod
+ Reset SIAB Environment
Remove Whitelist
Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
@@ -93,8 +93,7 @@
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Service Chain ${onu_device} False
Wait Until Keyword Succeeds 60s 2s Validate Fabric CrossConnect SI ${s_tag} False
Validate DHCP and Ping True False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER}
- Restart RG Pod
- Create Whitelist
+ Reset SIAB Environment
Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER}
@@ -410,3 +409,21 @@
Update Whitelist with Correct Location
${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id}
+
+Reset SIAB Environment
+ Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER}
+ Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST}
+ Restart RG Pod
+ Wait Until Keyword Succeeds 60s 2s Create Whitelist
+ Wait Until Keyword Succeeds 60s 2s Create Subscriber
+ Reset ONU
+ Wait Until Keyword Succeeds 120s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
+ Wait Until Keyword Succeeds 60s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
+ Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
+ ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1
+ Set Suite Variable ${RG_CONTAINER}
+
+Reset ONU
+ CORD Put /xosapi/v1/volt/onudevices {"admin_state": "DISABLED" } 1
+ Sleep 10
+ CORD Put /xosapi/v1/volt/onudevices {"admin_state": "ENABLED" } 1