[VOL-2049] Disable/Enable ONU Tests
Change-Id: I9db9aab49fd5bb1cddb0245d397c868d18a8e1cf
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index e519b8b..5bc1a40 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -56,8 +56,7 @@
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
... Validate successful authentication/DHCP/E2E ping for the tech profile that is used
[Tags] sanity test1
- #[Setup] Clean Up Linux
- #[Teardown] NONE
+ [Teardown] NONE
${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
Set Global Variable ${of_id}
@@ -89,12 +88,37 @@
... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
END
+Test Disable and Enable ONU
+ [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
+ ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
+ ... Perform disable on the ONUs and validate that the pings do not succeed
+ ... Perform enable on the ONUs and validate that the pings are successful
+ [Tags] functional test2
+ [Setup] None
+ #[Teardown] None
+
+ FOR ${I} IN RANGE 0 ${num_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+
+ ${onu_device_id}= Get Device ID From SN ${src['onu']}
+ ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
+ ... ${of_id}
+ Disable Device ${onu_device_id}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s Check Ping False ${dst['dp_iface_ip_qinq']}
+ ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ Enable Device ${onu_device_id}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
+ ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s Check Ping True ${dst['dp_iface_ip_qinq']}
+ ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ END
+
Check OLT/ONU Authentication After Radius Pod Restart
[Documentation] After radius restart, validates eapol flows and dhcp allocation
... and validates onu in onos
- [Tags] functional test2
- #[Setup] Clean Up Linux
- [Setup] NONE
+ [Tags] functional test3
+ [Setup] NONE
Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} ${RESTART_POD_NAME}
FOR ${I} IN RANGE 0 ${num_onus}