Hardik Windlass | a7b34be | 2022-03-22 17:28:31 +0000 | [diff] [blame] | 1 | # Copyright 2022 - 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 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/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 | ${INFRA_NAMESPACE} default |
| 46 | ${timeout} 60s |
| 47 | ${of_id} 0 |
| 48 | ${logical_id} 0 |
| 49 | ${uprate} 0 |
| 50 | ${dnrate} 0 |
| 51 | ${has_dataplane} True |
| 52 | ${teardown_device} True |
| 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 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 59 | # example: -v logging:False |
| 60 | ${logging} True |
| 61 | |
| 62 | *** Test Cases *** |
| 63 | Sanity E2E Test for OLT/ONU on POD for DT FTTB |
| 64 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 65 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 66 | ... Traffic sent with same vlan from different RGs, |
| 67 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 68 | ... Inner vlans from the RG should not change |
| 69 | [Tags] sanityDtFttb |
| 70 | [Setup] Start Logging SanityTestDtFttb |
| 71 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 72 | ... AND Stop Logging SanityTestDtFttb |
| 73 | Setup |
| 74 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 75 | Perform Sanity Test DT FTTB |
| 76 | |
| 77 | *** Keywords *** |
| 78 | Setup Suite |
| 79 | [Documentation] Set up the test suite |
| 80 | Common Test Suite Setup |
| 81 | #Restore all ONUs |
| 82 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
| 83 | #power_switch.robot needs it to support different vendor's power switch |
| 84 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 85 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |