X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FShardStability.robot;h=44ab75f403f00660c536c515dc266d17fb259bbf;hb=7dc9678b294479446ce4fb72ccca9994384bd03b;hp=c0044836a73998a737ecb7648619bc2830889849;hpb=19fc3286c9488a9c3f310a8b7364d5f6c8d57a9c;p=integration%2Ftest.git diff --git a/csit/libraries/ShardStability.robot b/csit/libraries/ShardStability.robot index c0044836a7..44ab75f403 100644 --- a/csit/libraries/ShardStability.robot +++ b/csit/libraries/ShardStability.robot @@ -14,12 +14,14 @@ Documentation Robot library to monitor shard stability. ... Requirements: ClusterManagement.ClusterManagement_Setup must be called before Shard_Stability_Init ... ... It is possible to use it for stateless comparison. +... Variable @{DEFAULT_SHARD_LIST} contains default module shards. Library Collections Library String Resource ${CURDIR}/ClusterManagement.robot *** Variables *** &{stored_details} +@{DEFAULT_SHARD_LIST} default:config default:operational topology:config topology:operational inventory:config inventory:operational entity-ownership:operational *** Keywords *** Shards_Stability_Init_Details @@ -30,16 +32,19 @@ Shards_Stability_Init_Details BuiltIn.Set_Suite_Variable ${stored_details} ${shards_details} Shards_Stability_Get_Details - [Arguments] ${shard_list} ${member_index_list}=${EMPTY} + [Arguments] ${shard_list} ${member_index_list}=${EMPTY} ${verify_restconf}=False ${http_timeout}=${EMPTY} [Documentation] Return shard details stored in dictionary. ... ${shard_list} should be initialized as @{list} shard_name1:shard_type1 shard_name2:shard.. &{shards_details} BuiltIn.Create_Dictionary - : FOR ${shard_details} IN @{shard_list} - \ ${shard_name} ${shard_type} String.Split_String ${shard_details} separator=: - \ ${leader} ${followers} ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${member_index_list} - \ Collections.Sort_List ${followers} - \ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_leader=${leader} - \ Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_followers=${followers} + CompareStream.Run_Keyword_If_At_Least_Phosphorus Collections.Remove_Values_From_List ${shard_list} entity-ownership:operational + FOR ${shard_details} IN @{shard_list} + ${shard_name} ${shard_type} String.Split_String ${shard_details} separator=: + ${leader} ${followers} ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${member_index_list} + ... verify_restconf=${verify_restconf} http_timeout=${http_timeout} + Collections.Sort_List ${followers} + Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_leader=${leader} + Collections.Set_To_Dictionary ${shards_details} ${shard_name}_${shard_type}_followers=${followers} + END BuiltIn.Return_From_Keyword ${shards_details} Shards_Stability_Verify @@ -66,13 +71,13 @@ Set_Shard_Location ClusterAdmin.Make_Leader_Local ${requested_leader_idx} topology operational Verify_Shard_Leader_Located_As_Expected - [Arguments] ${expected_leader_idx} + [Arguments] ${expected_leader_idx} ${http_timeout}=${EMPTY} [Documentation] Verify default/topology config/operational shard leader location is as expected - ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=config + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=config verify_restconf=False http_timeout=${http_timeout} BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} - ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=operational + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=default shard_type=operational verify_restconf=False http_timeout=${http_timeout} BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} - ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=config + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=config verify_restconf=False http_timeout=${http_timeout} BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader} - ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=operational + ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=operational verify_restconf=False http_timeout=${http_timeout} BuiltIn.Should_Be_Equal_As_Numbers ${expected_leader_idx} ${leader}