[VOL-4041] Migration to single ONOS SSH connection
Change-Id: I91f5f3c96585097486bc862118d8753bf4b30cba
diff --git a/libraries/onos.robot b/libraries/onos.robot
index ab7bf8b..67b3589 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -57,6 +57,44 @@
Should Be Equal As Integers @{result_values}[2] 0
[Return] ${output}
+Execute ONOS CLI Command use single connection
+ [Documentation] Execute ONOS CLI Command use an Open Connection
+ ... In case no connection is open a connection will be opened
+ [Arguments] ${host} ${port} ${cmd}
+ ${connection_list_id}= Get Conn List Id ${host} ${port}
+ ${connection_list_id}= Run Keyword If "${connection_list_id}"=="${EMPTY}"
+ ... Open ONOS SSH Connection ${host} ${port}
+ ... ELSE Set Variable ${connection_list_id}
+ ${connection_entry}= Get From List ${connection_list} ${connection_list_id}
+ SSHLibrary.Switch Connection ${connection_entry.conn_id}
+ ${PassOrFail} @{result_values} Run Keyword And Ignore Error SSHLibrary.Execute Command ${cmd}
+ ... return_rc=True return_stderr=True return_stdout=True
+ Run Keyword If '${PassOrFail}'=='FAIL' Reconnect ONOS SSH Connection ${connection_list_id}
+ @{result_values}= Run Keyword If '${PassOrFail}'=='FAIL'
+ ... SSHLibrary.Execute Command ${cmd} return_rc=True return_stderr=True return_stdout=True
+ ... ELSE Set Variable @{result_values}
+ ${output} Set Variable @{result_values}[0]
+ Log Command output: ${output}
+ Should Be Empty @{result_values}[1]
+ Should Be Equal As Integers @{result_values}[2] 0
+ [Return] ${output}
+
+Get Conn List Id
+ [Documentation] Looks up for an Open Connection with passed host and port in conection list
+ ... First match connection will be used.
+ [Arguments] ${host} ${port}
+ ${connection_list_id}= Set Variable ${EMPTY}
+ ${match}= Set Variable False
+ ${length}= Get Length ${connection_list}
+ FOR ${INDEX} IN RANGE 0 ${length}
+ #${Item}= Get From List ${connection_list} ${INDEX}
+ ${conndata}= Get Connection ${connection_list[${INDEX}].conn_id}
+ ${match}= Set Variable If '${conndata.host}'=='${host}' and '${conndata.port}'=='${port}' True False
+ ${connection_list_id}= Set Variable If ${match} ${INDEX} ${EMPTY}
+ Exit For Loop If ${match}
+ END
+ [Return] ${connection_list_id}
+
Reconnect ONOS SSH Connection
[Documentation] Reconnect an SSH Connection
[Arguments] ${connection_list_id}
@@ -184,28 +222,28 @@
${upstream_flow_0_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:0 |
... grep VLAN_ID:${c_tag} | grep transition=TABLE:1
- ${upstream_flow_0_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_flow_0_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${upstream_flow_0_cmd}
Should Not Be Empty ${upstream_flow_0_added}
# Verify upstream table=1 flow
${flow_vlan_push_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:${c_tag} |
... grep VLAN_PUSH | grep VLAN_ID:${s_tag} | grep OUTPUT:${nni_port}
- ${upstream_flow_1_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_flow_1_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${flow_vlan_push_cmd}
Should Not Be Empty ${upstream_flow_1_added}
# Verify downstream table=0 flow
${flow_vlan_pop_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
... grep VLAN_POP | grep transition=TABLE:1
- ${downstream_flow_0_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_0_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${flow_vlan_pop_cmd}
Should Not Be Empty ${downstream_flow_0_added}
# Verify downstream table=1 flow
${downstream_flow_1_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${c_tag} |
... grep VLAN_ID:0 | grep OUTPUT:${onu_port}
- ${downstream_flow_1_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_1_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${downstream_flow_1_cmd}
Should Not Be Empty ${downstream_flow_1_added}
# Verify ipv4 dhcp upstream flow
@@ -213,7 +251,7 @@
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep ETH_TYPE:ipv4 |
... grep IP_PROTO:17 | grep UDP_SRC:68 | grep UDP_DST:67 | grep VLAN_ID:${c_tag} |
... grep OUTPUT:CONTROLLER
- ${upstream_flow_ipv4_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_flow_ipv4_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${upstream_flow_ipv4_cmd}
Should Not Be Empty ${upstream_flow_ipv4_added}
# Verify ipv4 dhcp downstream flow
@@ -221,7 +259,7 @@
${downstream_flow_ipv4_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep ETH_TYPE:ipv4 |
... grep IP_PROTO:17 | grep UDP_SRC:67 | grep UDP_DST:68 | grep OUTPUT:CONTROLLER
- ${downstream_flow_ipv4_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_ipv4_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${downstream_flow_ipv4_cmd}
Should Not Be Empty ${downstream_flow_ipv4_added}
@@ -229,39 +267,39 @@
[Arguments] ${ip} ${port} ${olt_of_id} ${onu_port} ${nni_port} ${s_tag}
[Documentation] Verifies if the Subscriber Access Flows are added in ONOS for the ONU
# Verify upstream table=0 flow
- ${upstream_flow_0_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_flow_0_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:Any | grep transition=TABLE:1
Should Not Be Empty ${upstream_flow_0_added}
# Verify upstream table=1 flow
${flow_vlan_push_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:Any |
... grep VLAN_PUSH | grep VLAN_ID:${s_tag} | grep OUTPUT:${nni_port}
- ${upstream_flow_1_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_flow_1_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${flow_vlan_push_cmd}
Should Not Be Empty ${upstream_flow_1_added}
# Verify downstream table=0 flow
${flow_vlan_pop_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
... grep VLAN_POP | grep transition=TABLE:1
- ${downstream_flow_0_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_0_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${flow_vlan_pop_cmd}
Should Not Be Empty ${downstream_flow_0_added}
# Verify downstream table=1 flow
- ${downstream_flow_1_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_1_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:Any | grep OUTPUT:${onu_port}
Should Not Be Empty ${downstream_flow_1_added}
Verify Subscriber Access Flows Added Count DT
[Arguments] ${ip} ${port} ${olt_of_id} ${expected_flows}
[Documentation] Matches for total number of subscriber access flows added for all onus
- ${access_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${access_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s ADDED ${olt_of_id} | grep -v deviceId | grep -v ETH_TYPE:lldp | grep -v ETH_TYPE:arp | wc -l
Should Be Equal As Integers ${access_flows_added} ${expected_flows}
Verify Added Flow Count for OLT TT
[Arguments] ${ip} ${port} ${olt_of_id} ${expected_flows}
[Documentation] Total number of added flows given OLT with subscriber flows
- ${access_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${access_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s ADDED ${olt_of_id} | grep -v deviceId | wc -l
Should Be Equal As Integers ${access_flows_added} ${expected_flows}
@@ -272,21 +310,21 @@
${downstream_flow_lldp_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep lldp |
... grep OUTPUT:CONTROLLER
- ${downstream_flow_lldp_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_lldp_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${downstream_flow_lldp_cmd}
Should Not Be Empty ${downstream_flow_lldp_added}
# Verify downstream dhcp flow
${downstream_flow_dhcp_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IP_PROTO:17 | grep UDP_SRC:67 | grep UDP_DST:68 |
... grep OUTPUT:CONTROLLER
- ${downstream_flow_dhcp_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_dhcp_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${downstream_flow_dhcp_cmd}
Should Not Be Empty ${downstream_flow_dhcp_added}
# Verify downstream igmp flow
${downstream_flow_igmp_cmd}= Catenate SEPARATOR=
... flows -s ADDED ${olt_of_id} | grep IP_PROTO:2 |
... grep OUTPUT:CONTROLLER
- ${downstream_flow_igmp_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_flow_igmp_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${downstream_flow_igmp_cmd}
Should Not Be Empty ${downstream_flow_igmp_added}
@@ -294,7 +332,7 @@
[Arguments] ${ip} ${port} ${olt_of_id} ${onu_port}
[Documentation] Retrieves the subscriber details at a given location
${sub_location}= Catenate SEPARATOR=/ ${olt_of_id} ${onu_port}
- ${programmed_sub}= Execute ONOS CLI Command ${ip} ${port}
+ ${programmed_sub}= Execute ONOS CLI Command use single connection ${ip} ${port}
... volt-programmed-subscribers | grep ${sub_location}
[Return] ${programmed_sub}
@@ -322,7 +360,7 @@
Get Bandwidth Profile Details
[Arguments] ${ip} ${port} ${bw_profile}
[Documentation] Retrieves the details of the given bandwidth profile
- ${bw_profile_values}= Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ${bw_profile_values}= Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... bandwidthprofile ${bw_profile}
@{bw_profile_array}= Split String ${bw_profile_values} ,
@{param_val_pair}= Split String ${bw_profile_array[1]} =
@@ -418,7 +456,7 @@
... ELSE Catenate SEPARATOR=
... meters ${olt_of_id} | grep state=ADDED | grep "rate=${us_cir}, burst-size=${us_cbs}"
... | grep "rate=${us_pir}, burst-size=${us_pbs}" | wc -l
- ${upstream_meter_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_meter_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${us_meter_cmd}
Should Be Equal As Integers ${upstream_meter_added} 1
# Get downstream bandwidth profile details
@@ -431,7 +469,7 @@
... ELSE Catenate SEPARATOR=
... meters ${olt_of_id} | grep state=ADDED | grep "rate=${ds_cir}, burst-size=${ds_cbs}"
... | grep "rate=${ds_pir}, burst-size=${ds_pbs}" | wc -l
- ${downstream_meter_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_meter_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${ds_meter_cmd}
Should Be Equal As Integers ${downstream_meter_added} 1
@@ -454,7 +492,7 @@
${us_meter_cmd}= Catenate SEPARATOR=
... meters ${olt_of_id} | grep state=ADDED | grep "rate=${us_cir}, burst-size=${us_cbs}"
... | grep "rate=${us_pir}, burst-size=${us_pbs}" | grep "rate=${us_air}, burst-size=0" | wc -l
- ${upstream_meter_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${upstream_meter_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${us_meter_cmd}
Should Be Equal As Integers ${upstream_meter_added} 1
Sleep 1s
@@ -468,7 +506,7 @@
${ds_meter_cmd}= Catenate SEPARATOR=
... meters ${olt_of_id} | grep state=ADDED | grep "rate=${ds_cir}, burst-size=${ds_cbs}"
... | grep "rate=${ds_pir}, burst-size=${ds_pbs}" | grep "rate=${ds_air}, burst-size=0" | wc -l
- ${downstream_meter_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${downstream_meter_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${ds_meter_cmd}
Should Be Equal As Integers ${downstream_meter_added} 1
@@ -485,42 +523,42 @@
${meter_cmd}= Catenate SEPARATOR=
... meters ${olt_of_id} | grep state=ADDED | grep "rate=${cir}, burst-size=${cbs}"
... | grep "rate=${pir}, burst-size=${pbs}" | grep "rate=${air}, burst-size=0" | wc -l
- ${default_meter_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${default_meter_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ${meter_cmd}
Should Be Equal As Integers ${default_meter_added} 1
Verify Device Flows Removed
[Arguments] ${ip} ${port} ${olt_of_id}
[Documentation] Verifies all flows are removed from the device
- ${device_flows}= Execute ONOS CLI Command ${ip} ${port}
+ ${device_flows}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s -f ${olt_of_id} | grep -v deviceId | wc -l
Should Be Equal As Integers ${device_flows} 0
Verify Eapol Flows Added
[Arguments] ${ip} ${port} ${expected_flows}
[Documentation] Matches for number of eapol flows based on number of onus
- ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${eapol_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s -f ADDED | grep eapol | grep IN_PORT | wc -l
Should Contain ${eapol_flows_added} ${expected_flows}
Verify No Pending Flows For ONU
[Arguments] ${ip} ${port} ${onu_port}
[Documentation] Verifies that there are no flows "PENDING" state for the ONU in ONOS
- ${pending_flows}= Execute ONOS CLI Command ${ip} ${port}
+ ${pending_flows}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s | grep IN_PORT:${onu_port} | grep PENDING
Should Be Empty ${pending_flows}
Verify Eapol Flows Added For ONU
[Arguments] ${ip} ${port} ${onu_port}
[Documentation] Verifies if the Eapol Flows are added in ONOS for the ONU
- ${eapol_flows_added}= Execute ONOS CLI Command ${ip} ${port}
+ ${eapol_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s -f ADDED | grep eapol | grep IN_PORT:${onu_port}
Should Not Be Empty ${eapol_flows_added}
Verify ONU Port Is Enabled
[Arguments] ${ip} ${port} ${onu_name}
[Documentation] Verifies if the ONU port is enabled in ONOS
- ${onu_port_enabled}= Execute ONOS CLI Command ${ip} ${port}
+ ${onu_port_enabled}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ports -e | grep portName=${onu_name}
Log ${onu_port_enabled}
Should Not Be Empty ${onu_port_enabled}
@@ -528,7 +566,7 @@
Verify ONU Port Is Disabled
[Arguments] ${ip} ${port} ${onu_name}
[Documentation] Verifies if the ONU port is disabled in ONOS
- ${onu_port_disabled}= Execute ONOS CLI Command ${ip} ${port}
+ ${onu_port_disabled}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ports -e | grep portName=${onu_name}
Log ${onu_port_disabled}
Should Be Empty ${onu_port_disabled}
@@ -536,7 +574,8 @@
Verify ONU in AAA-Users
[Arguments] ${ip} ${port} ${onu_port}
[Documentation] Verifies that the specified onu_port exists in aaa-users output
- ${aaa_users}= Execute ONOS CLI Command ${ip} ${port} aaa-users | grep AUTHORIZED | grep ${onu_port}
+ ${aaa_users}= Execute ONOS CLI Command use single connection ${ip} ${port}
+ ... aaa-users | grep AUTHORIZED | grep ${onu_port}
Should Not Be Empty ${aaa_users} ONU port ${onu_port} not found in aaa-users
Verify Empty Group in ONOS
@@ -575,7 +614,7 @@
Verify ONU in Groups
[Arguments] ${ip_onos} ${port_onos} ${deviceId} ${onu_port} ${group_exist}=True
[Documentation] Verifies that the specified onu_port exists in groups output
- ${result}= Execute ONOS CLI Command ${ip_onos} ${port_onos} groups -j
+ ${result}= Execute ONOS CLI Command use single connection ${ip_onos} ${port_onos} groups -j
Log Groups: ${result}
${groups}= To Json ${result}
${length}= Get Length ${groups}
@@ -622,7 +661,7 @@
[Arguments] ${ip} ${port} ${onu_port} ${vlan}=''
[Documentation] Verifies that the specified subscriber is found in DHCP allocations
##TODO: Enhance the keyword to include DHCP allocated address is not 0.0.0.0
- ${allocations}= Execute ONOS CLI Command ${ip} ${port}
+ ${allocations}= Execute ONOS CLI Command use single connection ${ip} ${port}
... dhcpl2relay-allocations | grep DHCPACK | grep ${onu_port} | grep ${vlan}
Should Not Be Empty ${allocations} ONU port ${onu_port} not found in dhcpl2relay-allocations
@@ -716,7 +755,7 @@
Provision subscriber
[Documentation] Calls volt-add-subscriber-access in ONOS
[Arguments] ${onos_ip} ${onos_port} ${of_id} ${onu_port}
- Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
Provision subscriber REST
@@ -804,34 +843,30 @@
[Documentation] The keyword verifies that ports, flows, meters, subscribers, dhcp are all cleared in ONOS
# Fetch OF Id for OLT
${olt_of_id}= Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device in ONOS ${olt_serial_number}
- # Open ONOS SSH Connection
- ${onos_ssh_connection} Open ONOS SSH Connection ${ip} ${port}
# Verify Ports are Removed
- ${port_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${port_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... ports ${olt_of_id} | grep -v ${olt_of_id} | wc -l
Should Be Equal As Integers ${port_count} 0
# Verify Subscribers are Removed
- ${sub_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${sub_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... volt-programmed-subscribers | grep ${olt_of_id} | wc -l
Should Be Equal As Integers ${sub_count} 0
# Verify Flows are Removed
- ${flow_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${flow_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... flows -s -f ${olt_of_id} | grep -v deviceId | wc -l
Should Be Equal As Integers ${flow_count} 0
# Verify Meters are Removed
- ${meter_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${meter_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... meters ${olt_of_id} | wc -l
Should Be Equal As Integers ${meter_count} 0
# Verify AAA-Users are Removed
- ${aaa_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${aaa_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... aaa-users ${olt_of_id} | wc -l
Should Be Equal As Integers ${aaa_count} 0
# Verify Dhcp-Allocations are Removed
- ${dhcp_count}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ${dhcp_count}= Execute ONOS CLI Command use single connection ${ip} ${port}
... dhcpl2relay-allocations ${olt_of_id} | wc -l
Should Be Equal As Integers ${dhcp_count} 0
- # Close ONOS SSH Connection
- Close ONOS SSH Connection ${onos_ssh_connection}
Delete ONOS App
[Arguments] ${url} ${app_name}
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 25840e9..3a4f6f2 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -245,7 +245,7 @@
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Run Keyword Unless ${supress_add_subscriber}
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... 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
@@ -325,7 +325,7 @@
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword Unless ${supress_add_subscriber}
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -462,7 +462,7 @@
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword Unless ${supress_add_subscriber}
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
${onu_reasons}= Create List omci-flows-pushed onu-reenabled
@@ -541,7 +541,7 @@
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword Unless ${supress_add_subscriber}
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
${onu_reasons}= Create List omci-flows-pushed onu-reenabled
@@ -712,6 +712,7 @@
Teardown Suite
[Documentation] Clean up device if desired
Run Keyword If ${teardown_device} Delete All Devices and Verify
+ Close All ONOS SSH Connections
Delete Device and Verify
[Arguments] ${olt_serial_number}
@@ -761,7 +762,7 @@
Wait Until Keyword Succeeds ${timeout} 2s
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Validate DHCP and Ping True True
@@ -829,8 +830,8 @@
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']}
... ${src['container_name']}
# Remove Subscriber Access (To replicate ATT workflow)
- ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
- ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection
+ ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
... ELSE
... Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds 60s 2s
@@ -876,7 +877,7 @@
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... 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
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
@@ -962,8 +963,8 @@
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']}
... ${src['container_name']}
# Remove Subscriber Access (To replicate DT workflow)
- ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
- ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection
+ ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
# Delete ONU Device (To replicate DT workflow)
... AND Delete Device ${onu_device_id}
... ELSE
@@ -995,7 +996,7 @@
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -1232,10 +1233,10 @@
${service_type_upper}= Run Keyword If '${service_type}' != '${EMPTY}'
... Convert To Upper Case ${service_type}
${bandwidth_profile_output}= Run Keyword If '${service_type}' != '${EMPTY}'
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-programmed-subscribers | grep ${subscriber_id} | grep '${service_type_upper}' --color=never
... ELSE
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-programmed-subscribers | grep ${subscriber_id}
@{bandwidth_profile_array}= Split String ${bandwidth_profile_output} ,
Log ${bandwidth_profile_array}
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index f8d3667..d897da8 100755
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -94,7 +94,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate DT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
# Delete ONU Device (To replicate DT workflow)
Delete Device ${onu_device_id}
@@ -107,7 +107,7 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
@@ -290,7 +290,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -430,7 +430,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -511,7 +511,7 @@
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Verify ping is succesful except for given device ${num_onus} ${onu_device_id}
# Remove Subscriber Access (To replicate DT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
# Delete ONU Device (To replicate DT workflow)
Delete Device ${onu_device_id}
@@ -520,7 +520,7 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
old mode 100644
new mode 100755
index 4edb6c9..1f1826b
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -149,7 +149,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Remove Subscriber Access
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds 60s 2s
@@ -179,7 +179,7 @@
... Validate Device ENABLED ACTIVE
... REACHABLE ${src['onu']}
# Add Subscriber Access
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -329,7 +329,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate DT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
# Delete ONU Device (To replicate DT workflow)
Delete Device ${onu_device_id}
diff --git a/tests/functional/Voltha_AlarmTests.robot b/tests/functional/Voltha_AlarmTests.robot
index fdc0069..9b7da61 100755
--- a/tests/functional/Voltha_AlarmTests.robot
+++ b/tests/functional/Voltha_AlarmTests.robot
@@ -376,8 +376,9 @@
Run Keyword If ${has_dataplane} Clean Up Linux
Run Keyword If ${teardown_device} Delete All Devices and Verify
Run Keyword If ${teardown_device} Test Empty Device List
- Run Keyword If ${teardown_device} Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ Run Keyword If ${teardown_device} Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... device-remove ${of_id}
+ Close All ONOS SSH Connections
# Onu Alarms
diff --git a/tests/functional/Voltha_ErrorScenarios.robot b/tests/functional/Voltha_ErrorScenarios.robot
old mode 100644
new mode 100755
index ec1a9a0..d41a7d6
--- a/tests/functional/Voltha_ErrorScenarios.robot
+++ b/tests/functional/Voltha_ErrorScenarios.robot
@@ -326,3 +326,4 @@
Run Keyword If ${has_dataplane} Clean Up Linux
#Restore all ONUs
# Run Keyword If ${has_dataplane} RestoreONUs ${num_onus}
+ Close All ONOS SSH Connections
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
old mode 100644
new mode 100755
index 37f1418..4cafe6c
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -17,7 +17,7 @@
Suite Setup Setup Suite
Test Setup Setup
Test Teardown Teardown
-#Suite Teardown Teardown Suite
+Suite Teardown Teardown Suite
Library Collections
Library String
Library OperatingSystem
@@ -88,7 +88,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate ATT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Enable Switch Outlet ${src['power_switch_port']}
@@ -112,7 +112,7 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... 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
@@ -321,7 +321,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -564,7 +564,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -674,7 +674,7 @@
... Running
FOR ${I} IN RANGE 0 ${num_all_onus}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
#... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -683,7 +683,7 @@
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
@@ -739,7 +739,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate ATT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Verify ping is succesful except for given device ${num_all_onus} ${onu_device_id}
Sleep 40s
@@ -763,7 +763,7 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... 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
@@ -796,3 +796,7 @@
Delete All Devices and Verify
# Execute normal test Setup Keyword
Setup
+
+Teardown Suite
+ [Documentation] Clean up ONOS SSH connections
+ Close All ONOS SSH Connections
diff --git a/tests/functional/Voltha_FailureScenarios2.robot b/tests/functional/Voltha_FailureScenarios2.robot
old mode 100644
new mode 100755
index 8047963..137fc9b
--- a/tests/functional/Voltha_FailureScenarios2.robot
+++ b/tests/functional/Voltha_FailureScenarios2.robot
@@ -17,7 +17,7 @@
Suite Setup Setup Suite
Test Setup Setup
Test Teardown Teardown
-#Suite Teardown Teardown Suite
+Suite Teardown Teardown Suite
Library Collections
Library String
Library OperatingSystem
@@ -133,7 +133,7 @@
... Running
FOR ${I} IN RANGE 0 ${num_onus}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
#... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -141,7 +141,7 @@
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify DHCP-Allocations
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
@@ -156,3 +156,7 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
+
+Teardown Suite
+ [Documentation] Clean up ONOS SSH connections
+ Close All ONOS SSH Connections
diff --git a/tests/functional/Voltha_MultiOLT_Tests.robot b/tests/functional/Voltha_MultiOLT_Tests.robot
old mode 100644
new mode 100755
index c55a8cc..bfff1d3
--- a/tests/functional/Voltha_MultiOLT_Tests.robot
+++ b/tests/functional/Voltha_MultiOLT_Tests.robot
@@ -17,7 +17,7 @@
Suite Setup Setup Suite
Test Setup Setup
Test Teardown Teardown
-#Suite Teardown Teardown Suite
+Suite Teardown Teardown Suite
Library Collections
Library String
Library OperatingSystem
@@ -182,3 +182,7 @@
# Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
Run Keyword If ${has_dataplane} Clean Up Linux
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
+
+Teardown Suite
+ [Documentation] Clean up ONOS SSH connections
+ Close All ONOS SSH Connections
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
old mode 100644
new mode 100755
index d59a075..dea6d12
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -143,7 +143,7 @@
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
@@ -151,7 +151,7 @@
... Wait Until Keyword Succeeds 60s 2s
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
@@ -186,7 +186,7 @@
... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Sleep 15s
Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
@@ -202,7 +202,7 @@
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
... ${dst['container_name']}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
@@ -239,7 +239,7 @@
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds ${timeout} 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds 60s 2s Check Ping
@@ -255,7 +255,7 @@
... ${src['container_type']} ${src['container_name']}
Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} ${onu_port}
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -305,7 +305,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate ATT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
END
#Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
diff --git a/tests/functional/Voltha_ScaleFunctionalTests.robot b/tests/functional/Voltha_ScaleFunctionalTests.robot
old mode 100644
new mode 100755
index f7b0cc9..3dd090a
--- a/tests/functional/Voltha_ScaleFunctionalTests.robot
+++ b/tests/functional/Voltha_ScaleFunctionalTests.robot
@@ -113,7 +113,7 @@
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
END
@@ -194,8 +194,9 @@
Run Keyword If ${has_dataplane} Clean Up Linux
Run Keyword If ${teardown_device} Delete Device and Verify
Run Keyword If ${teardown_device} Test Empty Device List
- Run Keyword If ${teardown_device} Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ Run Keyword If ${teardown_device} Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... device-remove ${of_id}
+ Close All ONOS SSH Connections
Clean Up Linux
[Documentation] Kill processes and clean up interfaces on src+dst servers
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 82454be..18928c7 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -348,7 +348,7 @@
Do Onu Flow Check Per OLT ${of_id} ${nni_port} ${olt_serial_number} ${onu_count}
END
#log flows for verification
- ${flowsresult}= Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s
+ ${flowsresult}= Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s
log ${flowsresult}
#check for previous state is kept (normally omci-flows-pushed)
Sleep 10s
@@ -385,7 +385,7 @@
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${print2console} Log \r\n[${I}] volt-add-subscriber-access ${of_id} ${onu_port}.
... console=yes
@@ -420,7 +420,7 @@
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${print2console} Log \r\n[${I}] volt-remove-subscriber-access ${of_id} ${onu_port}.
... console=yes
diff --git a/tests/scale/Voltha_Scale_Tests.robot b/tests/scale/Voltha_Scale_Tests.robot
old mode 100644
new mode 100755
index 902d367..a9fb66e
--- a/tests/scale/Voltha_Scale_Tests.robot
+++ b/tests/scale/Voltha_Scale_Tests.robot
@@ -283,7 +283,7 @@
Teardown Suite
[Documentation] Close the SSH connection to ONOS
- Close ONOS SSH Connection ${onos_ssh_connection}
+ Close All ONOS SSH Connections
Compute device IDs
[Documentation] Creates a list of ONOS device ID based on the test configuration
diff --git a/tests/software-upgrades/ONU_Upgrade.robot b/tests/software-upgrades/ONU_Upgrade.robot
index 40b4e1d..0230bb1 100755
--- a/tests/software-upgrades/ONU_Upgrade.robot
+++ b/tests/software-upgrades/ONU_Upgrade.robot
@@ -154,3 +154,4 @@
Teardown Suite
[Documentation] Tear down steps for the suite
Run Keyword If ${has_dataplane} Clean Up Linux
+ Close All ONOS SSH Connections
diff --git a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
index 30016a7..c3ef8aa 100755
--- a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
+++ b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
@@ -123,6 +123,7 @@
Teardown Suite
[Documentation] Tear down steps for the suite
Run Keyword If ${has_dataplane} Clean Up Linux
+ Close All ONOS SSH Connections
Create Voltha Comp Under Test List
[Documentation] Creates a list of Voltha Components to Test from the input variable string
diff --git a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
index 02a56a0..563ac0e 100755
--- a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
+++ b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
@@ -91,7 +91,7 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate TT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Sleep 5s
# Enable Power Switch
@@ -100,7 +100,7 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
@@ -194,13 +194,13 @@
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
# Remove Subscriber Access (To replicate TT workflow)
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
# Check ONU port is Enabled in ONOS
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
- ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
@@ -480,6 +480,7 @@
[Documentation] Tear down steps for the suite
Run Keyword If ${has_dataplane} Clean Up Linux
Run Keyword If ${teardown_device} Delete All Devices and Verify
+ Close All ONOS SSH Connections
Clear All Devices Then Create New Device
[Documentation] Remove any devices from VOLTHA and ONOS & then Create new devices
diff --git a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
index 69d8b2c..009bc65 100755
--- a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
+++ b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
@@ -228,3 +228,4 @@
[Documentation] Tear down steps for the suite
Run Keyword If ${has_dataplane} Clean Up Linux
Run Keyword If ${teardown_device} Delete All Devices And Verify
+ Close All ONOS SSH Connections
diff --git a/tests/tt-workflow/Voltha_TT_PODTests.robot b/tests/tt-workflow/Voltha_TT_PODTests.robot
index 048b72b..9f46a75 100755
--- a/tests/tt-workflow/Voltha_TT_PODTests.robot
+++ b/tests/tt-workflow/Voltha_TT_PODTests.robot
@@ -184,7 +184,7 @@
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
... ${of_id}
# Remove Subscriber Access
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast'
... Wait Until Keyword Succeeds ${timeout} 2s
@@ -194,7 +194,7 @@
Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows
... ${onu_device_id} 0
# Add Subscriber Access
- Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
... Validate Device ENABLED ACTIVE
@@ -267,3 +267,4 @@
[Documentation] Tear down steps for the suite
Run Keyword If ${has_dataplane} Clean Up Linux
Run Keyword If ${teardown_device} Delete All Devices And Verify
+ Close All ONOS SSH Connections