Fix wrong mapping type for templated requests in netconf 31/99531/1
authorTomas Cere <tomas.cere@pantheon.tech>
Mon, 31 Jan 2022 12:45:01 +0000 (13:45 +0100)
committerTomas Cere <tomas.cere@pantheon.tech>
Mon, 31 Jan 2022 12:45:01 +0000 (13:45 +0100)
This is currently causing a number of failures all over netconf
suite due to wrong string type used for mapping in templated requests.

Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Change-Id: I50c72ceb93e0891af581988b7b0d1db9d7a6b5f4

csit/libraries/NetconfKeywords.robot
csit/suites/netconf/CRUD/CRUD-RPC.robot
csit/suites/netconf/CRUD/CRUD.robot
csit/suites/netconf/clustering/CRUD.robot
csit/suites/netconf/clustering/bug8086.robot
csit/suites/netconf/clustering/entity-isolation-rejoin.robot
csit/suites/netconf/clustering/entity.robot
csit/suites/netconf/clusteringscale/performance.robot
csit/suites/netconf/restperfclient/performance.robot

index abf155c92ea3ea1f01d903ba47d536a8a474b48a..5725284b76cbeab7b50969cd0b5e2a2e3c2a8108 100644 (file)
@@ -123,7 +123,7 @@ Remove_Device_From_Netconf
     [Arguments]    ${device_name}    ${session}=default    ${location}=location
     [Documentation]    Tell Netconf to deconfigure the specified device
     ${device_type}=    Collections.Pop_From_Dictionary    ${NetconfKeywords__mounted_device_types}    ${device_name}
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Delete_Templated    ${DIRECTORY_WITH_DEVICE_TEMPLATES}${/}${device_type}    ${template_as_string}    session=${session}    location=${location}
 
 Deconfigure_Device
index 4341f65342179c62132b1782db79e5d8beacb5fb..ae5b22ed29f65458515ac9249945f2b3788bada6 100644 (file)
@@ -74,7 +74,7 @@ Check_Device_Data_Is_Empty
 
 Create_Device_Data_Label_Via_Xml
     [Documentation]    Send a sample test data label into the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}
 
 Check_Device_Data_Label_Is_Created
@@ -83,7 +83,7 @@ Check_Device_Data_Label_Is_Created
 
 Modify_Device_Data_Label_Via_Xml
     [Documentation]    Send a request to change the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}
 
 Check_Device_Data_Label_Is_Modified
@@ -120,7 +120,7 @@ Check_Modified_Device_Data_Is_Still_There
 
 Modify_Device_Data_Again
     [Documentation]    Send a request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Xml_Templated    ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod2    ${template_as_string}
 
 Check_Device_Data_Is_Modified_Again
@@ -129,7 +129,7 @@ Check_Device_Data_Is_Modified_Again
 
 Modify_Device_Data_Label_Via_Json
     [Documentation]    Send a JSON request to change the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Json_Templated    ${directory_with_template_folders}${/}datamodjson    ${template_as_string}
 
 Check_Device_Data_Label_Is_Modified_Via_Json
@@ -138,7 +138,7 @@ Check_Device_Data_Label_Is_Modified_Via_Json
 
 Create_Car_List
     [Documentation]    Send a request to create a list of cars in the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}cars    ${template_as_string}
 
 Check_Car_List_Created
@@ -158,7 +158,7 @@ Check_Car_List_Created
 
 Add_Device_Data_Item_1_Via_XML_Post
     [Documentation]    Send a request to create a data item in the test list and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}item1    ${template_as_string}
 
 Check_Item1_Is_Created
@@ -177,7 +177,7 @@ Check_Item1_Is_Created
 
 Add_Device_Data_Item_2_Via_JSON_Post
     [Documentation]    Send a JSON request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Json_Templated    ${directory_with_template_folders}${/}item2    ${template_as_string}
 
 Check_Item2_Is_Created
@@ -196,7 +196,7 @@ Check_Item2_Is_Created
 
 Delete_Device_Data
     [Documentation]    Send a request to delete the sample test data on the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}item1    ${template_as_string}
 
