From eb86b9690d977af3d556f67f28b732934a396ec9 Mon Sep 17 00:00:00 2001 From: Jozef Behran Date: Fri, 13 Nov 2015 10:30:30 +0100 Subject: [PATCH] Cycling device and checking that the data survived. After the device data modification step the test suite deconfigures the device, configures it back and checks that the data is still there as they were when it was last modified. Then the suite tries to modify the data again just to make sure the deconfigure/configure cycle did not mysteriously make them read-only. Change-Id: I403357d85b80f28060775e57bb6192de90a6114e Signed-off-by: Jozef Behran --- csit/suites/netconf/CRUD/CRUD.robot | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/csit/suites/netconf/CRUD/CRUD.robot b/csit/suites/netconf/CRUD/CRUD.robot index 5a9b851567..79503abf4c 100644 --- a/csit/suites/netconf/CRUD/CRUD.robot +++ b/csit/suites/netconf/CRUD/CRUD.robot @@ -83,6 +83,42 @@ Check_Device_Data_Label_Is_Modified [Documentation] Get the device data label and make sure it contains the modified content. Check_Config_Data Modified Content +Deconfigure_Device_From_Netconf_Temporarily + [Documentation] Make request to deconfigure the testtool device on Netconf connector. + ... This is the first part of the "configure/deconfigure" cycle of the device + ... The purpose of cycling the device like this is to see that the configuration + ... data was really stored in the device. + [Tags] critical + [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + NetconfKeywords.Remove_Device_From_Netconf ${device_name} + +Wait_For_Device_To_Be_Gone + [Documentation] Wait for the device to completely disappear. + NetconfKeywords.Wait_Device_Fully_Removed ${device_name} + +Configure_The_Device_Back + [Documentation] Configure the device again. + ... This is the second step of the device configuration. + [Tags] critical + NetconfKeywords.Configure_Device_In_Netconf ${device_name} + +Wait_For_Device_To_Reconnect + [Documentation] Wait until the device becomes available through Netconf. + NetconfKeywords.Wait_Device_Connected ${device_name} + +Check_Modified_Device_Data_Is_Still_There + [Documentation] Get the device data and make sure it contains the created content. + BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data Modified Content + +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}'} + NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod2 ${template_as_string} + +Check_Device_Data_Is_Modified_Again + [Documentation] Get the device data and make sure it contains the created content. + Check_Config_Data Another Modified Content + 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}'} -- 2.36.6