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