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