Cycling device and checking that the data survived.
[integration/test.git] / csit / suites / netconf / CRUD / CRUD.robot
index 5a9b8515672b2cb4350f5f3e7b08540b2675f5ca..79503abf4c849fe0d311ef0df575be97ec2f4419 100644 (file)
@@ -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    <data xmlns="${ODL_NETCONF_NAMESPACE}"><cont xmlns="urn:opendaylight:test:netconf:crud"><l>Modified Content</l></cont></data>
 
+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    <data xmlns="${ODL_NETCONF_NAMESPACE}"><cont xmlns="urn:opendaylight:test:netconf:crud"><l>Modified Content</l></cont></data>
+
+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    <data xmlns="${ODL_NETCONF_NAMESPACE}"><cont xmlns="urn:opendaylight:test:netconf:crud"><l>Another Modified Content</l></cont></data>
+
 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}'}