Correcting Get Value from JSON
[integration/test.git] / csit / libraries / ShardStability.robot
index 89d4f0c6a1231ffebbea82491ce603ca1f4f5171..9a9995d628a0fa21d8a543b918a4a9c6c235a87e 100644 (file)
@@ -1,18 +1,18 @@
 *** Settings ***
 Documentation     Robot library to monitor shard stability.
 *** Settings ***
 Documentation     Robot library to monitor shard stability.
-...
+...           
 ...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
 ...               Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
-...
+...           
 ...               This program and the accompanying materials are made available under the
 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
 ...               This program and the accompanying materials are made available under the
 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
-...
+...           
 ...               This is a "stateful" library to monitor shard leaders and candidates. During the initial phase
 ...               all leaders and followeres are stored and then checked with new value on verify.
 ...               TODO: investigate whether pure stateless library would be easier or harder to use.
 ...               This is a "stateful" library to monitor shard leaders and candidates. During the initial phase
 ...               all leaders and followeres are stored and then checked with new value on verify.
 ...               TODO: investigate whether pure stateless library would be easier or harder to use.
-...
+...           
 ...               Requirements: ClusterManagement.ClusterManagement_Setup must be called before Shard_Stability_Init
 ...               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
 ...               It is possible to use it for stateless comparison.
 ...               Variable @{DEFAULT_SHARD_LIST} contains default module shards.
 Library           Collections
@@ -36,13 +36,14 @@ Shards_Stability_Get_Details
     [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
     [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}
-    \    ...    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}
+    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
     BuiltIn.Return_From_Keyword    ${shards_details}
 
 Shards_Stability_Verify