+
+ITM Direct Tunnels Start Suite
+ [Documentation] start suite for itm scalability
+ ClusterManagement.ClusterManagement_Setup
+ ClusterManagement.Stop_Members_From_List_Or_All
+ ClusterManagement.Clean_Journals_Data_And_Snapshots_On_List_Or_All
+ Run Command On Remote System And Log ${ODL_SYSTEM_IP} sed -i -- 's/<itm-direct-tunnels>false/<itm-direct-tunnels>true/g' ${GENIUS_IFM_CONFIG_FLAG}
+ ClusterManagement.Start_Members_From_List_Or_All
+ Genius Suite Setup
+
+ITM Direct Tunnels Stop Suite
+ Run Command On Remote System And Log ${ODL_SYSTEM_IP} sed -i -- 's/<itm-direct-tunnels>true/<itm-direct-tunnels>false/g' ${GENIUS_IFM_CONFIG_FLAG}
+ Genius Suite Teardown
+
+Verify Tunnel Monitoring is on
+ [Documentation] This keyword will get tep:show output and verify tunnel monitoring status
+ ${output}= Issue Command On Karaf Console ${TEP_SHOW}
+ Should Contain ${output} ${TUNNEL_MONITOR_ON}
+
+Ovs Verification For 2 Dpn
+ [Arguments] ${connection_id} ${local} ${remote-1} ${tunnel} ${tunnel-type}
+ [Documentation] Checks whether the created Interface is seen on OVS or not.
+ Switch Connection ${connection_id}
+ ${check} Execute Command sudo ovs-vsctl show
+ Log ${check}
+ Should Contain ${check} local_ip="${local}" remote_ip="${remote-1}" ${tunnel} ${tunnel-type}
+ [Return] ${check}
+
+Get ITM
+ [Arguments] ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${TOOLS_SYSTEM_IP} ${Dpn_id_2}
+ ... ${TOOLS_SYSTEM_2_IP}
+ [Documentation] It returns the created ITM Transport zone with the passed values during the creation is done.
+ Log ${itm_created[0]},${subnet}, ${vlan}, ${Dpn_id_1},${TOOLS_SYSTEM_IP}, ${Dpn_id_2}, ${TOOLS_SYSTEM_2_IP}
+ @{Itm-no-vlan} Create List ${itm_created[0]} ${subnet} ${vlan} ${Dpn_id_1} ${Bridge-1}-eth1
+ ... ${TOOLS_SYSTEM_IP} ${Dpn_id_2} ${Bridge-2}-eth1 ${TOOLS_SYSTEM_2_IP}
+ Check For Elements At URI ${TUNNEL_TRANSPORTZONE}/transport-zone/${itm_created[0]} ${Itm-no-vlan}
+
+Check Tunnel Delete On OVS
+ [Arguments] ${connection-id} ${tunnel}
+ [Documentation] Verifies the Tunnel is deleted from OVS
+ Switch Connection ${connection-id}
+ ${return} Execute Command sudo ovs-vsctl show
+ Log ${return}
+ Should Not Contain ${return} ${tunnel}
+ [Return] ${return}
+
+Check Table0 Entry For 2 Dpn
+ [Arguments] ${connection_id} ${Bridgename} ${port-num1}
+ [Documentation] Checks the Table 0 entry in the OVS when flows are dumped.
+ Switch Connection ${connection_id}
+ Log ${connection_id}
+ ${check} Execute Command sudo ovs-ofctl -O OpenFlow13 dump-flows ${Bridgename}
+ Log ${check}
+ Should Contain ${check} in_port=${port-num1}
+ [Return] ${check}
+
+Check ITM Tunnel State
+ [Arguments] ${tunnel1} ${tunnel2}
+ [Documentation] Verifies the Tunnel is deleted from datastore
+ ${resp} RequestsLibrary.Get Request session ${OPERATIONAL_API}/itm-state:tunnels_state/
+ Should Not Contain ${resp.content} ${tunnel1} ${tunnel2}
+
+Verify Tunnel Status as UP
+ [Documentation] Verify that the number of tunnels are UP
+ ${No_of_Teps} Issue_Command_On_Karaf_Console ${TEP_SHOW}
+ ${Lines_of_TZA} Get Lines Containing String ${No_of_Teps} TZA
+ ${Expected_Node_Count} Get Line Count ${Lines_of_TZA}
+ ${no_of_tunnels} Issue_Command_On_Karaf_Console ${TEP_SHOW_STATE}
+ ${lines_of_VXLAN} Get Lines Containing String ${no_of_tunnels} VXLAN
+ Should Contain ${no_of_tunnels} ${STATE_UP}
+ Should Not Contain ${no_of_tunnels} ${STATE_DOWN}
+ Should Not Contain ${no_of_tunnels} ${STATE_UNKNOWN}
+ ${Actual_Tunnel_Count} Get Line Count ${lines_of_VXLAN}
+ ${Expected_Tunnel_Count} Set Variable ${Expected_Node_Count*${Expected_Node_Count - 1}}
+ Should Be Equal As Strings ${Actual_Tunnel_Count} ${Expected_Tunnel_Count}