Library String
Library SSHLibrary timeout=10s
Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
Resource ${CURDIR}/../../../libraries/NetconfKeywords.robot
Resource ${CURDIR}/../../../libraries/SetupUtils.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
${NODE_CONFIGURER} node1
${NODE_SETTER} node2
${NODE_CHECKER} node3
-${DEVICE_CHECK_TIMEOUT} 60s
+${DEVICE_CHECK_TIMEOUT} 10s
${DEVICE_NAME} netconf-test-device
${directory_with_template_folders} ${CURDIR}/../../../variables/netconf/CRUD
${empty_data} <data xmlns="${ODL_NETCONF_NAMESPACE}"></data>
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
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
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
*** Keywords ***
Setup_Everything
- [Documentation] Setup everything needed for the test cases.
+ [Documentation] Initialize SetupUtils, setup everything needed for the test cases.
# Setup resources used by the suite.
SetupUtils.Setup_Utils_For_Setup_And_Teardown
NetconfKeywords.Setup_Netconf_Keywords create_session_for_templated_requests=False
Check_Config_Data
[Arguments] ${node} ${expected} ${contains}=False
- ${url}= Builtin.Set_Variable ${CONFIG_API}/network-topology:network-topology/topology/topology-netconf/node/${DEVICE_NAME}/yang-ext:mount
+ ${url}= Builtin.Set_Variable ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
${data}= TemplatedRequests.Get_As_Xml_From_Uri ${url} session=${node}
BuiltIn.Run_Keyword_Unless ${contains} BuiltIn.Should_Be_Equal_As_Strings ${data} ${expected}
BuiltIn.Run_Keyword_If ${contains} BuiltIn.Should_Contain ${data} ${expected}