use single ssh connection to onos
It belongs to VOL-4041 and is the second part.
Keyword 'Execute ONOS CLI Command on open connection' is deprecated
and is replaced by keyword
'Execute ONOS CLI Command use single connection' for all test suites
and libraries.
Change-Id: Ib5078b50d22e812e927e437a0e6f0e249f95ee9a
diff --git a/tests/bbsim/Voltha_BBSimTests.robot b/tests/bbsim/Voltha_BBSimTests.robot
old mode 100644
new mode 100755
index b8083b8..a4a1d72
--- a/tests/bbsim/Voltha_BBSimTests.robot
+++ b/tests/bbsim/Voltha_BBSimTests.robot
@@ -127,7 +127,7 @@
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
... AND List ONUs ${NAMESPACE} ${bbsim_pod}
# Restart Auth and Verify (valid only for ATT)
- ... AND Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ... AND Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... aaa-reset-all-devices
... AND Restart Auth ${NAMESPACE} ${bbsim_pod} ${src['onu']}
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
@@ -135,7 +135,7 @@
... AND List ONUs ${NAMESPACE} ${bbsim_pod}
# Add Subscriber
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify that no pending flows exist for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
@@ -147,7 +147,7 @@
... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
... AND List ONUs ${NAMESPACE} ${bbsim_pod}
# Restart Dhcp and Verify (valid only for ATT and TT)
- ... AND Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ... AND Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... dhcpl2relay-remove-allocation ${of_id} ${onu_port}
... AND Restart DHCP ${NAMESPACE} ${bbsim_pod} ${src['onu']}
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
@@ -158,8 +158,8 @@
... Perform ONU Igmp Join and Leave ${bbsim_pod} ${of_id} ${src['onu']} ${onu_port}
END
# Clean ONOS state before rebooting
- Execute ONOS CLI Command on open connection ${onos_ssh_connection} aaa-reset-all-devices
- Execute ONOS CLI Command on open connection ${onos_ssh_connection} dhcpl2relay-clear-allocations
+ Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} aaa-reset-all-devices
+ Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} dhcpl2relay-clear-allocations
# Perform OLT SoftReboot test
${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
Reboot Device ${olt_device_id}
@@ -187,8 +187,6 @@
${onos_netcfg_file}= Get Variable Value ${onos_netcfg.file}
Run Keyword If '${workflow}'=='TT' and '${has_dataplane}'=='False' and '${onos_netcfg_file}'!='${None}'
... Send File To Onos ${onos_netcfg_file} apps/
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
diff --git a/tests/functional/Voltha_ScaleFunctionalTests.robot b/tests/functional/Voltha_ScaleFunctionalTests.robot
index 3dd090a..58e6a8e 100755
--- a/tests/functional/Voltha_ScaleFunctionalTests.robot
+++ b/tests/functional/Voltha_ScaleFunctionalTests.robot
@@ -124,7 +124,7 @@
FOR ${I} IN RANGE 0 ${num_olts}
${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
${of_id}= Wait Until Keyword Succeeds 60s 5s Validate OLT Device in ONOS ${olt_serial_number}
- Wait Until Keyword Succeeds ${long_timeout} 20s Validate DHCP Allocations ${onos_ssh_connection}
+ Wait Until Keyword Succeeds ${long_timeout} 20s Validate DHCP Allocations ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... 16 ${of_id} BBSM
END
#validate DHCP allocation for each port
@@ -185,7 +185,6 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Teardown Suite
[Documentation] Clean up devices if desired
diff --git a/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
index 9dc9793..1a2ebf7 100755
--- a/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUNegativeStateTests.robot
@@ -104,8 +104,6 @@
... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
... ELSE Fail The TechProfile (${techprofile}) is not valid!
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
# delete etcd MIB Template Data
Delete MIB Template Data
# delete etcd onu data
@@ -120,6 +118,6 @@
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout}
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
Remove Tech Profile
diff --git a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
index 3f0b451..eab6545 100755
--- a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
@@ -172,8 +172,6 @@
... kvstoreprefix:${kvstoreprefix}
Log ${LogInfo} console=yes
Common Test Suite Setup
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
# delete etcd MIB Template Data
Delete MIB Template Data
# delete etcd onu data
@@ -191,7 +189,7 @@
Run Keyword If ${usekill2restart} Restart Pod ${namespace} open-onu
Run Keyword Unless ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s
... Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout}
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
Setup Test
@@ -299,7 +297,7 @@
Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock
... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock
... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates}
- Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection}
+ Wait for all ONU Ports in ONOS Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Enable Onu Device
Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber}
... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber}
@@ -338,7 +336,7 @@
Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock
... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock
... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates}
- Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection}
+ Wait for all ONU Ports in ONOS Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Enable Onu Device
Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber}
... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber}
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index b82be26..938f27d 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -202,8 +202,6 @@
... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
... ELSE Fail The TechProfile (${techprofile}) is not valid!
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
# map the passed onu state to reached and make it visible for test suite
${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}=
... Map State ${state2test}
@@ -226,7 +224,7 @@
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout}
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout}
Close All ONOS SSH Connections
Remove Tech Profile
@@ -315,7 +313,7 @@
Do Onu Port Check
[Documentation] Check that all the UNI ports show up in ONOS
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} ${num_all_onus} BBSM ${timeout}
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${num_all_onus} BBSM ${timeout}
Do Onu Etcd Data Check
[Documentation] Check Onu data stored in etcd
@@ -461,12 +459,12 @@
Current State Test All Onus ${state2checkafterdisable} alternativeonustate=${alternativeonustates}
Log Ports
#check no port is enabled in ONOS
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
Enable Onu Device
Current State Test All Onus ${state2check}
Log Ports onlyenabled=True
#check that all the UNI ports show up in ONOS again
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} ${num_all_onus} BBSM
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${num_all_onus} BBSM
Do Power Off Power On Onu Device
[Documentation] This keyword power off/on all onus and checks the states.
diff --git a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
index 1c5b1ac..3b86bbc 100755
--- a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
@@ -89,8 +89,6 @@
... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
Log ${LogInfo} console=yes
Common Test Suite Setup
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
# delete etcd MIB Template Data
Delete MIB Template Data
@@ -102,7 +100,7 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
# delete etcd MIB Template Data (for repeating test)
Delete MIB Template Data
Close All ONOS SSH Connections
diff --git a/tests/pm-data/Voltha_ONUPMTests.robot b/tests/pm-data/Voltha_ONUPMTests.robot
index 5012b83..9667745 100755
--- a/tests/pm-data/Voltha_ONUPMTests.robot
+++ b/tests/pm-data/Voltha_ONUPMTests.robot
@@ -154,7 +154,7 @@
Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates}
Log Ports
#check no port is enabled in ONOS
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
Collect and Validate PM Data ${collect_interval} user=True
Clean Metric Dictionary
# enable (all) onu devices
@@ -163,7 +163,7 @@
Current State Test All Onus omci-flows-pushed alternativeonustate=${alternativeonustates}
Log Ports onlyenabled=True
#check that all the UNI ports show up in ONOS again
- Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} ${num_all_onus} BBSM determine_number=True
+ Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${num_all_onus} BBSM determine_number=True
# validate enabled status (again)
Set Validation Operation All Onu ${group} ${oper_state} ${ValidationEnabled}
Set Validation Operation All Onu ${group} ${admin_state} ${ValidationEnabled}
@@ -183,8 +183,6 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
${switch_type}= Get Variable Value ${web_power_switch.type}
Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
# set ${kafka} depending on environment in case of port-forward is needed
diff --git a/tests/scale/Voltha_Scale_Tests.robot b/tests/scale/Voltha_Scale_Tests.robot
index 1eb15f2..7107218 100755
--- a/tests/scale/Voltha_Scale_Tests.robot
+++ b/tests/scale/Voltha_Scale_Tests.robot
@@ -105,7 +105,7 @@
[Tags] activation plot-onos-olts
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for Olt in ONOS ${onos_ssh_connection} ${deviceId}
+ Wait for Olt in ONOS ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${deviceId}
END
Onu Activation in VOLTHA
@@ -118,7 +118,7 @@
[Tags] activation plot-onos-ports
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for Ports in ONOS ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId} BBSM
+ Wait for Ports in ONOS ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${total_onus_per_olt} ${deviceId} BBSM
END
Flows validation in VOLTHA before subscriber provisioning
@@ -144,7 +144,7 @@
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for all flows to in ADDED state ${onos_ssh_connection}
+ Wait for all flows to in ADDED state ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}}
... ${deviceId} ${workflow} ${total_onus_per_olt} 1 false
... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP}
END
@@ -155,7 +155,7 @@
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for AAA Authentication ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId}
+ Wait for AAA Authentication ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${total_onus_per_olt} ${deviceId}
END
Provision subscribers
@@ -164,7 +164,7 @@
Should Be Equal ${enableSubscriberProvisioning} true
${onos_devices}= Compute Device IDs
FOR ${olt} IN @{onos_devices}
- Provision all subscribers on device ${onos_ssh_connection} ${ONOS_SSH_IP} ${ONOS_REST_PORT} ${olt}
+ Provision all subscribers on device ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${ONOS_SSH_IP} ${ONOS_REST_PORT} ${olt}
END
Flows validation in VOLTHA after subscriber provisioning
@@ -191,7 +191,7 @@
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for all flows to in ADDED state ${onos_ssh_connection}
+ Wait for all flows to in ADDED state ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}}
... ${deviceId} ${workflow} ${total_onus_per_olt} 1 true
... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP}
END
@@ -201,7 +201,7 @@
[Tags] dhcp plot-onos-dhcp
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
- Wait for DHCP Ack ${onos_ssh_connection} ${total_onus_per_olt} ${workflow} ${deviceId}
+ Wait for DHCP Ack ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${total_onus_per_olt} ${workflow} ${deviceId}
END
Perform Igmp Join
@@ -224,7 +224,7 @@
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- ... Verify ONUs in Group Count in ONOS ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId}
+ ... Verify ONUs in Group Count in ONOS ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${total_onus_per_olt} ${deviceId}
END
Perform Igmp Leave
@@ -247,7 +247,7 @@
${onos_devices}= Compute Device IDs
FOR ${deviceId} IN @{onos_devices}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- ... Verify Empty Group in ONOS ${onos_ssh_connection} ${deviceId}
+ ... Verify Empty Group in ONOS ${${ONOS_SSH_IP} ${ONOS_SSH_PORT}} ${deviceId}
END
Disable and Delete devices
@@ -278,9 +278,6 @@
Run Keyword If '${workflow}'=='tt'
... Send File To Onos ${CURDIR}/../../tests/data/onos-igmp.json apps/
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
-
Teardown Suite
[Documentation] Close the SSH connection to ONOS
Close All ONOS SSH Connections
diff --git a/tests/software-upgrades/ONOS_AppsUpgrade.robot b/tests/software-upgrades/ONOS_AppsUpgrade.robot
old mode 100644
new mode 100755
index 222ef7e..fbd04db
--- a/tests/software-upgrades/ONOS_AppsUpgrade.robot
+++ b/tests/software-upgrades/ONOS_AppsUpgrade.robot
@@ -83,7 +83,7 @@
FOR ${J} IN RANGE 0 ${num_apps_under_test}
${app_ut}= Set Variable ${list_onos_apps_under_test}[${J}][app]
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... log:set DEBUG ${app_ut}
END
FOR ${I} IN RANGE 0 ${num_apps_under_test}
@@ -116,8 +116,6 @@
[Documentation] Set up the test suite
Common Test Suite Setup
Create ONOS Apps Under Test List
- ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- Set Suite Variable ${onos_ssh_connection}
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.