- Clean Mininet System ${tools_system}
- Run Command On Remote System ${tools_system} sudo ovs-vsctl del-manager
- Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl stop
- Run Command On Remote System ${tools_system} sudo rm -rf /etc/openvswitch/conf.db
- Run Command On Remote System ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl start
+ Utils.Clean Mininet System ${tools_system}
+ Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl del-manager
+ Utils.Run Command On Mininet ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl stop
+ Utils.Run Command On Mininet ${tools_system} sudo rm -rf /etc/openvswitch/conf.db
+ Utils.Run Command On Mininet ${tools_system} sudo /usr/share/openvswitch/scripts/ovs-ctl start
+
+Set Controller In OVS Bridge
+ [Arguments] ${tools_system} ${bridge} ${controller_opt}
+ [Documentation] Sets controller for a given OVS ${bridge} using controller options in ${controller_opt}
+ Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl del-controller ${bridge}
+ Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl set-controller ${bridge} ${controller_opt}
+
+Add Multiple Managers to OVS
+ [Arguments] ${tools_system} ${controller_index_list} ${ovs_mgr_port}=6640
+ [Documentation] Connect OVS to all controllers in the ${controller_index_list}.
+ Log Clear any existing mininet
+ Utils.Clean Mininet System ${tools_system}
+ ${ovs_opt}= Set Variable
+ : FOR ${index} IN @{controller_index_list}
+ \ ${ovs_opt}= Catenate ${ovs_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ovs_mgr_port}
+ \ Log ${ovs_opt}
+ Log Configure OVS Managers in the OVS
+ Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl set-manager ${ovs_opt}
+ Log Check OVS configuratiom
+ ${output}= Utils.Run Command On Mininet ${tools_system} sudo ovs-vsctl show
+ Log ${output}
+ ${ovsdb_uuid}= Wait Until Keyword Succeeds 5s 1s Get OVSDB UUID controller_http_session=controller1
+ [Return] ${ovsdb_uuid}