+ ${follower} = BuiltIn.Evaluate random.choice( range(1, ${NUM_ODL_SYSTEM} + 1)) random
+ RETURN ${follower}
+
+Map Followers To Mac Addresses
+ [Documentation] Creates Map containing ODL_SYSTEM_IP to corresponding MAC-ADDRESS
+ ${mac_addresses} = BuiltIn.Create dictionary
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ ${mac_address} = Find Mac Address Of Ip Address ${ODL_SYSTEM_${i+1}_IP}
+ Collections.Set To Dictionary ${mac_addresses} ${ODL_SYSTEM_${i+1}_IP} ${mac_address}
+ END
+ BuiltIn.Log ${mac_addresses}
+ RETURN ${mac_addresses}
+
+Find Mac Address Of Ip Address
+ [Documentation] Finds out MAC-ADDRESS of specified IP by pinging it from TOOLS_SYSTEM machine
+ [Arguments] ${ip}
+ ${mac_address} = Utils.Run Command On Remote System And Log
+ ... ${TOOLS_SYSTEM_IP}
+ ... ping -c 10 -W 10 ${ip} >/dev/null && sudo ip neighbor show ${ip} | awk '{print $5}'
+ ... ${TOOLS_SYSTEM_USER}
+ ... ${TOOLS_SYSTEM_PASSWORD}
+ RETURN ${mac_address}
+
+Ip Addres Should Not Be Routed To Follower
+ [Documentation] Verify that IP-ADDRESS is not routed to follower specified by ID
+ [Arguments] ${mac_addresses} ${ip_address} ${follower_index}
+ ${mac_address_assigned} = Collections.Get From Dictionary
+ ... ${mac_addresses}
+ ... ${ODL_SYSTEM_${follower_index}_IP}
+ ${mac_address_resolved} = Find Mac Address Of Ip Address ${ip_address}
+ BuiltIn.Should Not Be Equal As Strings ${mac_address_assigned} ${mac_address_resolved}
+
+Ip Addres Should Be Routed To Follower
+ [Documentation] Verify that IP-ADDRESS is routed to follower specified by ID
+ [Arguments] ${mac_addresses} ${ip_address} ${follower_index}
+ ${mac_address_assigned} = Collections.Get From Dictionary
+ ... ${mac_addresses}
+ ... ${ODL_SYSTEM_${follower_index}_IP}
+ ${mac_address_resolved} = Find Mac Address Of Ip Address ${ip_address}
+ BuiltIn.Should Not Be Empty ${mac_address_resolved}
+ BuiltIn.Should Be Equal As Strings ${mac_address_assigned} ${mac_address_resolved}
+
+Shutdown Tools Node
+ [Documentation] Shutdown Tools node to avoid conflict in resolving virtual ip that is overlaping that node.
+ [Arguments] ${ip_address}=${TOOLS_SYSTEM_2_IP} ${user}=${TOOLS_SYSTEM_USER} ${passwd}=${TOOLS_SYSTEM_PASSWORD}
+ ${rc} = OperatingSystem.Run And Return Rc ping -q -c 3 ${ip_address}
+ ${stdout} = BuiltIn.Run Keyword And Return If
+ ... ${rc} == 0
+ ... Utils.Run Command On Remote System
+ ... ${ip_address}
+ ... sudo shutdown -P 0
+ ... ${user}
+ ... ${passwd}
+ BuiltIn.Log ${stdout}
+
+Create Virtual Interface
+ [Documentation] Create virtual interface on all of the cluster nodes
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System
+ ... ${ODL_SYSTEM_${i+1}_IP}
+ ... sudo modprobe dummy
+ ... ${ODL_SYSTEM_USER}
+ ... ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System And Log
+ ... ${ODL_SYSTEM_${i+1}_IP}
+ ... sudo ip link show
+ ... ${ODL_SYSTEM_USER}
+ ... ${ODL_SYSTEM_PASSWORD}
+ END
+
+Delete Virtual Interface
+ [Documentation] Create virtual interface on all of the cluster nodes
+ FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ Utils.Run Command On Remote System
+ ... ${ODL_SYSTEM_${i+1}_IP}
+ ... sudo ip link delete ${VIRTUAL_INTERFACE} type dummy
+ ... ${ODL_SYSTEM_USER}
+ ... ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System
+ ... ${ODL_SYSTEM_${i+1}_IP}
+ ... sudo rmmod dummy
+ ... ${ODL_SYSTEM_USER}
+ ... ${ODL_SYSTEM_PASSWORD}
+ Utils.Run Command On Remote System And Log
+ ... ${ODL_SYSTEM_${i+1}_IP}
+ ... sudo ip link show
+ ... ${ODL_SYSTEM_USER}
+ ... ${ODL_SYSTEM_PASSWORD}
+ END