[SEBA-696] new test for multiple ONUs
Change-Id: I5225d406a3ccd3b6718756bff1acb8509cac8132
diff --git a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test002.robot b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test002.robot
index 5c27f6e..e4b1c63 100644
--- a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test002.robot
+++ b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test002.robot
@@ -23,7 +23,7 @@
Library OperatingSystem
Library XML
Library RequestsLibrary
-Library /home/cord/voltha/tests/atests/common/testCaseUtils.py
+Library /home/ubuntu/voltha/tests/atests/common/testCaseUtils.py
Library ../../Framework/utils/utils.py
Resource ../../Framework/utils/utils.robot
Library ../../Framework/restApi.py
@@ -58,6 +58,7 @@
#[Setup] None
[Teardown] None
[Tags] multipleONU-test1
+ Log $[src0['onu']}
Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${src0['onu']}
Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${src0['onu']}
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${src0['onu']}
@@ -66,6 +67,7 @@
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${src0['onu']}
Validate DHCP and Ping True True ${src0['dp_iface_name']} ${src0['s_tag']} ${src0['c_tag']} ${dst0['dp_iface_ip_qinq']} ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']} ${dst0['dp_iface_name']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
#Second ONU
+ Log $[src1['onu']}
Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${src1['onu']}
Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${src1['onu']}
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${src1['onu']}
@@ -83,12 +85,37 @@
... Delete the second ONU from the whitelist
... Validate that pings fail on the second ONU
... Validate that the first ONU can still ping
- #[Setup] None
+ [Setup] None
+ [Teardown] None
[Tags] multipleONU-test2
#Second ONU
- Remove Whitelist $[src1['onu']}
+ Remove Whitelist ${src1['onu']}
Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${src1['onu']}
- Wait Until Keyword Succeeds 60s 2s Check Ping False ${dst1['dst_iface_ip_qinq']} ${src1['dp_iface_name']} ${src1['ip']} ${src1['user']} ${src1['pass']}
+ Wait Until Keyword Succeeds 60s 2s Check Ping False ${dst1['dp_iface_ip_qinq']} ${src1['dp_iface_name']} ${src1['ip']} ${src1['user']} ${src1['pass']} ${src1['container_type']} ${src1['container_name']}
+ # Validate that the first ONU can still ping
+ Validate DHCP and Ping True True ${src0['dp_iface_name']} ${src0['s_tag']} ${src0['c_tag']} ${dst0['dp_iface_ip_qinq']} ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']} ${dst0['dp_iface_name']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
+
+Readd the deleted ONU to the whitelist while other ONU exists
+ [Documentation] Test with two ONUs(same s-tag) - readd deleted ONU to the whitelist
+ ... Validates E2E Ping Connectivity and object states for the given scenario:
+ ... After validating authentication/dhcp/ping from the above tests
+ ... Add the second ONU to the whitelist
+ ... Perform authentication/dhcp/ping on the second ONU
+ ... Validate that pings succeed on the second ONU
+ ... Validate that the first ONU can still ping
+ [Setup] None
+ [Teardown] None
+ [Tags] multipleONU-test3
+ #Second ONU
+ Create Whitelist 1
+ Log $[src1['onu']}
+ Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${src1['onu']}
+ Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${src1['onu']}
+ Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${src1['onu']}
+ Validate Authentication True ${src1['dp_iface_name']} wpa_supplicant.conf ${src1['ip']} ${src1['user']} ${src1['pass']} ${src1['container_type']} ${src1['container_name']}
+ Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${src1['onu']}
+ Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${src1['onu']}
+ Validate DHCP and Ping True True ${src1['dp_iface_name']} ${src1['s_tag']} ${src1['c_tag']} ${dst1['dp_iface_ip_qinq']} ${src1['ip']} ${src1['user']} ${src1['pass']} ${src1['container_type']} ${src1['container_name']} ${dst1['dp_iface_name']} ${dst1['ip']} ${dst1['user']} ${dst1['pass']} ${dst1['container_type']} ${dst1['container_name']}
# Validate that the first ONU can still ping
Validate DHCP and Ping True True ${src0['dp_iface_name']} ${src0['s_tag']} ${src0['c_tag']} ${dst0['dp_iface_ip_qinq']} ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']} ${dst0['dp_iface_name']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
@@ -196,6 +223,7 @@
Remove Whitelist
[Arguments] ${onu_device}
+ Log ${onu_device}
${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
CORD Delete ${ATT_WHITELIST} ${whitelist_id}