Fix wrong mapping type for templated requests in netconf
[integration/test.git] / csit / suites / netconf / restperfclient / performance.robot
index bd40d647912a24ee7578c8932d24031ae3a8b642..3ec646a4d9234cd0caa01cc7f6db3c2d73838d11 100644 (file)
@@ -1,13 +1,13 @@
 *** Settings ***
 Documentation     netconf-restperfclient Update performance test suite.
-...           
+...
 ...               Copyright (c) 2016 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
-...           
-...           
+...
+...
 ...               Perform given count of update operations on device data mounted onto a
 ...               netconf connector (using the netconf-testtool-restperfclient tool) and
 ...               see how much time it took. More exactly, it sends the data to a restconf
@@ -44,7 +44,8 @@ Start_Testtool
     [Documentation]    Deploy and start test tool, then wait for all its devices to become online.
     # Start test tool
     SSHLibrary.Switch_Connection    ${testtool}
-    NetconfKeywords.Install_And_Start_Testtool    device-count=1    schemas=${CURDIR}/../../../variables/netconf/CRUD/schemas    debug=false
+    Run Keyword If    '${IS_KARAF_APPL}' == 'True'    NetconfKeywords.Install_And_Start_Testtool    device-count=1    schemas=${CURDIR}/../../../variables/netconf/CRUD/schemas    debug=false
+    ...    ELSE    NetconfKeywords.Start_Testtool    ${NETCONF_FILENAME}    device-count=1    schemas=${CURDIR}/../../../variables/netconf/CRUD/schemas    debug=false
 
 Configure_Device_On_Netconf
     [Documentation]    Configure the testtool device on Netconf connector.
@@ -56,7 +57,7 @@ Wait_For_Device_To_Become_Connected
 
 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_crud_templates}${/}cars    ${template_as_string}
 
 Run_Restperfclient
@@ -91,7 +92,8 @@ Setup_Everything
     # Setup resources used by the suite.
     SetupUtils.Setup_Utils_For_Setup_And_Teardown
     NetconfKeywords.Setup_Netconf_Keywords
-    RestPerfClient.Setup_Restperfclient
+    Run Keyword If    '${IS_KARAF_APPL}' == 'False'    RestPerfClient.Setup_Restperfclient    build_version=${NETCONF_TESTTOOL_VERSION}    build_location=org/opendaylight/netconf
+    ...    ELSE    RestPerfClient.Setup_Restperfclient
     # Connect to the tools system (testtool)
     ${testtool}=    SSHKeywords.Open_Connection_To_Tools_System
     BuiltIn.Set_Suite_Variable    ${testtool}    ${testtool}