index 305a73645ab24f4c8ab60594f30b248238b9c89c..9d1e485f0f078ac46791bb81f0e59cc13fc073ed 100644 (file)
@@ -69,7 +69,7 @@ Check_Device_Data_Is_Empty
 
 Create_Device_Data_Label_Via_Xml
     [Documentation]    Send a sample test data label into the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}
 
 Check_Device_Data_Label_Is_Created
@@ -78,7 +78,7 @@ Check_Device_Data_Label_Is_Created
 
 Modify_Device_Data_Label_Via_Xml
     [Documentation]    Send a request to change the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}
 
 Check_Device_Data_Label_Is_Modified
@@ -114,7 +114,7 @@ Check_Modified_Device_Data_Is_Still_There
 
 Modify_Device_Data_Again
     [Documentation]    Send a request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Xml_Templated    ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod2    ${template_as_string}
 
 Check_Device_Data_Is_Modified_Again
@@ -123,7 +123,7 @@ Check_Device_Data_Is_Modified_Again
 
 Modify_Device_Data_Label_Via_Json
     [Documentation]    Send a JSON request to change the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Put_As_Json_Templated    ${directory_with_template_folders}${/}datamodjson    ${template_as_string}
 
 Check_Device_Data_Label_Is_Modified_Via_Json
@@ -132,7 +132,7 @@ Check_Device_Data_Label_Is_Modified_Via_Json
 
 Create_Car_List
     [Documentation]    Send a request to create a list of cars in the sample test data label and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}cars    ${template_as_string}
 
 Check_Car_List_Created
@@ -152,7 +152,7 @@ Check_Car_List_Created
 
 Add_Device_Data_Item_1_Via_XML_Post
     [Documentation]    Send a request to create a data item in the test list and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}item1    ${template_as_string}
 
 Check_Item1_Is_Created
@@ -171,7 +171,7 @@ Check_Item1_Is_Created
 
 Add_Device_Data_Item_2_Via_JSON_Post
     [Documentation]    Send a JSON request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Json_Templated    ${directory_with_template_folders}${/}item2    ${template_as_string}
 
 Check_Item2_Is_Created
@@ -190,7 +190,7 @@ Check_Item2_Is_Created
 
 Delete_Device_Data
     [Documentation]    Send a request to delete the sample test data on the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${device_name}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}item1    ${template_as_string}
 
index fc3fd9c46940a21f9d8756bc7515d51f9758f807..7cf3f6637cc351c802bfba04f195772f716e1d96 100644 (file)
@@ -105,7 +105,7 @@ Check_Device_Data_Is_Seen_As_Empty_On_Setter
 
 Create_Device_Data
     [Documentation]    Send some sample test data into the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}    session=${NODE_SETTER}
 
 Check_New_Device_Data_Is_Visible_On_Setter
@@ -122,7 +122,7 @@ Check_New_Device_Data_Is_Visible_On_Configurer
 
 Modify_Device_Data
     [Documentation]    Send a request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${NODE_SETTER}
     [Teardown]    Utils.Report_Failure_Due_To_Bug    4968
 
@@ -143,7 +143,7 @@ Check_Modified_Device_Data_Is_Visible_On_Configurer
 
 Delete_Device_Data
     [Documentation]    Send a request to delete the sample test data on the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${NODE_SETTER}
     [Teardown]    Utils.Report_Failure_Due_To_Bug    4968
 
index 8ecda549a4bb121211a6a5b26f2e58eba390b14d..982553d85822f59a8600ee79ec8c93e9dd103eb8 100644 (file)
@@ -100,7 +100,7 @@ Check_Device_Data_Is_Seen_As_Empty_On_Setter
 
 Create_Device_Data
     [Documentation]    Send some sample test data into the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}    session=${NODE_SETTER}
 
 Check_New_Device_Data_Is_Visible_On_Setter
