+
+Get DPID
+ [Arguments] ${ip}
+ [Documentation] Returns the dpnid from the system at the given ip address using ovs-ofctl assuming br-int is present.
+ ${output} = Run Command On Remote System ${ip} sudo ovs-ofctl show -O Openflow13 br-int | head -1 | awk -F "dpid:" '{print $2}'
+ ${dpnid} = Convert To Integer ${output} 16
+ Log ${dpnid}
+ [Return] ${dpnid}
+
+Get Subnet
+ [Arguments] ${ip}
+ [Documentation] Return the subnet from the system at the given ip address and interface
+ ${output} = Run Command On Remote System ${ip} /usr/sbin/ip addr show | grep ${ip} | cut -d' ' -f6
+ ${interface} = ipaddress.ip_interface ${output}
+ ${network}= Set Variable ${interface.network.__str__()}
+ [Return] ${network}
+
+Get Ethernet Adapter
+ [Arguments] ${ip}
+ [Documentation] Returns the ethernet adapter name from the system at the given ip address using ip addr show.
+ ${adapter} = Run Command On Remote System ${ip} /usr/sbin/ip addr show | grep ${ip} | cut -d " " -f 11
+ Log ${adapter}
+ [Return] ${adapter}
+
+Get Default Gateway
+ [Arguments] ${ip}
+ [Documentation] Returns the default gateway at the given ip address using route command.
+ ${gateway} = Run Command On Remote System ${ip} /usr/sbin/route -n | grep '^0.0.0.0' | cut -d " " -f 10
+ Log ${gateway}
+ [Return] ${gateway}
+
+Add OVS Logging
+ [Arguments] ${conn_id}
+ [Documentation] Add higher levels of OVS logging
+ SSHLibrary.Switch Connection ${conn_id}
+ @{modules} = BuiltIn.Create List bridge:file:dbg connmgr:file:dbg inband:file:dbg ofp_actions:file:dbg ofp_errors:file:dbg
+ ... ofp_msgs:file:dbg ovsdb_error:file:dbg rconn:file:dbg tunnel:file:dbg vconn:file:dbg
+ : FOR ${module} IN @{modules}
+ \ Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/set ${module} ${DEFAULT_LINUX_PROMPT_STRICT}
+ Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/list ${DEFAULT_LINUX_PROMPT_STRICT}
+
+Reset OVS Logging
+ [Arguments] ${conn_id}
+ [Documentation] Reset the OVS logging
+ SSHLibrary.Switch Connection ${conn_id}
+ ${output} = Write Commands Until Expected Prompt sudo ovs-appctl --target ovs-vswitchd vlog/set :file:info ${DEFAULT_LINUX_PROMPT_STRICT}