blob: 0ac9ae4789503769e3fa23be7a726ac5cfae8bbf [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 Depatiec68b3ad2018-08-21 16:29:03 -040023Test Setup Start Voltha
24Test Teardown Stop Voltha
25
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040026*** Variables ***
27${LOG_DIR} /tmp/voltha_test_results
28${ROOT_DIR} ${EMPTY}
29${VOLTHA_DIR} ${EMPTY}
30${PONSIM_PID} ${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
34
35
36*** Test Cases ***
37Provisioning
Gilles Depatie84cb1e72018-10-26 12:41:33 -040038 [Documentation] VOLTHA Pre-provisioning
39 ... This test preprovisions a ponsim-OLT with given IP address and TCP port
40 ... and then enables both it and a number of ponsim-ONUs with predefined IP/port
41 ... information. It then verifies that all the physical and logical devices are ACTIVE
42 ... and REACHEABLE
43 PSet Log Dirs ${LOG_DIR}
44 Configure ${OLT_IP_ADDR} ${OLT_PORT_ID}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040045 Preprovision Olt
Kailash2da848e2018-11-13 10:58:53 -080046 Wait Until Keyword Succeeds 60s 2s Query Devices Before Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040047 Enable
Kailash2da848e2018-11-13 10:58:53 -080048 Wait Until Keyword Succeeds 60s 2s Query Devices After Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040049
50
51*** Keywords ***
52Start Voltha
53 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040054 ... Kubernetes Pods and start collection of logs. PonsimV2 has now been
55 ... containerized and does not need to be managed separately
56 ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR}
57 VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040058 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040059 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -080060 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -040061 Collect Pod Logs
Kailash32ce8e52018-11-13 13:03:36 -080062 ${pod_status} Run kubectl get pods --all-namespaces
63 Log To Console \n ${pod_status}
Gilles Depatie84cb1e72018-10-26 12:41:33 -040064 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040065
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040066Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040067 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
Kailash32ce8e52018-11-13 13:03:36 -080068 ... files and stopping all Kubernetes pods
Gilles Depatie84cb1e72018-10-26 12:41:33 -040069 Stop All Pods
Kailash32ce8e52018-11-13 13:03:36 -080070 Reset Kube Adm