blob: 68cd3053f499d4747eee435d44c43841222992a0 [file] [log] [blame]
Gilles Depatiec68b3ad2018-08-21 16:29:03 -04001# 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 ***
16Library Process
Kailashf8ff51a2018-11-13 13:49:53 -080017Library OperatingSystem
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040018Library ../common/auto_test.py
19Library ../common/volthaMngr.py
Gilles Depatie84cb1e72018-10-26 12:41:33 -040020Library ../common/preprovisioning.py
21Library volthaMngr.VolthaMngr
Kailash32ce8e52018-11-13 13:03:36 -080022Library preprovisioning.Preprovisioning
Gilles Depatie9651e462018-11-21 15:58:33 -050023
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040024Test Setup Start Voltha
25Test Teardown Stop Voltha
26
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040027*** Variables ***
28${LOG_DIR} /tmp/voltha_test_results
29${ROOT_DIR} ${EMPTY}
30${VOLTHA_DIR} ${EMPTY}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040031${ONOS_SSH_PORT} 8101
Gilles Depatie84cb1e72018-10-26 12:41:33 -040032${OLT_IP_ADDR} olt.voltha.svc
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040033${OLT_PORT_ID} 50060
Gilles Depatie9651e462018-11-21 15:58:33 -050034${OLT_TYPE} ponsim_olt
35${ONU_TYPE} ponsim_onu
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040036
37*** Test Cases ***
38Provisioning
Gilles Depatie84cb1e72018-10-26 12:41:33 -040039 [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 Depatie9651e462018-11-21 15:58:33 -050045 Configure ${OLT_IP_ADDR} ${OLT_PORT_ID} ${OLT_TYPE} ${ONU_TYPE}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040046 Preprovision Olt
Gilles Depatie9651e462018-11-21 15:58:33 -050047 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 Depatiec68b3ad2018-08-21 16:29:03 -040050 Enable
Gilles Depatie9651e462018-11-21 15:58:33 -050051 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 Depatiec68b3ad2018-08-21 16:29:03 -040055
56*** Keywords ***
57Start Voltha
58 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040059 ... 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 Depatiec68b3ad2018-08-21 16:29:03 -040063 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040064 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -080065 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -040066 Collect Pod Logs
Kailash32ce8e52018-11-13 13:03:36 -080067 ${pod_status} Run kubectl get pods --all-namespaces
68 Log To Console \n ${pod_status}
Gilles Depatie84cb1e72018-10-26 12:41:33 -040069 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040070
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040071Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040072 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
Kailash32ce8e52018-11-13 13:03:36 -080073 ... files and stopping all Kubernetes pods
Gilles Depatie84cb1e72018-10-26 12:41:33 -040074 Stop All Pods
Kailash32ce8e52018-11-13 13:03:36 -080075 Reset Kube Adm