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 |
| 21 | Library volthaMngr.VolthaMngr |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 22 | Library preprovisioning.Preprovisioning |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 23 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 24 | Test Setup Start Voltha |
| 25 | Test Teardown Stop Voltha |
| 26 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 27 | *** Variables *** |
| 28 | ${LOG_DIR} /tmp/voltha_test_results |
| 29 | ${ROOT_DIR} ${EMPTY} |
| 30 | ${VOLTHA_DIR} ${EMPTY} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 31 | ${ONOS_SSH_PORT} 8101 |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 32 | ${OLT_IP_ADDR} olt.voltha.svc |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 33 | ${OLT_PORT_ID} 50060 |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 34 | ${OLT_TYPE} ponsim_olt |
| 35 | ${ONU_TYPE} ponsim_onu |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 36 | |
| 37 | *** Test Cases *** |
| 38 | Provisioning |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 39 | [Documentation] VOLTHA Pre-provisioning |
| 40 | ... This test preprovisions a ponsim-OLT with given IP address and TCP port |
| 41 | ... and then enables both it and a number of ponsim-ONUs with predefined IP/port |
| 42 | ... information. It then verifies that all the physical and logical devices are ACTIVE |
| 43 | ... and REACHEABLE |
| 44 | PSet Log Dirs ${LOG_DIR} |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 45 | Configure ${OLT_IP_ADDR} ${OLT_PORT_ID} ${OLT_TYPE} ${ONU_TYPE} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 46 | Preprovision Olt |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 47 | Wait Until Keyword Succeeds 60s 2s Query Devices Before Enabling |
| 48 | Status Should Be Success After Preprovision Command |
| 49 | Check Olt Fields Before Enabling |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 50 | Enable |
Gilles Depatie | 9651e46 | 2018-11-21 15:58:33 -0500 | [diff] [blame] | 51 | Wait Until Keyword Succeeds 60s 2s Query Devices After Enabling |
| 52 | Status Should Be Success After Enable Command |
| 53 | Check Olt Fields After Enabling |
| 54 | Check Onu Fields After Enabling |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 55 | |
| 56 | *** Keywords *** |
| 57 | Start Voltha |
| 58 | [Documentation] Start Voltha infrastructure to run test(s). This includes starting all |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 59 | ... Kubernetes Pods and start collection of logs. PonsimV2 has now been |
| 60 | ... containerized and does not need to be managed separately |
| 61 | ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR} |
| 62 | VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 63 | Stop Voltha |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 64 | Start All Pods |
Kailash | 2da848e | 2018-11-13 10:58:53 -0800 | [diff] [blame] | 65 | Sleep 60 |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 66 | Collect Pod Logs |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 67 | ${pod_status} Run kubectl get pods --all-namespaces |
| 68 | Log To Console \n ${pod_status} |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 69 | Alter Onos NetCfg |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 70 | |
Gilles Depatie | c68b3ad | 2018-08-21 16:29:03 -0400 | [diff] [blame] | 71 | Stop Voltha |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 72 | [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 73 | ... files and stopping all Kubernetes pods |
Gilles Depatie | 84cb1e7 | 2018-10-26 12:41:33 -0400 | [diff] [blame] | 74 | Stop All Pods |
Kailash | 32ce8e5 | 2018-11-13 13:03:36 -0800 | [diff] [blame] | 75 | Reset Kube Adm |