@@ -117,7 +117,7 @@ Check_New_Device_Data_Is_Visible_On_Configurer
 
 Modify_Device_Data
     [Documentation]    Send a request to change the sample test data and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${NODE_SETTER}
 
 Check_Device_Data_Is_Modified
@@ -134,7 +134,7 @@ Check_Modified_Device_Data_Is_Visible_On_Configurer
 
 Delete_Device_Data
     [Documentation]    Send a request to delete the sample test data on the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Delete_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${NODE_SETTER}
 
 Check_Device_Data_Is_Deleted
index 27a9248c652c5580bb1150000adb5666d98d1924..1133999ee556a0c7cff4ed62824efb1b4bcf9189 100644 (file)
@@ -84,7 +84,7 @@ Check_Config_Data_Before_Data_Creation
 
 Create_Device_Data
     [Documentation]    Create some data on the device and propagate it throughout the cluster.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}    session=${node2_session}
 
 Check_Config_Data_After_Data_Creation
@@ -122,7 +122,7 @@ Check_Config_Data_Before_Modification_With_Original_Owner_Down
 
 Modify_Device_Data_When_Original_Owner_Is_Down
     [Documentation]    Attempt to modify the data on the device after recovery and see if it still works.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${follower1_session}
 
 Check_Config_Data_After_Modification_With_Original_Owner_Down
@@ -141,7 +141,7 @@ Check_Config_Data_After_Original_Owner_Restart
 
 Modify_Device_Data_With_Original_Owner
     [Documentation]    Check that the original owner of the entity is still able to modify the data on the device
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod2    ${template_as_string}    session=${original_device_owner_session}
 
 Check_Config_Data_After_Modification_With_Original_Owner_Up
index 90cbc950200c33dba79222feff4a44c88d082aed..e6f2f8b4495c70cd49309eeb0a2f14d462b0a0e7 100644 (file)
@@ -85,7 +85,7 @@ Check_Config_Data_Before_Data_Creation
 
 Create_Device_Data
     [Documentation]    Create some data on the device and propagate it throughout the cluster.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_template_folders}${/}dataorig    ${template_as_string}    session=${node2_session}
 
 Check_Config_Data_After_Data_Creation
@@ -123,7 +123,7 @@ Check_Config_Data_Before_Modification_With_Original_Owner_Down
 
 Modify_Device_Data_When_Original_Owner_Is_Down
     [Documentation]    Attempt to modify the data on the device after recovery and see if it still works.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod1    ${template_as_string}    session=${follower1_session}
     [Teardown]    Utils.Report_Failure_Due_To_Bug    4968
 
@@ -144,7 +144,7 @@ Check_Config_Data_After_Original_Owner_Restart
 
 Modify_Device_Data_With_Original_Owner
     [Documentation]    Check that the original owner of the entity is still able to modify the data on the device
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}
     TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}datamod2    ${template_as_string}    session=${original_device_owner_session}
     [Teardown]    Utils.Report_Failure_Due_To_Bug    5761
 
index 0067ff90796f65eeb4966123c3c2a1834952851e..5f11c435cdbabb0272755970276e76bed3f863fb 100644 (file)
@@ -66,7 +66,7 @@ Wait_For_Device_Data_To_Be_Seen
 
 Create_Device_Data
     [Documentation]    Send some sample test data into the device through node 2 and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_crud_templates}${/}cars    ${template_as_string}    session=node2
 
 Run_Restperfclient
index 6c26e305b7267ba52a6c24ad71454da144062285..3ec646a4d9234cd0caa01cc7f6db3c2d73838d11 100644 (file)
@@ -57,7 +57,7 @@ Wait_For_Device_To_Become_Connected
 
 Create_Device_Data
     [Documentation]    Send some sample test data into the device and check that the request went OK.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    ${template_as_string}=    BuiltIn.Create_Dictionary    DEVICE_NAME=${device_name}'}
     TemplatedRequests.Post_As_Xml_Templated    ${directory_with_crud_templates}${/}cars    ${template_as_string}
 
 Run_Restperfclient