From a8c66a4b1afe2423aa709c8bc0b0d66d634ba657 Mon Sep 17 00:00:00 2001 From: Tomas Cere Date: Mon, 31 Jan 2022 13:45:01 +0100 Subject: [PATCH 1/1] Fix wrong mapping type for templated requests in netconf 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 Change-Id: I50c72ceb93e0891af581988b7b0d1db9d7a6b5f4 --- csit/libraries/NetconfKeywords.robot | 2 +- csit/suites/netconf/CRUD/CRUD-RPC.robot | 16 ++++++++-------- csit/suites/netconf/CRUD/CRUD.robot | 16 ++++++++-------- csit/suites/netconf/clustering/CRUD.robot | 6 +++--- csit/suites/netconf/clustering/bug8086.robot | 6 +++--- .../clustering/entity-isolation-rejoin.robot | 6 +++--- csit/suites/netconf/clustering/entity.robot | 6 +++--- .../netconf/clusteringscale/performance.robot | 2 +- .../netconf/restperfclient/performance.robot | 2 +- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/csit/libraries/NetconfKeywords.robot b/csit/libraries/NetconfKeywords.robot index abf155c92e..5725284b76 100644 --- a/csit/libraries/NetconfKeywords.robot +++ b/csit/libraries/NetconfKeywords.robot @@ -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 diff --git a/csit/suites/netconf/CRUD/CRUD-RPC.robot b/csit/suites/netconf/CRUD/CRUD-RPC.robot index 4341f65342..ae5b22ed29 100644 --- a/csit/suites/netconf/CRUD/CRUD-RPC.robot +++ b/csit/suites/netconf/CRUD/CRUD-RPC.robot @@ -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} diff --git a/csit/suites/netconf/CRUD/CRUD.robot b/csit/suites/netconf/CRUD/CRUD.robot index 305a73645a..9d1e485f0f 100644 --- a/csit/suites/netconf/CRUD/CRUD.robot +++ b/csit/suites/netconf/CRUD/CRUD.robot @@ -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} diff --git a/csit/suites/netconf/clustering/CRUD.robot b/csit/suites/netconf/clustering/CRUD.robot index fc3fd9c469..7cf3f6637c 100644 --- a/csit/suites/netconf/clustering/CRUD.robot +++ b/csit/suites/netconf/clustering/CRUD.robot @@ -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 diff --git a/csit/suites/netconf/clustering/bug8086.robot b/csit/suites/netconf/clustering/bug8086.robot index 8ecda549a4..982553d858 100644 --- a/csit/suites/netconf/clustering/bug8086.robot +++ b/csit/suites/netconf/clustering/bug8086.robot @@ -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 diff --git a/csit/suites/netconf/clustering/entity-isolation-rejoin.robot b/csit/suites/netconf/clustering/entity-isolation-rejoin.robot index 27a9248c65..1133999ee5 100644 --- a/csit/suites/netconf/clustering/entity-isolation-rejoin.robot +++ b/csit/suites/netconf/clustering/entity-isolation-rejoin.robot @@ -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 diff --git a/csit/suites/netconf/clustering/entity.robot b/csit/suites/netconf/clustering/entity.robot index 90cbc95020..e6f2f8b449 100644 --- a/csit/suites/netconf/clustering/entity.robot +++ b/csit/suites/netconf/clustering/entity.robot @@ -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 diff --git a/csit/suites/netconf/clusteringscale/performance.robot b/csit/suites/netconf/clusteringscale/performance.robot index 0067ff9079..5f11c435cd 100644 --- a/csit/suites/netconf/clusteringscale/performance.robot +++ b/csit/suites/netconf/clusteringscale/performance.robot @@ -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 diff --git a/csit/suites/netconf/restperfclient/performance.robot b/csit/suites/netconf/restperfclient/performance.robot index 6c26e305b7..3ec646a4d9 100644 --- a/csit/suites/netconf/restperfclient/performance.robot +++ b/csit/suites/netconf/restperfclient/performance.robot @@ -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 -- 2.36.6