blob: 226988e89187fbf704b2f06180003b6c99aaf71a [file] [log] [blame]
Hardik Windlassa7b34be2022-03-22 17:28:31 +00001# 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 DT FTTB 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${timeout} 60s
47${of_id} 0
48${logical_id} 0
49${uprate} 0
50${dnrate} 0
51${has_dataplane} True
52${teardown_device} True
53${scripts} ../../scripts
54
55# Per-test logging on failure is turned off by default; set this variable to enable
56${container_log_dir} ${None}
57
58# logging flag to enable Collect Logs, can be passed via the command line too
59# example: -v logging:False
60${logging} True
61
62*** Test Cases ***
63Sanity E2E Test for OLT/ONU on POD for DT FTTB
64 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
65 ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used
66 ... Traffic sent with same vlan from different RGs,
67 ... should reach the NNI port on the OLT with the expected double tagged vlan ids
68 ... Inner vlans from the RG should not change
69 [Tags] sanityDtFttb
70 [Setup] Start Logging SanityTestDtFttb
71 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
72 ... AND Stop Logging SanityTestDtFttb
73 Setup
74 Run Keyword If ${has_dataplane} Clean Up Linux
75 Perform Sanity Test DT FTTB
76
77*** Keywords ***
78Setup Suite
79 [Documentation] Set up the test suite
80 Common Test Suite Setup
81 #Restore all ONUs
82 #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus}
83 #power_switch.robot needs it to support different vendor's power switch
84 ${switch_type}= Get Variable Value ${web_power_switch.type}
85 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}