Andrea Campanella | 4c40463 | 2020-08-26 14:41:36 +0200 | [diff] [blame] | 1 | # Copyright 2020 - 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 ONOS high avaliablity tests |
| 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_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 41 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 42 | ${VOLTHA_POD_NUM} 8 |
| 43 | ${NAMESPACE} default |
| 44 | # For below variable value, using deployment name as using grep for |
| 45 | # parsing radius pod name, we can also use full radius pod name |
| 46 | ${RESTART_POD_NAME} radius |
| 47 | ${timeout} 60s |
| 48 | ${of_id} 0 |
| 49 | ${logical_id} 0 |
| 50 | ${has_dataplane} True |
| 51 | ${teardown_device} True |
| 52 | ${scripts} ../../scripts |
| 53 | ${workflow} ATT |
| 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 | Verify restart ONOS instace master of device after subscriber is provisioned |
| 60 | [Documentation] Restat ONOS instance master of a given device and check that during restart and after the |
| 61 | ... subscriuber still has dataplane traffic. |
| 62 | ... Prerequisite : ONUs are authenticated and pingable, thus setup and sanity is performed. |
| 63 | [Tags] onosHa VOL-3436 onosMasterRestart |
Suchitra Vemuri | 8130be8 | 2020-09-15 16:47:58 -0700 | [diff] [blame] | 64 | [Setup] Start Logging onosMasterRestart |
Andrea Campanella | 4c40463 | 2020-08-26 14:41:36 +0200 | [diff] [blame] | 65 | [Teardown] Run Keywords Collect Logs |
| 66 | ... AND Stop Logging onosMasterRestart |
Suchitra Vemuri | 94f045c | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 67 | Delete All Devices and Verify |
| 68 | Setup |
Andrea Campanella | 4c40463 | 2020-08-26 14:41:36 +0200 | [diff] [blame] | 69 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 70 | Run Keyword If '${workflow}' == 'ATT' Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 71 | Run Keyword If '${workflow}' == 'DT' Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Suchitra Vemuri | c1efa6f | 2020-09-16 11:22:39 -0700 | [diff] [blame] | 72 | ${of_id}= Wait Until Keyword Succeeds 360s 15s Validate OLT Device in ONOS ${olt_serial_number} |
Andrea Campanella | 4c40463 | 2020-08-26 14:41:36 +0200 | [diff] [blame] | 73 | ${node_id}= Wait Until Keyword Succeeds 20s 5s Get Master Instace in ONOS ${of_id} |
| 74 | ${podName} Set Variable ${node_id} |
| 75 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Name ${NAMESPACE} ${podName} |
| 76 | Sleep 60s |
| 77 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Name ${NAMESPACE} |
| 78 | ... ${podName} Running |
| 79 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 80 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 81 | Run Keyword If '${workflow}' == 'ATT' Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 82 | Run Keyword If '${workflow}' == 'DT' Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 83 | Log to console Pod ${podName} deleted and sanity checks passed successfully |
| 84 | |
| 85 | *** Keywords *** |
| 86 | Setup Suite |
| 87 | [Documentation] Set up the test suite |
Suchitra Vemuri | 94f045c | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 88 | Common Test Suite Setup |