+
+Set Switch Configuration
+ [Documentation] This keyword will set manager,controller,tap port,bridge on each OVS
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}]
+ \ SSHLibrary.Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ \ SSHLibrary.Execute Command sudo ovs-vsctl add-br ${Bridge}
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set-controller ${Bridge} tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT_6653}
+ \ SSHLibrary.Execute Command sudo ifconfig ${Bridge} up
+ \ SSHLibrary.Execute Command sudo ovs-vsctl add-port ${Bridge} tap${tool_system_index}ed70586-6c -- set Interface tap${tool_system_index}ed70586-6c type=tap
+ \ SSHLibrary.Execute Command sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:${OVSDBPORT}
+ \ SSHLibrary.Execute Command sudo ovs-vsctl show
+
+Ovs Verification For Each Dpn
+ [Arguments] ${tools_system_ip} ${tools_ips}
+ [Documentation] This keyword will verify whether local and remote ip are present on the tunnels available on OVS
+ ${ovs_output} = Utils.Run Command On Remote System And Log ${tools_system_ip} sudo ovs-vsctl show
+ @{updated_tools_ip_list} = BuiltIn.Create List @{tools_ips}
+ Collections.Remove Values From List ${updated_tools_ip_list} ${tools_system_ip}
+ BuiltIn.Log Many @{updated_tools_ip_list}
+ ${num_tool_ips} BuiltIn.Get Length ${updated_tools_ip_list}
+ : FOR ${num} IN RANGE ${num_tool_ips}
+ \ ${tools_ip} = Collections.Get From List ${updated_tools_ip_list} ${num}
+ \ BuiltIn.Should Contain ${ovs_output} ${tools_ip}
+
+Get Tunnels List
+ [Documentation] The keyword fetches the list of operational tunnels from ODL
+ ${no_of_tunnels} KarafKeywords.Issue Command On Karaf Console ${TEP_SHOW_STATE}
+ ${tunnels} = String.Get Regexp Matches ${no_of_tunnels} tun[\\w\\d]+
+ BuiltIn.Log ${tunnels}
+ [Return] ${tunnels}
+
+Verify Table0 Entry After fetching Port Number
+ [Documentation] This keyword will get the port number and checks the table0 entry for each dpn
+ : FOR ${tools_ip} IN @{TOOLS_SYSTEM_ALL_IPS}
+ \ ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -O OpenFlow13 show ${Bridge}
+ \ ${port_numbers} = String.Get Regexp Matches ${check} (\\d+).tun.* 1
+ \ Genius.Check Table0 Entry In a Dpn ${tools_ip} ${Bridge} ${port_numbers}
+
+Verify Deleted Tunnels On OVS
+ [Arguments] ${tunnel_list} ${resp_data}
+ [Documentation] This will verify whether tunnel is deleted.
+ BuiltIn.Log ${resp_data}
+ : FOR ${tunnel} IN @{tunnel_list}
+ \ BuiltIn.Should Not Contain ${resp_data} ${tunnel}
+
+Verify Response Code Of Dpn End Point Config API
+ [Documentation] This keyword will verify response code from itm-state: dpn endpoints config api for each dpn
+ : FOR ${dpn} IN @{DPN_ID_LIST}
+ \ BuiltIn.Wait Until Keyword Succeeds 40 5 Utils.Get Data From URI session ${CONFIG_API}/itm-state:dpn-endpoints/DPN-TEPs-info/${dpn}/
+
+Get Tunnel Between DPNs
+ [Arguments] ${tunnel_type} ${config_api_type} ${dpn_id_index} @{DPN_ID_UPDATED_LIST}
+ [Documentation] This keyword will Get All the Tunnels available on DPN's
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} -1
+ \ ${tunnel} BuiltIn.Wait Until Keyword Succeeds 30 10 Genius.Get Tunnel ${DPN_ID_LIST[${dpn_id_index}]}
+ \ ... ${DPN_ID_UPDATED_LIST[${tool_system_index}]} ${tunnel_type} ${config_api_type}
+ ${dpn_id_index} = BuiltIn.Evaluate ${dpn_id_index}+1
+ [Return] ${dpn_id_index}
+
+Update Dpn id List And Get Tunnels
+ [Arguments] ${tunnel_type} ${config_api_type}=${EMPTY}
+ [Documentation] Update the exisisting dpn id list to form different combination of dpn ids such that tunnel formation between all dpns is verified.
+ ${dpn_id_index_1} = BuiltIn.Set Variable 0
+ : FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM}
+ \ ${dpn_id_index_2} = BuiltIn.Set Variable ${dpn_id_index_1}
+ \ @{DPN_ID_UPDATED_LIST} = BuiltIn.Create List @{DPN_ID_LIST}
+ \ Collections.Remove Values From List ${DPN_ID_UPDATED_LIST} ${DPN_ID_LIST[${tool_system_index}]}
+ \ BuiltIn.Log Many ${DPN_ID_UPDATED_LIST}
+ \ ${dpn_id_index_1} = Get Tunnel Between DPNs ${tunnel_type} ${config_api_type} ${dpn_id_index_2} @{DPN_ID_UPDATED_LIST}