Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [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 | |
| 15 | *** Settings *** |
| 16 | Library Process |
Kailash | f8ff51a | 2018-11-13 13:49:53 -0800 | [diff] [blame] | 17 | Library OperatingSystem |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 18 | Library ../common/auto_test.py |
| 19 | Library ../common/volthaMngr.py |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 20 | Library ../common/preprovisioning.py |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 21 | Library ../common/discovery.py |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 22 | Library ../common/authentication.py |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 23 | Library volthaMngr.VolthaMngr |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 24 | Library preprovisioning.Preprovisioning |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 25 | Library discovery.Discovery |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 26 | Library authentication.Authentication |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 27 | |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 28 | Suite Setup Start Voltha |
| 29 | Suite Teardown Stop Voltha |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 30 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 31 | *** Variables *** |
| 32 | ${LOG_DIR} /tmp/voltha_test_results |
| 33 | ${ROOT_DIR} ${EMPTY} |
| 34 | ${VOLTHA_DIR} ${EMPTY} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 35 | ${ONOS_SSH_PORT} 8101 |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 36 | ${OLT_IP_ADDR} olt.voltha.svc |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 37 | ${OLT_PORT_ID} 50060 |
Kailash | a4d4574 | 2019-02-11 14:46:43 -0800 | [diff] [blame] | 38 | ${LOGICAL_TYPE} olt.voltha.svc |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 39 | ${OLT_TYPE} ponsim_olt |
| 40 | ${ONU_TYPE} ponsim_onu |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 41 | |
| 42 | *** Test Cases *** |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 43 | Olt Pre Provisioning |
| 44 | [Documentation] Olt Pre Provisioning |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 45 | ... This test preprovisions a ponsim-OLT with given IP address and TCP port |
| 46 | ... and then enables both it and a number of ponsim-ONUs with predefined IP/port |
| 47 | ... information. It then verifies that all the physical and logical devices are ACTIVE |
| 48 | ... and REACHEABLE |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 49 | P Set Log Dirs ${LOG_DIR} |
| 50 | P Configure ${OLT_IP_ADDR} ${OLT_PORT_ID} ${OLT_TYPE} ${ONU_TYPE} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 51 | Preprovision Olt |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 52 | Wait Until Keyword Succeeds 60s 2s Query Devices Before Enabling |
| 53 | Status Should Be Success After Preprovision Command |
| 54 | Check Olt Fields Before Enabling |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 55 | Enable |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 56 | Wait Until Keyword Succeeds 60s 2s Query Devices After Enabling |
| 57 | Status Should Be Success After Enable Command |
| 58 | Check Olt Fields After Enabling |
| 59 | Check Onu Fields After Enabling |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 60 | |
| 61 | Olt Onu Discovery |
| 62 | [Documentation] Olt Onu Discovery |
| 63 | ... This test covers both Onu Discovery and yet to be developped Olt Discovery |
| 64 | ... It aims to verify the integrity of all port fields under each discrete device. |
| 65 | ... It also insures that the peers fields contains device Id entries for the corresponding |
| 66 | ... Olt or Onu device. Functionality to support multiple ONU accomodated |
| 67 | ... The extent of the flow validation is limited to checking whether number of Flows is > 0 |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 68 | D Set Log Dirs ${LOG_DIR} |
| 69 | D Configure ${LOGICAL_TYPE} ${OLT_TYPE} ${ONU_TYPE} |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 70 | Olt Discovery |
| 71 | Onu Discovery |
Kailash | a4d4574 | 2019-02-11 14:46:43 -0800 | [diff] [blame] | 72 | Logical Device |
Gilles Depatie | 82dd202 | 2019-02-19 14:31:33 -0500 | [diff] [blame] | 73 | Logical Device Ports Should Exist |
| 74 | Logical Device Should Have At Least One Flow |
Gilles Depatie | 1be639b | 2018-12-06 10:51:08 -0500 | [diff] [blame] | 75 | Olt Ports Should Be Enabled and Active |
| 76 | Onu Ports Should Be Enabled and Active |
| 77 | Olt Should Have At Least One Flow |
| 78 | Onu Should Have At Least One Flow |
| 79 | |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 80 | Radius Authentication |
| 81 | [Documentation] Radius Authentication |
| 82 | ... This test attempts to perform a Radius Authentication from the RG |
| 83 | ... It uses the wpa_supplicant app to authenticate using EAPOL. |
| 84 | ... We then verify the generated log file confirming all the authentication steps |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 85 | A Set Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 86 | Discover RG Pod Name |
| 87 | Discover Freeradius Pod Name |
| 88 | Discover Freeradius Ip Addr |
| 89 | Set Current Freeradius Ip In AAA Json |
| 90 | Alter AAA Application Configuration In Onos Using AAA Json |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 91 | Execute Authentication On RG |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 92 | Verify Authentication Should Have Started |
| 93 | Verify Authentication Should Have Completed |
| 94 | Verify Authentication Should Have Disconnected |
| 95 | Verify Authentication Should Have Terminated |
| 96 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 97 | *** Keywords *** |
| 98 | Start Voltha |
| 99 | [Documentation] Start Voltha infrastructure to run test(s). This includes starting all |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 100 | ... Kubernetes Pods and start collection of logs. PonsimV2 has now been |
| 101 | ... containerized and does not need to be managed separately |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 102 | ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR} |
Gilles Depatie | a85fe81 | 2019-01-23 15:55:53 -0500 | [diff] [blame] | 103 | Set Suite Variable ${ROOT_DIR} |
| 104 | Set Suite Variable ${VOLTHA_DIR} |
| 105 | Set Suite Variable ${LOG_DIR} |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 106 | V Set Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 107 | Stop Voltha |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 108 | Start All Pods |
Kailash | 2da848e | 2018-11-13 10:58:53 -0800 | [diff] [blame] | 109 | Sleep 60 |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 110 | ${pod_status} Run kubectl get pods --all-namespaces |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 111 | Log To Console \n ${pod_status} |
| 112 | Alter Onos Net Cfg |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 113 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 114 | Stop Voltha |
Gilles Depatie | 0bf3135 | 2019-02-04 13:48:41 -0500 | [diff] [blame] | 115 | [Documentation] Stop Voltha infrastructure. This includes clearing all installation milestones |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 116 | ... files and stopping all Kubernetes pods |
Kailash | 8ae83ac | 2019-02-11 12:23:52 -0800 | [diff] [blame] | 117 | Collect Pod Logs |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 118 | Stop All Pods |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 119 | Reset Kube Adm |