blob: aff869375ff485b1e05a48c76173f7aede230c26 [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
21LIbrary preprovisioning.Preprovisioning
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040022
23Test Setup Start Voltha
24Test Teardown Stop Voltha
25
26
27*** Variables ***
28${LOG_DIR} /tmp/voltha_test_results
29${ROOT_DIR} ${EMPTY}
30${VOLTHA_DIR} ${EMPTY}
31${PONSIM_PID} ${EMPTY}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040032${ONOS_SSH_PORT} 8101
Gilles Depatie84cb1e72018-10-26 12:41:33 -040033${OLT_IP_ADDR} olt.voltha.svc
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040034${OLT_PORT_ID} 50060
35
36
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}
45 Configure ${OLT_IP_ADDR} ${OLT_PORT_ID}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040046 Preprovision Olt
Kailash2da848e2018-11-13 10:58:53 -080047 Wait Until Keyword Succeeds 60s 2s Query Devices Before Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040048 Enable
Kailash2da848e2018-11-13 10:58:53 -080049 Wait Until Keyword Succeeds 60s 2s Query Devices After Enable
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040050
51
52*** Keywords ***
53Start Voltha
54 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040055 ... Kubernetes Pods and start collection of logs. PonsimV2 has now been
56 ... containerized and does not need to be managed separately
57 ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR}
58 VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040059 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040060 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -080061 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -040062 Collect Pod Logs
63 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040064
65
66Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040067 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
68 ... files and stopping all Kubernetes pods
69 Stop All Pods
70 Reset Kube Adm
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040071
72
73