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
[Documentation] Connect switches s2 and s3 to candidate instance.
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 tcp:${ODL_SYSTEM_${original_candidate}_IP}:6633
OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s3 tcp:${ODL_SYSTEM_${original_candidate}_IP}:6633
- ${owner_list}= Create List ${original_candidate}
- ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:2 1 ${owner_list}
+ ${member_list} = BuiltIn.Run_Keyword_If '${ODL_STREAM}' != 'beryllium' and '${ODL_OF_PLUGIN}' == 'lithium' Create List @{ClusterManagement__member_index_list}
+ ... ELSE Create List ${original_candidate}
+ ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:2 1 ${member_list}
Should Be Equal ${owner} ${original_candidate}
- ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:3 1 ${owner_list}
+ ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:3 1 ${member_list}
Should Be Equal ${owner} ${original_candidate}
Check Network Operational Information Before Fail
${new_master}= BuiltIn.Wait Until Keyword Succeeds 5x 3s Verify New Master Controller Node ${switch_name} ${old_master}
${owner} ${followers}= ClusterManagement.Get Owner And Candidates For Device openflow:${idx} openflow ${active_member}
Collections.List Should Contain Value ${old_followers} ${owner}
- Check Count Integrity ${switch_name} expected_controllers=2
+ BuiltIn.Run Keyword If '${ODL_STREAM}' != 'beryllium' and '${ODL_OF_PLUGIN}' == 'lithium' BuiltIn.Wait Until Keyword Succeeds 5x 3s Check Count Integrity ${switch_name}
+ ... expected_controllers=3
+ ... ELSE BuiltIn.Wait Until Keyword Succeeds 5x 3s Check Count Integrity ${switch_name}
+ ... expected_controllers=2
BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP}
BuiltIn.Set Test Variable ${old_owner}
BuiltIn.Set Test Variable ${old_followers}
${old_slave}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_follower}_IP}
OvsManager.Disconnect Switch From Controller And Verify Disconnected ${switch_name} ${old_slave}
BuiltIn.Set Test Variable ${disc_cntl} ${old_slave}
- BuiltIn.Wait Until Keyword Succeeds 5x 3s Check Count Integrity ${switch_name} expected_controllers=2
+ BuiltIn.Run Keyword If '${ODL_STREAM}' != 'beryllium' and '${ODL_OF_PLUGIN}' == 'lithium' Check Count Integrity ${switch_name} expected_controllers=3
+ ... ELSE Check Count Integrity ${switch_name} expected_controllers=2
${owner} ${followers}= ClusterManagement.Get Owner And Candidates For Device openflow:${idx} openflow ${active_member}
BuiltIn.Should Be Equal ${owner} ${old_owner}
- Collections.List Should Not Contain Value ${followers} ${old_follower}
+ BuiltIn.Run Keyword If '${ODL_STREAM}' != 'beryllium' and '${ODL_OF_PLUGIN}' == 'lithium' Collections.Lists Should Be Equal ${followers} ${old_followers}
+ ... ELSE Collections.List Should Not Contain Value ${followers} ${old_follower}
BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP}
BuiltIn.Set Test Variable ${old_owner}
BuiltIn.Set Test Variable ${old_followers}