*** Settings ***
-Documentation Test suite for Cluster HA - Device Leader Follower failover
-Suite Setup ClusterManagement Setup
-Suite Teardown Delete All Sessions
-Library RequestsLibrary
-Resource ../../../libraries/ClusterOpenFlow.robot
-Resource ../../../libraries/ClusterManagement.robot
-Resource ../../../libraries/MininetKeywords.robot
-Variables ../../../variables/Variables.py
+Documentation Test suite for Cluster HA - Device Leader Follower failover
+
+Library RequestsLibrary
+Resource ../../../libraries/ClusterOpenFlow.robot
+Resource ../../../libraries/ClusterManagement.robot
+Resource ../../../libraries/MininetKeywords.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup ClusterManagement Setup
+Suite Teardown Delete All Sessions
+
*** Test Cases ***
Check Shards Status Before Leader Restart
Get inventory Leader Before Leader Restart
[Documentation] Find leader in the inventory config shard
- ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status
+ ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status
${follower_node_1}= Get From List ${inventory_followers} 0
${follower_node_2}= Get From List ${inventory_followers} 1
Set Suite Variable ${follower_node_1}
Start Mininet Connect To Leader
[Documentation] Start mininet with connection to cluster Leader.
- ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${inventory_leader}_IP}
+ ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
+ ... ${TOOLS_SYSTEM_IP}
+ ... ${ODL_SYSTEM_${inventory_leader}_IP}
Set Suite Variable ${mininet_conn_id}
Add Flows In Leader and Verify Before Leader Restart
Get inventory Follower After Leader Restart
[Documentation] Find new Followers and Leader in the inventory config shard After Leader Restart
- ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status
+ ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status
${follower_node_1}= Get From List ${inventory_followers} 0
${follower_node_2}= Get From List ${inventory_followers} 1
Set Suite Variable ${follower_node_1}
Start Mininet Connect To Follower Node1
[Documentation] Start mininet with connection to cluster Follower Node1.
- ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_1}_IP}
+ ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
+ ... ${TOOLS_SYSTEM_IP}
+ ... ${ODL_SYSTEM_${follower_node_1}_IP}
Set Suite Variable ${mininet_conn_id}
Add Flows In Follower Node2 and Verify Before Follower Restart
Get inventory Follower After Follower Restart
[Documentation] Find Followers and Leader in the inventory config shard After Follower Restart
- ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status
+ ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status
${follower_node_1}= Get From List ${inventory_followers} 0
${follower_node_2}= Get From List ${inventory_followers} 1
Set Suite Variable ${follower_node_1}
Start Mininet Connect To Follower Node2
[Documentation] Start mininet with connection to cluster Follower Node1.
- ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_2}_IP}
+ ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
+ ... ${TOOLS_SYSTEM_IP}
+ ... ${ODL_SYSTEM_${follower_node_2}_IP}
Set Suite Variable ${mininet_conn_id}
Add Flows In Follower Node1 and Verify Before Cluster Restart
Get inventory Status After Cluster Restart
[Documentation] Find New Followers and Leader in the inventory config shard After Cluster Restart
- ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status
+ ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status
${follower_node_1}= Get From List ${inventory_followers} 0
${follower_node_2}= Get From List ${inventory_followers} 1
Set Suite Variable ${follower_node_1}
Start Mininet Connect To Follower Node2 After Cluster Restart
[Documentation] Start mininet with connection to cluster Follower Node1.
- ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_2}_IP}
+ ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
+ ... ${TOOLS_SYSTEM_IP}
+ ... ${ODL_SYSTEM_${follower_node_2}_IP}
Set Suite Variable ${mininet_conn_id}
Add Flows In Follower Node1 and Verify After Cluster Restart