Adjust XML output for empty device configuration
[integration/test.git] / csit / suites / netconf / CRUD / CRUD.robot
index 4f4347227e1b66146092d9fe2cc8a61386e43121..d37738dcf7a82a28ade08b71e530c74cc4db3e6c 100644 (file)
@@ -24,6 +24,7 @@ Library           RequestsLibrary
 Library           OperatingSystem
 Library           String
 Library           SSHLibrary    timeout=10s
+Resource          ${CURDIR}/../../../libraries/CompareStream.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/NetconfKeywords.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
@@ -63,7 +64,8 @@ Wait_For_Device_To_Become_Connected
 
 Check_Device_Data_Is_Empty
     [Documentation]    Get the device data and make sure it is empty.
-    Check_Config_Data    <data xmlns="${ODL_NETCONF_NAMESPACE}"></data>
+    Run_Keyword_If_Less_Than_Neon    Check_Config_Data    <data xmlns\="${ODL_NETCONF_NAMESPACE}"></data>
+    Run_Keyword_If_At_Least_Neon    Check_Config_Data    <data xmlns\="${ODL_NETCONF_NAMESPACE}"/>
 
 Create_Device_Data_Label_Via_Xml
     [Documentation]    Send a sample test data label into the device and check that the request went OK.
@@ -194,7 +196,8 @@ Delete_Device_Data
 
 Check_Device_Data_Is_Deleted
     [Documentation]    Get the device data and make sure it is empty again.
-    Check_Config_Data    <data xmlns="${ODL_NETCONF_NAMESPACE}"></data>
+    Run_Keyword_If_Less_Than_Neon    Check_Config_Data    <data xmlns\="${ODL_NETCONF_NAMESPACE}"></data>
+    Run_Keyword_If_At_Least_Neon    Check_Config_Data    <data xmlns\="${ODL_NETCONF_NAMESPACE}"/>
 
 Deconfigure_Device_From_Netconf
     [Documentation]    Make request to deconfigure the testtool device on Netconf connector.