blob: 9e764a1080452eec117aa0b0c76c9bff9018717b [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
17Library ../common/auto_test.py
18Library ../common/volthaMngr.py
Gilles Depatie84cb1e72018-10-26 12:41:33 -040019Library ../common/preprovisioning.py
20Library volthaMngr.VolthaMngr
Kailash32ce8e52018-11-13 13:03:36 -080021Library preprovisioning.Preprovisioning
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040022Test Setup Start Voltha
23Test Teardown Stop Voltha
24
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040025*** Variables ***
26${LOG_DIR} /tmp/voltha_test_results
27${ROOT_DIR} ${EMPTY}
28${VOLTHA_DIR} ${EMPTY}
29${PONSIM_PID} ${EMPTY}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040030${ONOS_SSH_PORT} 8101
Gilles Depatie84cb1e72018-10-26 12:41:33 -040031${OLT_IP_ADDR} olt.voltha.svc
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040032${OLT_PORT_ID} 50060
33
34
35*** Test Cases ***
36Provisioning
Gilles Depatie84cb1e72018-10-26 12:41:33 -040037 [Documentation] VOLTHA Pre-provisioning
38 ... This test preprovisions a ponsim-OLT with given IP address and TCP port
39 ... and then enables both it and a number of ponsim-ONUs with predefined IP/port
40 ... information. It then verifies that all the physical and logical devices are ACTIVE
41 ... and REACHEABLE
42 PSet Log Dirs ${LOG_DIR}
43 Configure ${OLT_IP_ADDR} ${OLT_PORT_ID}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040044 Preprovision Olt
Kailash2da848e2018-11-13 10:58:53 -080045 Wait Until Keyword Succeeds 60s 2s Query Devices Before Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040046 Enable
Kailash2da848e2018-11-13 10:58:53 -080047 Wait Until Keyword Succeeds 60s 2s Query Devices After Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040048
49
50*** Keywords ***
51Start Voltha
52 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040053 ... Kubernetes Pods and start collection of logs. PonsimV2 has now been
54 ... containerized and does not need to be managed separately
55 ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR}
56 VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040057 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040058 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -080059 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -040060 Collect Pod Logs
Kailash32ce8e52018-11-13 13:03:36 -080061 ${pod_status} Run kubectl get pods --all-namespaces
62 Log To Console \n ${pod_status}
Gilles Depatie84cb1e72018-10-26 12:41:33 -040063 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040064
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040065Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040066 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
Kailash32ce8e52018-11-13 13:03:36 -080067 ... files and stopping all Kubernetes pods
Gilles Depatie84cb1e72018-10-26 12:41:33 -040068 Stop All Pods
Kailash32ce8e52018-11-13 13:03:36 -080069 Reset Kube Adm