blob: 60115eb1725177fed8e68d540e2494feb7615481 [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 Depatiea85fe812019-01-23 15:55:53 -050022Library ../common/authentication.py
Gilles Depatie84cb1e72018-10-26 12:41:33 -040023Library volthaMngr.VolthaMngr
Kailash32ce8e52018-11-13 13:03:36 -080024Library preprovisioning.Preprovisioning
Gilles Depatie1be639b2018-12-06 10:51:08 -050025Library discovery.Discovery
Gilles Depatiea85fe812019-01-23 15:55:53 -050026Library authentication.Authentication
Gilles Depatie9651e462018-11-21 15:58:33 -050027
Gilles Depatie1be639b2018-12-06 10:51:08 -050028Suite Setup Start Voltha
29Suite Teardown Stop Voltha
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040030
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040031*** Variables ***
32${LOG_DIR} /tmp/voltha_test_results
33${ROOT_DIR} ${EMPTY}
34${VOLTHA_DIR} ${EMPTY}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040035${ONOS_SSH_PORT} 8101
Gilles Depatie84cb1e72018-10-26 12:41:33 -040036${OLT_IP_ADDR} olt.voltha.svc
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040037${OLT_PORT_ID} 50060
Gilles Depatie9651e462018-11-21 15:58:33 -050038${OLT_TYPE} ponsim_olt
39${ONU_TYPE} ponsim_onu
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040040
41*** Test Cases ***
Gilles Depatie1be639b2018-12-06 10:51:08 -050042Olt Pre Provisioning
43 [Documentation] Olt Pre Provisioning
Gilles Depatie84cb1e72018-10-26 12:41:33 -040044 ... This test preprovisions a ponsim-OLT with given IP address and TCP port
45 ... and then enables both it and a number of ponsim-ONUs with predefined IP/port
46 ... information. It then verifies that all the physical and logical devices are ACTIVE
47 ... and REACHEABLE
48 PSet Log Dirs ${LOG_DIR}
Gilles Depatie1be639b2018-12-06 10:51:08 -050049 PConfigure ${OLT_IP_ADDR} ${OLT_PORT_ID} ${OLT_TYPE} ${ONU_TYPE}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040050 Preprovision Olt
Gilles Depatie9651e462018-11-21 15:58:33 -050051 Wait Until Keyword Succeeds 60s 2s Query Devices Before Enabling
52 Status Should Be Success After Preprovision Command
53 Check Olt Fields Before Enabling
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040054 Enable
Gilles Depatie9651e462018-11-21 15:58:33 -050055 Wait Until Keyword Succeeds 60s 2s Query Devices After Enabling
56 Status Should Be Success After Enable Command
57 Check Olt Fields After Enabling
58 Check Onu Fields After Enabling
Gilles Depatie1be639b2018-12-06 10:51:08 -050059
60Olt Onu Discovery
61 [Documentation] Olt Onu Discovery
62 ... This test covers both Onu Discovery and yet to be developped Olt Discovery
63 ... It aims to verify the integrity of all port fields under each discrete device.
64 ... It also insures that the peers fields contains device Id entries for the corresponding
65 ... Olt or Onu device. Functionality to support multiple ONU accomodated
66 ... The extent of the flow validation is limited to checking whether number of Flows is > 0
67 DSet Log Dirs ${LOG_DIR}
68 DConfigure ${OLT_TYPE} ${ONU_TYPE}
69 Olt Discovery
70 Onu Discovery
71 Olt Ports Should Be Enabled and Active
72 Onu Ports Should Be Enabled and Active
73 Olt Should Have At Least One Flow
74 Onu Should Have At Least One Flow
75
Gilles Depatiea85fe812019-01-23 15:55:53 -050076Radius Authentication
77 [Documentation] Radius Authentication
78 ... This test attempts to perform a Radius Authentication from the RG
79 ... It uses the wpa_supplicant app to authenticate using EAPOL.
80 ... We then verify the generated log file confirming all the authentication steps
81 ASet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
82 Discover RG Pod Name
83 Discover Freeradius Pod Name
84 Discover Freeradius Ip Addr
85 Set Current Freeradius Ip In AAA Json
86 Alter AAA Application Configuration In Onos Using AAA Json
87 Execute Authenticatication On RG
88 Verify Authentication Should Have Started
89 Verify Authentication Should Have Completed
90 Verify Authentication Should Have Disconnected
91 Verify Authentication Should Have Terminated
92
Gilles Depatiec68b3ad2018-08-21 16:29:03 -040093*** Keywords ***
94Start Voltha
95 [Documentation] Start Voltha infrastructure to run test(s). This includes starting all
Gilles Depatie84cb1e72018-10-26 12:41:33 -040096 ... Kubernetes Pods and start collection of logs. PonsimV2 has now been
97 ... containerized and does not need to be managed separately
98 ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR} Dir Init ${LOG_DIR}
Gilles Depatiea85fe812019-01-23 15:55:53 -050099 Set Suite Variable ${ROOT_DIR}
100 Set Suite Variable ${VOLTHA_DIR}
101 Set Suite Variable ${LOG_DIR}
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400102 VSet Log Dirs ${ROOT_DIR} ${VOLTHA_DIR} ${LOG_DIR}
Gilles Depatiec68b3ad2018-08-21 16:29:03 -0400103 Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400104 Start All Pods
Kailash2da848e2018-11-13 10:58:53 -0800105 Sleep 60
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400106 Collect Pod Logs
Kailash32ce8e52018-11-13 13:03:36 -0800107 ${pod_status} Run kubectl get pods --all-namespaces
108 Log To Console \n ${pod_status}
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400109 Alter Onos NetCfg
Gilles Depatiec68b3ad2018-08-21 16:29:03 -0400110
Gilles Depatiec68b3ad2018-08-21 16:29:03 -0400111Stop Voltha
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400112 [Documentation] Stop Voltha infrastucture. This includes clearing all installation milestones
Kailash32ce8e52018-11-13 13:03:36 -0800113 ... files and stopping all Kubernetes pods
Gilles Depatie84cb1e72018-10-26 12:41:33 -0400114 Stop All Pods
Kailash32ce8e52018-11-13 13:03:36 -0800115 Reset Kube Adm