Joey Armstrong | 9fadcbe | 2024-01-17 19:00:37 -0500 | [diff] [blame] | 1 | # Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors |
bharat raj | 58488b3 | 2023-05-11 22:46:18 +0530 | [diff] [blame] | 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 DT FTTB end-to-end scenarios |
| 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/vgc.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils_vgc.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
| 34 | Resource ../../libraries/power_switch.robot |
| 35 | |
| 36 | |
| 37 | *** Variables *** |
| 38 | ${POD_NAME} flex-ocp-cord |
| 39 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 41 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 42 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 43 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 44 | ${VOLTHA_POD_NUM} 8 |
| 45 | ${NAMESPACE} voltha |
| 46 | ${INFRA_NAMESPACE} default |
| 47 | ${timeout} 60s |
| 48 | ${of_id} 0 |
| 49 | ${logical_id} 0 |
| 50 | ${uprate} 0 |
| 51 | ${dnrate} 0 |
| 52 | ${has_dataplane} True |
| 53 | ${teardown_device} True |
| 54 | ${scripts} ../../scripts |
| 55 | |
| 56 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 57 | ${container_log_dir} ${None} |
| 58 | |
| 59 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 60 | # example: -v logging:False |
| 61 | ${logging} True |
| 62 | |
| 63 | *** Test Cases *** |
| 64 | Sanity E2E Test for OLT/ONU on POD for DT FTTB |
| 65 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 66 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 67 | ... Traffic sent with same vlan from different RGs, |
| 68 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 69 | ... Inner vlans from the RG should not change |
| 70 | [Tags] sanityDtFttb |
| 71 | [Setup] Start Logging SanityTestDtFttb |
| 72 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 73 | ... AND Stop Logging SanityTestDtFttb |
| 74 | Setup |
| 75 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 76 | Perform Sanity Test DT FTTB |
| 77 | |
| 78 | *** Keywords *** |
| 79 | Setup Suite |
| 80 | [Documentation] Set up the test suite |
| 81 | Common Test Suite Setup |
| 82 | #Restore all ONUs |
| 83 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
| 84 | #power_switch.robot needs it to support different vendor's power switch |
| 85 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 86 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |