Use larger juniper schema in max device scale test 17/87517/18
authorJamo Luhrsen <jluhrsen@gmail.com>
Sat, 8 Feb 2020 00:47:17 +0000 (16:47 -0800)
committerJamo Luhrsen <jluhrsen@gmail.com>
Wed, 19 Feb 2020 16:31:34 +0000 (08:31 -0800)
Change-Id: Iebb059c5edc0090cb6230573961590bf4c5ac9a1
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
csit/libraries/NetconfKeywords.robot
csit/suites/netconf/scale/max_devices.robot

index 455d36e2d51f9e21ad27420434cac2c74f426ba0..3a4abd0c9b7543d345b2fe21174be85f1a84aa50 100644 (file)
@@ -24,7 +24,8 @@ Resource          Utils.robot
 Resource          RemoteBash.robot
 
 *** Variables ***
-${TESTTOOL_DEFAULT_JAVA_OPTIONS}    -Xmx1G
+${MAX_HEAP}       1G
+${TESTTOOL_DEFAULT_JAVA_OPTIONS}    -Xmx${MAX_HEAP}
 ${DIRECTORY_WITH_DEVICE_TEMPLATES}    ${CURDIR}/../variables/netconf/device
 ${FIRST_TESTTOOL_PORT}    17830
 ${BASE_NETCONF_DEVICE_PORT}    17830
@@ -139,6 +140,7 @@ NetconfKeywords__Deploy_Additional_Schemas
     # directory from the point of view of the process running on that
     # machine.
     SSHLibrary.Put_Directory    ${schemas}    destination=./schemas
+    SSHLibrary.List_Directory    ./schemas
     [Return]    --schemas-dir ./schemas
 
 NetconfKeywords__Deploy_Custom_RPC
index a17826f41f75038f77c42a71eb11aa7c9fdece78..07d066dfb43d9e49b40332ee7857cb48258d5c65 100644 (file)
@@ -31,7 +31,7 @@ ${DEVICE_NAME_BASE}    netconf-scaling-device
 ${DEVICE_TYPE}    full-uri-device
 ${BASE_PORT}      17830
 ${NUM_WORKERS}    10
-${TIMEOUT_FACTOR}    5
+${TIMEOUT_FACTOR}    2
 ${DEVICES_RESULT_FILE}    devices.csv
 ${INSTALL_TESTTOOL}    True
 ${TESTTOOL_EXECUTABLE}    ${EMPTY}
@@ -45,12 +45,14 @@ Find Max Netconf Devices
     ${start} =    BuiltIn.Convert to Integer    ${INIT_DEVICE_COUNT}
     ${stop} =    BuiltIn.Convert to Integer    ${MAX_DEVICE_COUNT}
     ${increment} =    BuiltIn.Convert to Integer    ${DEVICE_INCREMENT}
+    ${schema_dir} =    Run Keyword If    "${SCHEMA_MODEL}" == "juniper"    Get Juniper Device Schemas
+    ...    ELSE    Set Variable    none
     Run Keyword And Ignore Error    CheckJVMResource.Get JVM Memory
     FOR    ${devices}    IN RANGE    ${start}    ${stop+1}    ${increment}
         ${timeout} =    BuiltIn.Evaluate    ${devices}*${TIMEOUT_FACTOR}
         Log To Console    Starting Iteration with ${devices} devices
-        Run Keyword If    "${INSTALL_TESTTOOL}"=="True"    NetconfKeywords.Install_And_Start_Testtool    device-count=${devices}
-        ...    ELSE    NetconfKeywords.Start_Testtool    ${TESTTOOL_EXECUTABLE}    device-count=${devices}
+        Run Keyword If    "${INSTALL_TESTTOOL}"=="True"    NetconfKeywords.Install_And_Start_Testtool    debug=false    schemas=${schema_dir}    device-count=${devices}
+        ...    ELSE    NetconfKeywords.Start_Testtool    ${TESTTOOL_EXECUTABLE}    debug=false    schemas=${schema_dir}    device-count=${devices}
         ${status}    ${result} =    Run Keyword And Ignore Error    NetconfKeywords.Perform_Operation_On_Each_Device    Configure_Device    timeout=${timeout}
         Exit For Loop If    '${status}' == 'FAIL'
         ${status}    ${result} =    Run Keyword And Ignore Error    NetconfKeywords.Perform_Operation_On_Each_Device    Wait_Connected    timeout=${timeout}
@@ -154,3 +156,11 @@ Check_Device_Deconfigured
     KarafKeywords.Log_Message_To_Controller_Karaf    Waiting for device ${current_name} to disappear
     NetconfKeywords.Wait_Device_Fully_Removed    ${current_name}    period=0.5s    timeout=120s
     KarafKeywords.Log_Message_To_Controller_Karaf    Device ${current_name} removed
+
+Get Juniper Device Schemas
+    OperatingSystem.Run    git clone https://github.com/Juniper/yang.git
+    OperatingSystem.Run    mkdir /tmp/junos_19.4R1
+    OperatingSystem.Run    find yang/19.4/19.4R1/junos -type f -name '*yang' -exec cp {} /tmp/junos_19.4R1/ \\;
+    OperatingSystem.Run    cp yang/19.4/19.4R1/common/* /tmp/junos_19.4R1/
+    OperatingSystem.List Directory    /tmp/junos_19.4R1/
+    [Return]    /tmp/junos_19.4R1