blob: 66a15bd04c22ca1658d5f606e651563e61338177 [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
Gilles Depatie1be639b2018-12-06 10:51:08 -050021Library ../common/discovery.py
Gilles Depatie84cb1e72018-10-26 12:41:33 -040022Library volthaMngr.VolthaMngr
Kailash32ce8e52018-11-13 13:03:36 -080023Library preprovisioning.Preprovisioning
Gilles Depatie1be639b2018-12-06 10:51:08 -050024Library discovery.Discovery
Gilles Depatie9651e462018-11-21 15:58:33 -050025
Gilles Depatie1be639b2018-12-06 10:51:08 -050026Suite Setup Start Voltha
27Suite Teardown Stop Voltha
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040028
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040029*** Variables ***
30${LOG_DIR} /tmp/voltha_test_results
31${ROOT_DIR} ${EMPTY}
32${VOLTHA_DIR} ${EMPTY}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040033${ONOS_SSH_PORT} 8101
Gilles Depatie84cb1e72018-10-26 12:41:33 -040034${OLT_IP_ADDR} olt.voltha.svc
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040035${OLT_PORT_ID} 50060
Gilles Depatie9651e462018-11-21 15:58:33 -050036${OLT_TYPE} ponsim_olt
37${ONU_TYPE} ponsim_onu
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040038
39*** Test Cases ***
Gilles Depatie1be639b2018-12-06 10:51:08 -050040Olt Pre Provisioning
41 [Documentation] Olt Pre Provisioning
Gilles Depatie84cb1e72018-10-26 12:41:33 -040042 ... This test preprovisions a ponsim-OLT with given IP address and TCP port
43 ... and then enables both it and a number of ponsim-ONUs with predefined IP/port
44 ... information. It then verifies that all the physical and logical devices are ACTIVE
45 ... and REACHEABLE
46 PSet Log Dirs ${LOG_DIR}
Gilles Depatie1be639b2018-12-06 10:51:08 -050047 PConfigure ${OLT_IP_ADDR} ${OLT_PORT_ID} ${OLT_TYPE} ${ONU_TYPE}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040048 Preprovision Olt
Gilles Depatie9651e462018-11-21 15:58:33 -050049 Wait Until Keyword Succeeds 60s 2s Query Devices Before Enabling
50 Status Should Be Success After Preprovision Command
51 Check Olt Fields Before Enabling
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040052 Enable
Gilles Depatie9651e462018-11-21 15:58:33 -050053 Wait Until Keyword Succeeds 60s 2s Query Devices After Enabling
54 Status Should Be Success After Enable Command
55 Check Olt Fields After Enabling
56 Check Onu Fields After Enabling
Gilles Depatie1be639b2018-12-06 10:51:08 -050057
58Olt Onu Discovery
59 [Documentation] Olt Onu Discovery
60 ... This test covers both Onu Discovery and yet to be developped Olt Discovery
61 ... It aims to verify the integrity of all port fields under each discrete device.
62 ... It also insures that the peers fields contains device Id entries for the corresponding
63 ... Olt or Onu device. Functionality to support multiple ONU accomodated
64 ... The extent of the flow validation is limited to checking whether number of Flows is > 0
65 DSet Log Dirs ${LOG_DIR}
66 DConfigure ${OLT_TYPE} ${ONU_TYPE}
67 Olt Discovery
68 Onu Discovery
69 Olt Ports Should Be Enabled and Active
70 Onu Ports Should Be Enabled and Active
71 Olt Should Have At Least One Flow
72 Onu Should Have At Least One Flow
73
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040074*** Keywords ***
75Start Voltha
76 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040077 ... Kubernetes Pods and start collection of logs. PonsimV2 has now been
78 ... containerized and does not need to be managed separately
79 ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR}
80 VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040081 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040082 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -080083 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -040084 Collect Pod Logs
Kailash32ce8e52018-11-13 13:03:36 -080085 ${pod_status} Run kubectl get pods --all-namespaces
86 Log To Console \n ${pod_status}
Gilles Depatie84cb1e72018-10-26 12:41:33 -040087 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040088
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040089Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -040090 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
Kailash32ce8e52018-11-13 13:03:36 -080091 ... files and stopping all Kubernetes pods
Gilles Depatie84cb1e72018-10-26 12:41:33 -040092 Stop All Pods
Kailash32ce8e52018-11-13 13:03:36 -080093 Reset Kube Adm