blob: ebd2ed51f5e704ac4a11b2f38e95c6ae885462a0 [file] [log] [blame]
Andrea Speranzaa8cf80b2022-05-26 10:09:59 +02001#Copyright 2022 - 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 Setup Suite
19Test Setup Setup
20Test Teardown Teardown
21Suite 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
34Resource ../../libraries/power_switch.robot
35
36*** Variables ***
37${POD_NAME} flex-ocp-cord
38${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
41${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
42${HELM_CHARTS_DIR} ~/helm-charts
43${VOLTHA_POD_NUM} 8
44${NAMESPACE} voltha
45${INFRA_NAMESPACE} default
46# For below variable value, using deployment name as using grep for
47# parsing radius pod name, we can also use full radius pod name
48${RESTART_POD_NAME} radius
49${timeout} 60s
50${of_id} 0
51${logical_id} 0
52${has_dataplane} True
53${teardown_device} True
54${scripts} ../../scripts
55
56
57# Per-test logging on failure is turned off by default; set this variable to enable
58${container_log_dir} ${None}
59
60# logging flag to enable Collect Logs, can be passed via the command line too
61# example: -v logging:False
62${logging} True
63
64# Flag specific to Soak Jobs
65${SOAK_TEST} False
66${bbsim_port} 50060
67
68#Test the actual on board configuration (Not yet used but it is a placeholder)
69#${testonboardconfiguration} False
70
71#Suppress the subscribe phase
72${suppressaddsubscriber} False
73
74#Enable or Disable the MacLearning verifier for MacLearning ONOS APP
75${maclearningenabled} False #Not yet used but it is a placeholder
76
77*** Test Cases ***
78Sanity E2E Test for TIM (HSIA)
79 [Documentation] Validate the correct construction of the flow rules in ONOS and in the devices:
80 ... Flow rules in accordance with TIM Workflow.
81 ... Set up the clean TIM test environment.
82 ... Make subscriptions of all possible subscribers described in the test case.
83 ... Verify the correctness of the flow rules generated by ONOS and written in
84 ... the respective devices (OLT and ONU), about PPPoE, IGMP and LLDP Flows.
85 ... We use a Transparent VLAN approach
86 ... Perform a scalability test both for flow rules in ONOS and in devices.
87 [Tags] sanityTIM
88 [Setup] Start Logging SanityTestTIM
89 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
90 ... AND Stop Logging SanityTestTIM
91 Run Keyword Setup ${SOAK_TEST}
92 Run Keyword If ${has_dataplane} Clean Up Linux
93 Perform Sanity Test TIM supress_add_subscriber=${suppressaddsubscriber}
94 ... maclearning_enabled=${maclearningenabled}
95
96Sanity E2E Test for TIM (MCAST)
97 [Documentation] Validate the correct construction of the flow rules in ONOS and in the devices:
98 ... Flow rules in accordance with TIM Workflow.
99 ... Verify the correctness of the flow/group rules generated by ONOS and written in
100 ... the respective devices (OLT and ONU), about IGMP.
101 ... We use a Transparent VLAN approach.
102 ... Perform a scalability test both for flow rules in ONOS and in devices.
103 [Tags] sanityTIM-MCast notready
104 [Setup] Start Logging sanityTIM-MCast
105 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
106 ... AND Stop Logging sanityTIM-MCast
107 Run Keyword If ${has_dataplane} Clean Up Linux
108 TODO: Yet to Implement below keyword
109 Perform Sanity Test TIM MCAST supress_add_subscriber=${suppressaddsubscriber}
110 ... maclearning_enabled=${maclearningenabled}
111
112*** Keywords ***
113Setup Suite
114 [Documentation] Set up the test suite
115 Common Test Suite Setup
116 #power_switch.robot needs it to support different vendor's power switch
117 ${switch_type}= Get Variable Value ${web_power_switch.type}
118 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
119