Joey Armstrong | 9fadcbe | 2024-01-17 19:00:37 -0500 | [diff] [blame] | 1 | # Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 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 *** |
| 17 | Documentation Test various end-to-end scenarios |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
| 34 | Resource ../../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 |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 45 | ${INFRA_NAMESPACE} default |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 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} 120s |
| 50 | ${of_id} 0 |
| 51 | ${logical_id} 0 |
| 52 | ${has_dataplane} True |
| 53 | ${teardown_device} False |
| 54 | ${scripts} ../../scripts |
| 55 | ${with_onos} True |
| 56 | ${values_dir} ../data |
| 57 | ${kind_voltha_dir} ~/kind-voltha |
| 58 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 59 | ${container_log_dir} ${None} |
Matteo Scandolo | da1c64b | 2021-07-20 10:14:49 -0700 | [diff] [blame] | 60 | |
| 61 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 62 | # example: -v logging:False |
| 63 | ${logging} True |
| 64 | |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 65 | ${pausebeforesanity} False |
| 66 | ${onos_version} ${EMPTY} |
| 67 | |
| 68 | *** Test Cases *** |
| 69 | |
| 70 | Sanity E2E Test for OLT/ONU on POD |
| 71 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 72 | ... Validate successful authentication/DHCP/E2E ping for the tech profile that is used |
| 73 | [Tags] sanity test1 |
| 74 | [Setup] Run Keywords Start Logging SanityTest |
| 75 | ... AND Setup |
| 76 | [Teardown] Run Keywords Collect Logs |
| 77 | ... AND Stop Logging SanityTest |
| 78 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 79 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 80 | |
| 81 | Start voltha containers in a specific order and run sanity test |
| 82 | [Documentation] Starts voltha containers in a specific order and run sanity test |
| 83 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 84 | ... Two starts of voltha container in specific orders are supported: |
| 85 | ... First order: voltha, voltha-adapters-simulated, voltha-adapters-open-olt, voltha-adapters-open-onu, onos |
| 86 | ... Second order: voltha-adapters-simulated, voltha-adapters-open-olt, voltha-adapters-open-onu, voltha, onos |
| 87 | ... For both orders following scenarios will be run |
| 88 | ... - Remove helm charts |
| 89 | ... - Restart Helm Charts in a specific order |
| 90 | ... - Restart Port Forwarding |
| 91 | ... - Repeat the sanity check |
| 92 | [Tags] functional VOL-2008 StartVolthaContainers notready |
| 93 | [Setup] Start Logging StartVolthaContainers |
| 94 | [Teardown] Run Keywords Collect Logs |
| 95 | ... AND Stop Logging StartVolthaContainers |
| 96 | ${list_order} Create List First Second |
| 97 | # Get simulated adpters are running |
| 98 | ${contains_sim}= Set Variable False |
| 99 | ${container} Get Container Dictionary voltha |
| 100 | FOR ${key} IN @{container.keys()} |
| 101 | ${contains_sim}= Evaluate "sim-voltha-adapter" in """${key}""" |
| 102 | Exit For Loop IF ${contains_sim} |
| 103 | END |
| 104 | # Prepare Helm Chart list |
| 105 | ${list_voltha_apps} Create List ofagent rw-core |
| 106 | ${list_voltha_names} Create List voltha-voltha-ofagent voltha-voltha-rw-core |
| 107 | ${voltha} CreateDictionary helmchart=voltha namespace=voltha |
| 108 | ... apps=${list_voltha_apps} names=${list_voltha_names} |
| 109 | ${list_sim_apps} Create List adapter-simulated-olt adapter-simulated-onu |
| 110 | ${list_sim_names} Create List sim-voltha-adapter-simulated-olt sim-voltha-adapter-simulated-onu |
| 111 | ${sim} CreateDictionary helmchart=sim namespace=voltha |
| 112 | ... apps=${list_sim_apps} names=${list_sim_names} |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 113 | ${list_openolt_apps} Create List ${OLT_ADAPTER_APP_LABEL} |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 114 | ${list_openolt_names} Create List open-olt-voltha-adapter-openolt |
| 115 | ${open-olt} CreateDictionary helmchart=open-olt namespace=voltha |
| 116 | ... apps=${list_openolt_apps} names=${list_openolt_names} |
| 117 | ${list_openonu_apps} Create List adapter-open-onu |
| 118 | ${list_openonu_names} Create List open-onu-voltha-adapter-openonu |
| 119 | ${open-onu} CreateDictionary helmchart=open-onu namespace=voltha |
| 120 | ... apps=${list_openonu_apps} names=${list_openonu_names} |
| 121 | ${list_onos_apps} Create List onos-onos-classic |
| 122 | ${list_onos_names} Create List onos-onos-classic |
| 123 | ${onos} CreateDictionary helmchart=onos namespace=default |
| 124 | ... apps=${list_onos_apps} names=${list_onos_names} |
| 125 | ${List_Helm_Charts} Create List |
| 126 | Run Keyword If ${contains_sim} |
| 127 | ... Append To List ${List_Helm_Charts} ${voltha} ${sim} ${open-olt} ${open-onu} ${onos} |
| 128 | ... ELSE |
| 129 | ... Append To List ${List_Helm_Charts} ${voltha} ${open-olt} ${open-onu} ${onos} |
| 130 | # Start Loop over both orders |
| 131 | FOR ${order} IN @{list_order} |
| 132 | Perfom Start voltha containers in a specific order ${List_Helm_Charts} ${order} ${contains_sim} |
| 133 | ... ${with_onos} |
| 134 | END |
| 135 | |
| 136 | *** Keywords *** |
| 137 | Setup Suite |
| 138 | [Documentation] Set up the test suite |
| 139 | Common Test Suite Setup |
| 140 | #Restore all ONUs |
| 141 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_onus} |
| 142 | #power_switch.robot needs it to support different vendor's power switch |
| 143 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 144 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 145 | |
| 146 | Perfom Start voltha containers in a specific order |
| 147 | [Arguments] ${List_Helm_Charts} ${order} ${contains_sim} ${with_onos} |
| 148 | [Documentation] Performes start ofvoltha containers in a specific order and run sanity test |
| 149 | # Repeat Teardown Suite |
| 150 | Run Keyword If ${with_onos} |
| 151 | ... Log \r\nRepeat Teardown Suite (${order} order)... console=yes |
| 152 | Run Keyword If ${with_onos} Teardown Suite |
| 153 | # Remove Helm Charts |
| 154 | Log \r\nRemove Helm Charts (${order} order)... console=yes |
| 155 | Remove Helm Charts ${List_Helm_Charts} |
| 156 | # Restart Helm Charts |
| 157 | Log \r\nRestart Helm Charts (${order} order)... console=yes |
| 158 | Restart Helm Charts ${List_Helm_Charts} ${order} ${contains_sim} |
| 159 | # Restart Port Forwarding |
| 160 | Log \r\nRestart Port Forwarding (${order} order)... console=yes |
| 161 | Restart Port Forwarding |
| 162 | # Push ONOS Kafka Configuration |
| 163 | Run Keyword If ${with_onos} |
| 164 | ... Log \r\nPush ONOS Kafka Configuration (${order} order)... console=yes |
| 165 | Run Keyword If ${with_onos} Sleep 5s |
| 166 | Run Keyword If ${with_onos} |
| 167 | ... Wait Until Keyword Succeeds 30s 3s Push ONOS Kafka Configuration |
| 168 | # Push ONOS DHCP L2 Relay Configuration |
| 169 | Run Keyword If ${with_onos} |
| 170 | ... Log \r\nPush ONOS DHCP L2 Relay Configuration (${order} order)... console=yes |
| 171 | Run Keyword If ${with_onos} Sleep 5s |
| 172 | Run Keyword If ${with_onos} |
| 173 | ... Wait Until Keyword Succeeds 30s 3s Push ONOS DHCP L2 Relay Configuration |
| 174 | #Enable VOLTHA ONOS EAPOL provisioning |
| 175 | Run Keyword If ${with_onos} |
| 176 | ... Log \r\nEnable VOLTHA ONOS EAPOL provisioning (${order} order)... console=yes |
| 177 | Run Keyword If ${with_onos} Sleep 5s |
| 178 | Run Keyword If ${with_onos} |
| 179 | ... Wait Until Keyword Succeeds 30s 3s Enable VOLTHA ONOS EAPOL provisioning |
| 180 | #Enable VOLTHA ONOS DHCP Provisioning |
| 181 | Run Keyword If ${with_onos} |
| 182 | ... Log \r\nEnable VOLTHA ONOS DHCP Provisioning (${order} order)... console=yes |
| 183 | Run Keyword If ${with_onos} Sleep 5s |
| 184 | Run Keyword If ${with_onos} |
| 185 | ... Wait Until Keyword Succeeds 30s 3s Enable VOLTHA ONOS DHCP Provisioning |
| 186 | #Disable VOLTHA ONOS IGMP Provisioning |
| 187 | Run Keyword If ${with_onos} |
| 188 | ... Log \r\nDisable VOLTHA ONOS IGMP Provisioning (${order} order)... console=yes |
| 189 | Run Keyword If ${with_onos} Sleep 5s |
| 190 | Run Keyword If ${with_onos} |
| 191 | ... Wait Until Keyword Succeeds 30s 3s Disable VOLTHA ONOS IGMP Provisioning |
| 192 | #Push ONOS SADIS Configuration |
| 193 | Run Keyword If ${with_onos} |
| 194 | ... Log \r\nPush ONOS SADIS Configuration (${order} order)... console=yes |
| 195 | Run Keyword If ${with_onos} Sleep 5s |
| 196 | Run Keyword If ${with_onos} |
| 197 | ... Wait Until Keyword Succeeds 30s 3s Push ONOS SADIS Configuration |
| 198 | # Configure ONOS RADIUS Connection |
| 199 | Run Keyword If ${with_onos} |
| 200 | ... Log \r\nPush ONOS RADIUS Connection (${order} order)... console=yes |
| 201 | Run Keyword If ${with_onos} Sleep 5s |
| 202 | Run Keyword If ${with_onos} |
| 203 | ... Wait Until Keyword Succeeds 30s 3s Configure ONOS RADIUS Connection |
| 204 | Log \r\nSleep 10s (${order} order)... console=yes |
| 205 | Sleep 10s |
| 206 | # Repeat Suite Setup |
| 207 | Run Keyword If ${with_onos} |
| 208 | ... Log \r\nRepeat Suite Setup (${order} order)... console=yes |
| 209 | Run Keyword If ${with_onos} Common Test Suite Setup |
| 210 | # Repeat Setup |
| 211 | Run Keyword If ${with_onos} |
| 212 | ... Log \r\nRepeat Setup (${order} order)... console=yes |
| 213 | Run Keyword If ${with_onos} Setup |
| 214 | Run Keyword If ${pausebeforesanity} Import Library Dialogs |
| 215 | Run Keyword If ${pausebeforesanity} Pause Execution Press OK to continue with Sanity Check! |
| 216 | # Repeat Sanity Test E2E Test for OLT/ONU on POD |
| 217 | Log \r\nRepeat Sanity Test E2E Test for OLT/ONU on POD (${order} order)... console=yes |
| 218 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 219 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 220 | |
| 221 | Remove Helm Charts |
| 222 | [Arguments] ${List_Helm_Charts} |
| 223 | [Documentation] Removes the helm charts |
| 224 | FOR ${helm_chart} IN @{List_Helm_Charts} |
| 225 | ${helmchartname} Get From Dictionary ${helm_chart} helmchart |
| 226 | ${namespace} Get From Dictionary ${helm_chart} namespace |
| 227 | Run Keyword If ${with_onos} or ('${helmchartname}'!='onos') Remove VOLTHA Helm Charts ${helmchartname} |
| 228 | ... ${namespace} |
| 229 | ${list_names} Get From Dictionary ${helm_chart} names |
| 230 | Run Keyword If ${with_onos} or ('${helmchartname}'!='onos') |
| 231 | ... Wait For Pods Not Exist ${namespace} ${list_names} |
| 232 | END |
| 233 | |
| 234 | Remove VOLTHA Helm Charts |
| 235 | [Arguments] ${name} ${namespace} |
| 236 | [Documentation] Remove VOLTHA helm charts |
| 237 | ${cmd} Catenate helm uninstall --no-hooks --namespace '${namespace}' '${name}' |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 238 | ${rc} Run And Return Rc ${cmd} |
| 239 | Should Be Equal as Integers ${rc} 0 |
| 240 | |
| 241 | Restart Helm Charts |
| 242 | [Arguments] ${List_Helm_Charts} ${order} ${contains_sim} |
| 243 | [Documentation] Restarts the helm charts |
| 244 | Run Keyword If '${order}'=='First' Restart Voltha |
| 245 | Run Keyword If ${contains_sim} Restart Voltha Adapters Simulated |
| 246 | Restart Voltha Adapters Open OLT |
| 247 | Restart Voltha Adapters Open ONU |
| 248 | Run Keyword If '${order}'=='Second' Restart Voltha |
| 249 | Run Keyword If ${with_onos} Restart ONOS |
| 250 | FOR ${helm_chart} IN @{List_Helm_Charts} |
| 251 | ${helmchartname} Get From Dictionary ${helm_chart} helmchart |
| 252 | ${namespace} Get From Dictionary ${helm_chart} namespace |
| 253 | ${list_apps} Get From Dictionary ${helm_chart} apps |
| 254 | Run Keyword If ${with_onos} or ('${helmchartname}'!='onos') |
| 255 | ... Wait For Pods Ready ${namespace} ${list_apps} |
| 256 | END |
| 257 | |
| 258 | Restart Voltha Adapters Simulated |
| 259 | [Documentation] Restart Voltha Adapters Simulated helm chart |
| 260 | ${cmd} Catenate |
| 261 | ... helm install -f ${values_dir}/sim-adapter-values.yaml --create-namespace |
| 262 | ... --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 |
| 263 | ... --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 |
| 264 | ... --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 |
| 265 | ... --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 |
| 266 | ... --set services.kafka.adapter.address=kafka.default.svc:9092 |
| 267 | ... --set services.kafka.cluster.address=kafka.default.svc:9092 --set defaults.log_level=WARN |
Matteo Scandolo | 6b52412 | 2021-10-22 14:34:29 -0700 | [diff] [blame] | 268 | ... --namespace ${NAMESPACE} sim onf/voltha-adapter-simulated |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 269 | ${rc} Run And Return Rc ${cmd} |
| 270 | Should Be Equal as Integers ${rc} 0 |
| 271 | |
| 272 | Restart Voltha Adapters Open OLT |
| 273 | [Documentation] Restart Voltha Adapters Open OLT helm chart |
| 274 | ${cmd} Catenate |
| 275 | ... helm install -f ${values_dir}/open-olt-values.yaml --create-namespace |
| 276 | ... --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 |
| 277 | ... --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 |
| 278 | ... --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 279 | ... --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 280 | ... --set services.kafka.cluster.address=kafka.default.svc:9092 |
| 281 | ... --set services.kafka.adapter.address=kafka.default.svc:9092 --set defaults.log_level=WARN |
Matteo Scandolo | 6b52412 | 2021-10-22 14:34:29 -0700 | [diff] [blame] | 282 | ... --namespace ${NAMESPACE} open-olt onf/voltha-adapter-openolt |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 283 | ${rc} Run And Return Rc ${cmd} |
| 284 | Should Be Equal as Integers ${rc} 0 |
| 285 | |
| 286 | Restart Voltha Adapters Open ONU |
| 287 | [Documentation] Restart Voltha Adapters Open ONU helm chart |
| 288 | ${cmd} Catenate |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 289 | ... helm install -f ${values_dir}/open-onu-values.yaml --create-namespace |
| 290 | ... --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 |
| 291 | ... --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 |
| 292 | ... --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 293 | ... --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 294 | ... --set services.kafka.adapter.address=kafka.default.svc:9092 |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 295 | ... --set services.kafka.cluster.address=kafka.default.svc:9092 --set replicas.adapter_open_onu=1 |
Matteo Scandolo | 6b52412 | 2021-10-22 14:34:29 -0700 | [diff] [blame] | 296 | ... --set defaults.log_level=WARN --namespace ${NAMESPACE} open-onu onf/voltha-adapter-openonu |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 297 | ${rc} Run And Return Rc ${cmd} |
| 298 | Should Be Equal as Integers ${rc} 0 |
| 299 | |
| 300 | Restart Voltha |
| 301 | [Documentation] Restart Voltha helm chart |
| 302 | ${cmd} Catenate |
| 303 | ... helm install -f ${values_dir}/voltha-values.yaml --create-namespace --set therecanbeonlyone=true |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 304 | ... --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 |
| 305 | ... --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 |
| 306 | ... --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 |
| 307 | ... --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 |
| 308 | ... --set services.kafka.adapter.address=kafka.default.svc:9092 |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 309 | ... --set services.kafka.cluster.address=kafka.default.svc:9092 |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 310 | ... --set 'services.controller[0].service=onos-onos-classic-0.onos-onos-classic-hs.default.svc' |
| 311 | ... --set 'services.controller[0].port=6653' |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 312 | ... --set 'services.controller[0].address=onos-onos-classic-0.onos-onos-classic-hs.default.svc:6653' |
Matteo Scandolo | 6b52412 | 2021-10-22 14:34:29 -0700 | [diff] [blame] | 313 | ... --set defaults.log_level=WARN --namespace ${NAMESPACE} voltha onf/voltha |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 314 | ${rc} Run And Return Rc ${cmd} |
| 315 | Should Be Equal as Integers ${rc} 0 |
| 316 | |
| 317 | |
| 318 | Restart ONOS |
| 319 | [Documentation] Restart ONOS helm chart |
| 320 | ${cmd}= Run Keyword If '${onos_version}'=='${EMPTY}' Catenate |
| 321 | ... helm install -f ${values_dir}/onos-values.yaml |
| 322 | ... --create-namespace --set image.repository=voltha/voltha-onos,image.tag=master,replicas=1,atomix.replicas=0 |
| 323 | ... --set defaults.log_level=WARN --namespace default onos onos/onos-classic |
| 324 | ... ELSE Catenate |
| 325 | ... helm install -f ${values_dir}/minimal-values.yaml |
| 326 | ... --create-namespace --set image.repository=voltha/voltha-onos,image.tag=master,replicas=1,atomix.replicas=0 |
| 327 | ... --set defaults.log_level=WARN --namespace default --version ${onos_version} onos onos/onos-classic |
| 328 | ${rc} Run And Return Rc ${cmd} |
| 329 | Should Be Equal as Integers ${rc} 0 |
| 330 | |
| 331 | Restart Port Forwarding |
| 332 | [Documentation] Restarts the VOLTHA port forwarding rules |
| 333 | ${List_Tags} Create List etcd-minimal voltha-voltha-api-minimal kafka-minimal |
| 334 | ... onos-onos-classic-hs-minimal |
| 335 | FOR ${tag} IN @{List_Tags} |
| 336 | Run Keyword If ${with_onos} or ('${tag}'!='onos-onos-classic-hs-minimal') |
| 337 | ... Restart VOLTHA Port Forward ${tag} |
| 338 | END |
| 339 | |
| 340 | Push ONOS Kafka Configuration |
| 341 | [Documentation] Pushes the ONOS kafka Configuration |
| 342 | ${cmd} Catenate |
| 343 | ... cd ~/kind-voltha; |
| 344 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 345 | ... http://127.0.0.1:8181/onos/v1/network/configuration/apps/org.opencord.kafka |
| 346 | ... --data '{"kafka":{"bootstrapServers":"kafka.default.svc:9092"}}'; cd - |
| 347 | ${rc} Run And Return Rc ${cmd} |
| 348 | Should Be Equal as Integers ${rc} 0 |
| 349 | |
| 350 | Push ONOS DHCP L2 Relay Configuration |
| 351 | [Documentation] Pushes the ONOS DHCP L2 Relay Configuration |
| 352 | ${cmd} Catenate |
| 353 | ... cd ~/kind-voltha; |
| 354 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 355 | ... http://127.0.0.1:8181/onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 356 | ... --data @onos-files/onos-dhcpl2relay.json; cd - |
| 357 | ${rc} Run And Return Rc ${cmd} |
| 358 | Should Be Equal as Integers ${rc} 0 |
| 359 | |
| 360 | Enable VOLTHA ONOS EAPOL provisioning |
| 361 | [Documentation] Pushes the ONOS EAPOL Configuration |
| 362 | ${cmd} Catenate |
| 363 | ... cd ~/kind-voltha; |
| 364 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 365 | ... http://127.0.0.1:8181/onos/v1/configuration/org.opencord.olt.impl.OltFlowService |
| 366 | ... --data '{"enableEapol":true}'; cd - |
| 367 | ${rc} Run And Return Rc ${cmd} |
| 368 | Should Be Equal as Integers ${rc} 0 |
| 369 | |
| 370 | Enable VOLTHA ONOS DHCP Provisioning |
| 371 | [Documentation] Pushes the ONOS OLT DHCP Configuration |
| 372 | ${cmd} Catenate |
| 373 | ... cd ~/kind-voltha; |
| 374 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 375 | ... http://127.0.0.1:8181/onos/v1/configuration/org.opencord.olt.impl.OltFlowService |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 376 | ... --data '{"enableDhcpOnNni":true,"enableDhcpV4":true}'; cd - |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 377 | ${rc} Run And Return Rc ${cmd} |
| 378 | Should Be Equal as Integers ${rc} 0 |
| 379 | |
| 380 | Disable VOLTHA ONOS IGMP Provisioning |
| 381 | [Documentation] Pushes the ONOS IGMP Configuration |
| 382 | ${cmd} Catenate |
| 383 | ... cd ~/kind-voltha; |
| 384 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 385 | ... http://127.0.0.1:8181/onos/v1/configuration/org.opencord.olt.impl.OltFlowService |
TorstenThieme | c7e4ab9 | 2020-09-14 15:56:25 -0700 | [diff] [blame] | 386 | ... --data '{"enableIgmpOnNni":false}'; cd - |
TorstenThieme | d2cd91d | 2020-07-28 07:13:44 +0000 | [diff] [blame] | 387 | ${rc} Run And Return Rc ${cmd} |
| 388 | Should Be Equal as Integers ${rc} 0 |
| 389 | |
| 390 | Push ONOS SADIS Configuration |
| 391 | [Documentation] Pushes the ONOS SADIS Configuration |
| 392 | ${cmd} Catenate |
| 393 | ... cd ~/kind-voltha; |
| 394 | ... curl -sSL --user karaf:karaf -w %\{http_code\} -X POST --fail -H Content-Type:application/json |
| 395 | ... http://127.0.0.1:8181/onos/v1/network/configuration/apps/org.opencord.sadis |
| 396 | ... --data @onos-files/onos-sadis-sample.json; cd - |
| 397 | ${rc} Run And Return Rc ${cmd} |
| 398 | Should Be Equal as Integers ${rc} 0 |
| 399 | |
| 400 | Configure ONOS RADIUS Connection |
| 401 | [Documentation] Configures the ONOS RADIUS Connection |
| 402 | ${cmd} Catenate |
| 403 | ... sed -e s/:RADIUS_SVC:/radius-freeradius.default.svc/g -e s/:RADIUS_PORT:/1812/ |
| 404 | ... ${kind_voltha_dir}/onos-files/onos-aaa.json | curl --fail -sSL --user karaf:karaf -X POST |
| 405 | ... http://127.0.0.1:8181/onos/v1/network/configuration/apps/org.opencord.aaa |
| 406 | ... -H Content-type:application/json -d@- |
| 407 | ${rc} Run And Return Rc ${cmd} |
| 408 | Should Be Equal as Integers ${rc} 0 |