[VOL-3122] Rearrange OLT Disable/Enable TC in Functional suite
Change-Id: Id4887ddcc81134d8ffa1bcfe91c3525de467758d
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index 90688ff..b1ec875 100755
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -239,13 +239,13 @@
${jsonCamelCaseFieldnames}= Run Keyword And Return Status
... Dictionary Should Contain Key ${value} adminState
${astate}= Run Keyword If ${jsonCamelCaseFieldNames}
- ... ${astate}= Get From Dictionary ${value} adminState
+ ... Get From Dictionary ${value} adminState
... ELSE
- ... ${astate}= Get From Dictionary ${value} adminstate
+ ... Get From Dictionary ${value} adminstate
${opstatus}= Run Keyword If ${jsonCamelCaseFieldNames}
... Get From Dictionary ${value} operStatus
... ELSE
- ... ${astate}= Get From Dictionary ${value} operstatus
+ ... Get From Dictionary ${value} operstatus
${type}= Get From Dictionary ${value} type
Should Be Equal '${astate}' 'ENABLED' Device ${device_id} port admin_state != ENABLED values=False
Run Keyword If ${all_active} Should Be Equal '${opstatus}' 'ACTIVE'
@@ -650,4 +650,4 @@
${afterFlows}= Evaluate ${beforeFlows} - (${uni_count} * 2)
${targetFlows}= Set Variable If $provisioned=='true' ${afterFlows} ${beforeFlows}
Log ${targetFlows}
- Wait Until Keyword Succeeds 10m 5s Count OpenOLT Device Flows ${targetFlows}
\ No newline at end of file
+ Wait Until Keyword Succeeds 10m 5s Count OpenOLT Device Flows ${targetFlows}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index a1d707e..148667f 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -272,7 +272,7 @@
... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
... Perform disable on the OLT and validate that the pings do not succeed
... Perform enable on the OLT and validate that the pings are successful
- [Tags] functionalDt DisableEnableOLTDt notready
+ [Tags] functionalDt DisableEnableOLTDt
[Setup] Start Logging DisableEnableOLTDt
[Teardown] Run Keywords Collect Logs
... AND Stop Logging DisableEnableOLTDt
@@ -296,10 +296,13 @@
# Remove Subscriber Access (To replicate DT workflow)
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ Sleep 10s
# Delete ONU Device (To replicate DT workflow)
Delete Device ${onu_device_id}
+ Sleep 5s
END
- Sleep 15s
+ Sleep 5s
+ Run Keyword If ${has_dataplane} Clean Up Linux
# Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
Enable Device ${olt_device_id}
Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
@@ -308,7 +311,6 @@
... PON_OLT ETHERNET_NNI
# Waiting extra time for the ONUs to come up
Sleep 60s
- Run Keyword If ${has_dataplane} Clean Up Linux
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Test Delete and ReAdd OLT for DT
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index c941694..67771ea 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -93,46 +93,6 @@
Run Keyword If ${has_dataplane} Clean Up Linux
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
-Test Disable and Enable OLT
- [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 OLT and validate that the pings do not succeed
- ... Perform enable on the OLT and validate that the pings are successful
- [Tags] functional VOL-2410 DisableEnableOLT notready
- [Setup] Start Logging DisableEnableOLT
- [Teardown] Run Keywords Collect Logs
- ... AND Stop Logging DisableEnableOLT
- #Disable the OLT and verify the OLT/ONUs are disabled properly
- ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
- Should Be Equal As Integers ${rc} 0
- Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
- ... ${olt_serial_number}
- 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}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
- Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
- ... UNREACHABLE ${src['onu']} onu=false
- #Verify that ping fails
- Run Keyword If ${has_dataplane}
- ... 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']}
- # Remove Subscriber Access (To replicate ATT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
- ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
- END
- #Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
- Enable Device ${olt_device_id}
- Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
- ... ${olt_serial_number}
- Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
- ... PON_OLT ETHERNET_NNI
- Run Keyword If ${has_dataplane} Clean Up Linux
- Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
-
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
@@ -317,6 +277,48 @@
Run Keyword and Ignore Error Collect Logs
END
+Test Disable and Enable OLT
+ [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 OLT and validate that the pings do not succeed
+ ... Perform enable on the OLT and validate that the pings are successful
+ [Tags] functional VOL-2410 DisableEnableOLT
+ [Setup] Start Logging DisableEnableOLT
+ [Teardown] Run Keywords Collect Logs
+ ... AND Stop Logging DisableEnableOLT
+ #Disable the OLT and verify the OLT/ONUs are disabled properly
+ ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
+ Should Be Equal As Integers ${rc} 0
+ Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
+ ... ${olt_serial_number}
+ 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}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
+ ... UNREACHABLE ${src['onu']} onu=false
+ #Verify that ping fails
+ Run Keyword If ${has_dataplane}
+ ... 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']}
+ # Remove Subscriber Access (To replicate ATT workflow)
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ Sleep 10s
+ END
+ #Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
+ Enable Device ${olt_device_id}
+ Sleep 15s
+ Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
+ ... ${olt_serial_number}
+ Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
+ ... PON_OLT ETHERNET_NNI
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test
+
Delete OLT, ReAdd OLT and Perform Sanity Test
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
... Disable and Delete the OLT