Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Test various functional end-to-end scenarios for TT workflow |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
| 34 | Resource ../../libraries/power_switch.robot |
| 35 | |
| 36 | *** Variables *** |
| 37 | ${POD_NAME} flex-ocp-cord |
| 38 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 39 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 40 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 41 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 42 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 43 | ${VOLTHA_POD_NUM} 8 |
| 44 | ${NAMESPACE} voltha |
| 45 | # For below variable value, using deployment name as using grep for |
| 46 | # parsing radius pod name, we can also use full radius pod name |
| 47 | ${RESTART_POD_NAME} radius |
| 48 | ${timeout} 60s |
| 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
| 51 | ${has_dataplane} True |
Hardik Windlass | 04896f6 | 2021-03-05 16:15:11 +0530 | [diff] [blame] | 52 | ${teardown_device} True |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 53 | ${scripts} ../../scripts |
| 54 | |
| 55 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 56 | ${container_log_dir} ${None} |
| 57 | |
| 58 | *** Test Cases *** |
| 59 | Reboot TT ONUs Physically - Clean Up |
| 60 | [Documentation] This test reboots ONUs physically before execution all the tests |
| 61 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 62 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
| 63 | [Tags] functional PowerSwitch RebootAllTTONUs |
| 64 | [Setup] Start Logging RebootAllTTONUs |
| 65 | [Teardown] Run Keywords Collect Logs |
| 66 | ... AND Stop Logging RebootAllTTONUs |
| 67 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
Suchitra Vemuri | 7255c00 | 2020-11-09 11:44:36 -0800 | [diff] [blame] | 68 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 69 | ${src}= Set Variable ${hosts.src[${I}]} |
| 70 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 71 | Disable Switch Outlet ${src['power_switch_port']} |
TorstenThieme | 2ed1050 | 2021-03-22 18:01:50 +0000 | [diff] [blame] | 72 | Sleep 10s |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 73 | Enable Switch Outlet ${src['power_switch_port']} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 74 | END |
| 75 | |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 76 | Sanity E2E Test for TT (HSIA, VoD, VoIP) |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 77 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 78 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 79 | ... Traffic sent with same vlan from different RGs, |
| 80 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 81 | ... Inner vlans from the RG should not change |
| 82 | [Tags] sanityTT |
| 83 | [Setup] Run Keywords Start Logging SanityTestTT |
| 84 | ... AND Setup |
| 85 | [Teardown] Run Keywords Collect Logs |
| 86 | ... AND Stop Logging SanityTestTT |
| 87 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 88 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test TT |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 89 | #Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 90 | |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 91 | Sanity E2E Test for TT (MCAST) |
| 92 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 93 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 94 | ... Traffic sent with same vlan from different RGs, |
| 95 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 96 | ... Inner vlans from the RG should not change |
| 97 | [Tags] sanityTT-MCAST |
| 98 | [Setup] Run Keyword Start Logging SanityTestTT-MCAST |
| 99 | [Teardown] Run Keywords Collect Logs |
| 100 | ... AND Stop Logging SanityTestTT-MCAST |
| 101 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 102 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test TT MCAST |
| 103 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 104 | *** Keywords *** |
| 105 | Setup Suite |
| 106 | [Documentation] Set up the test suite |
| 107 | Common Test Suite Setup |
| 108 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 109 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 110 | |
| 111 | |
| 112 | Clear All Devices Then Create New Device |
| 113 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 114 | # Remove all devices from voltha and nos |
| 115 | Delete All Devices and Verify |
| 116 | # Execute normal test Setup Keyword |
| 117 | Setup |
| 118 | |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 119 | |
| 120 | Teardown Suite |
| 121 | [Documentation] Tear down steps for the suite |
| 122 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 04896f6 | 2021-03-05 16:15:11 +0530 | [diff] [blame] | 123 | Run Keyword If ${teardown_device} Delete All Devices And Verify |