*** Settings ***
-Documentation Test for measuring execution time of MD-SAL DataStore operations.
+Documentation Test for measuring execution time of MD-SAL DataStore operations.
...
-... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test suite requires odl-restconf and odl-clustering-test-app modules.
-... The script cluster_rest_script.py is used for generating requests for
-... operations on people, car and car-people DataStore test models.
-... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
+... This test suite requires odl-restconf and odl-clustering-test-app modules.
+... The script cluster_rest_script.py is used for generating requests for
+... operations on people, car and car-people DataStore test models.
+... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
...
-... TODO: Decide whether keyword names should contain spaces or underscores.
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Library RequestsLibrary
-Library SSHLibrary
-Library XML
-Resource ../../../libraries/RemoteBash.robot
-Resource ../../../libraries/SetupUtils.robot
-Resource ../../../libraries/SSHKeywords.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/Utils.robot
-Variables ../../../variables/Variables.py
+... TODO: Decide whether keyword names should contain spaces or underscores.
+
+Library RequestsLibrary
+Library SSHLibrary
+Library XML
+Resource ../../../libraries/RemoteBash.robot
+Resource ../../../libraries/SetupUtils.robot
+Resource ../../../libraries/SSHKeywords.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/Utils.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
*** Variables ***
-${ITEM_COUNT} ${10000}
-${ITEM_BATCH} ${10000}
-${PROCEDURE_TIMEOUT} 11m
-${addcarcmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
-${addpeoplecmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
-${purchasecmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
-${carurl} /restconf/config/car:cars
-${peopleurl} /restconf/config/people:people
-${carpeopleurl} /restconf/config/car-people:car-people
-${CONTROLLER_LOG_LEVEL} INFO
-${TOOL_OPTIONS} ${EMPTY}
+${ITEM_COUNT} ${10000}
+${ITEM_BATCH} ${10000}
+${PROCEDURE_TIMEOUT} 11m
+${addcarcmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
+${addpeoplecmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
+${purchasecmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
+${carurl} /restconf/config/car:cars
+${peopleurl} /restconf/config/people:people
+${carpeopleurl} /restconf/config/car-people:car-people
+${CONTROLLER_LOG_LEVEL} INFO
+${TOOL_OPTIONS} ${EMPTY}
+
*** Test Cases ***
Add Cars
${rsp}= RequestsLibrary.Get Request session ${carpeopleurl}
Should Contain ${DELETED_STATUS_CODES} ${rsp.status_code}
+
*** Keywords ***
Start Suite
[Documentation] Suite setup keyword.
SetupUtils.Setup_Utils_For_Setup_And_Teardown
KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL}
- ${mininet_conn_id}= SSHLibrary.Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=6s
+ ${mininet_conn_id}= SSHLibrary.Open Connection
+ ... ${TOOLS_SYSTEM_IP}
+ ... prompt=${TOOLS_SYSTEM_PROMPT}
+ ... timeout=6s
Builtin.Set Suite Variable ${mininet_conn_id}
SSHKeywords.Flexible Mininet Login ${TOOLS_SYSTEM_USER}
SSHLibrary.Put File ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py .
RequestsLibrary.Delete All Sessions
Start_Tool
- [Arguments] ${command} ${tool_opt}
[Documentation] Start the tool ${command} ${tool_opt}
+ [Arguments] ${command} ${tool_opt}
BuiltIn.Log ${command}
${output}= SSHLibrary.Write ${command} ${tool_opt}
BuiltIn.Log ${output}
Wait_Until_Tool_Finish
- [Arguments] ${timeout}
[Documentation] Wait ${timeout} for the tool exit, return the printed output.
- BuiltIn.Run Keyword And Return BuiltIn.Wait Until Keyword Succeeds ${timeout} 1s SSHLibrary.Read Until Prompt
+ [Arguments] ${timeout}
+ BuiltIn.Run Keyword And Return
+ ... BuiltIn.Wait Until Keyword Succeeds
+ ... ${timeout}
+ ... 1s
+ ... SSHLibrary.Read Until Prompt
Purchase Is Completed
- [Arguments] ${item_count}
[Documentation] Check purchase of ${item_count} is completed.
+ [Arguments] ${item_count}
${rsp}= RequestsLibrary.Get Request session ${carpeopleurl} headers=${ACCEPT_XML}
${count}= XML.Get Element Count ${rsp.content} xpath=car-person
Should Be Equal As Numbers ${count} ${item_count}
BuiltIn.Log ${output}
Store_File_To_Workspace
- [Arguments] ${source_file_name} ${target_file_name}
[Documentation] Store the ${source_file_name} to the workspace as ${target_file_name}.
+ [Arguments] ${source_file_name} ${target_file_name}
${output_log}= SSHLibrary.Execute_Command cat ${source_file_name}
BuiltIn.Log ${output_log}
Create File ${target_file_name} ${output_log}