blob: 1fc6fe881bacc36979081a9c0697f54520198010 [file] [log] [blame]
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +00001# 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# FIXME Can we use the same test against BBSim and Hardware?
15
16*** Settings ***
17Documentation Test various end-to-end scenarios
18Suite Setup Common Test Suite Setup
19Test Setup Setup
20Test Teardown Teardown
21#Suite Teardown Teardown Suite
22Library Collections
23Library String
24Library OperatingSystem
25Library XML
26Library RequestsLibrary
27Library ../../libraries/DependencyLibrary.py
28Resource ../../libraries/onos.robot
29Resource ../../libraries/voltctl.robot
30Resource ../../libraries/voltha.robot
31Resource ../../libraries/utils.robot
32Resource ../../libraries/k8s.robot
33Resource ../../variables/variables.robot
34
35*** Variables ***
36${POD_NAME} flex-ocp-cord
37${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
38${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
39#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
40${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
41${HELM_CHARTS_DIR} ~/helm-charts
42${VOLTHA_POD_NUM} 8
43${NAMESPACE} voltha
44# For below variable value, using deployment name as using grep for
45# parsing radius pod name, we can also use full radius pod name
46${RESTART_POD_NAME} radius
47${timeout} 60s
48${of_id} 0
49${logical_id} 0
Suchitra Vemuri2fa9bba2020-01-22 17:38:48 -080050${has_dataplane} True
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000051${external_libs} True
52${teardown_device} False
53${scripts} ../../scripts
54
55*** Test Cases ***
56Adding the same OLT before and after enabling the device
57 [Documentation] Create OLT, Create the same OLT again and Check for the Error message
Suchitra Vemuri2fa9bba2020-01-22 17:38:48 -080058 [Tags] VOL-2405 VOL-2406 AddSameOLT functional
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000059 [Setup] None
60 [Teardown] None
61 ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT}
62 Set Suite Variable ${olt_device_id}
63 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN
64 ... ${EMPTY} ${olt_device_id}
65 ${rc} ${output}= Run and Return Rc and Output
66 ... ${VOLTCTL_CONFIG}; voltctl device create -t openolt -H ${olt_ip}:${OLT_PORT}
67 Should Not Be Equal As Integers ${rc} 0
68 Should Contain ${output} Device is already pre-provisioned
69 #Enable the created OLT device
70 Enable Device ${olt_device_id}
71 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
72 ... ${olt_serial_number}
73 ${rc} ${output}= Run and Return Rc and Output
74 ... ${VOLTCTL_CONFIG}; voltctl device create -t openolt -H ${olt_ip}:${OLT_PORT}
75 Should Not Be Equal As Integers ${rc} 0
76 Log ${output}
77 Should Contain ${output} Device is already pre-provisioned
78 Log "This OLT is added already and enabled"