${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}
${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}
- \ ${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}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error Issue_Requests_On_Devices ${TOOLS_SYSTEM_IP} ${devices}
- \ ... ${NUM_WORKERS}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Deconfigure_Device timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Check_Device_Deconfigured timeout=${timeout}
- \ Exit For Loop If '${status}' == 'FAIL'
- \ ${maximum_devices} = Set Variable ${devices}
- \ Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
- \ NetconfKeywords.Stop_Testtool
+ 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 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} log_response=False
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error Issue_Requests_On_Devices ${TOOLS_SYSTEM_IP} ${devices}
+ ... ${NUM_WORKERS}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Wait_Connected timeout=${timeout} log_response=False
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Deconfigure_Device timeout=${timeout}
+ Exit For Loop If '${status}' == 'FAIL'
+ ${status} ${result} = Run Keyword And Ignore Error NetconfKeywords.Perform_Operation_On_Each_Device Check_Device_Deconfigured timeout=${timeout} log_response=False
+ Exit For Loop If '${status}' == 'FAIL'
+ ${maximum_devices} = Set Variable ${devices}
+ Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
+ NetconfKeywords.Stop_Testtool
+ END
[Teardown] Run Keywords NetconfKeywords.Stop_Testtool
... AND Collect_Data_Points ${maximum_devices}
... AND Run Keyword And Ignore Error CheckJVMResource.Get JVM Memory
SSHLibrary.Open_Connection ${client_ip}
SSHKeywords.Flexible_Mininet_Login
SSHLibrary.Write python getter.py --odladdress=${ODL_SYSTEM_IP} --count=${expected_count} --name=${device_name_base} --workers=${worker_count}
- : FOR ${number} IN RANGE 1 ${expected_count}+1
- \ Read_Python_Tool_Operation_Result ${number}
+ FOR ${number} IN RANGE 1 ${expected_count}+1
+ Read_Python_Tool_Operation_Result ${number}
+ END
SSHLibrary.Read_Until_Prompt
SSHLibrary.Close_Connection
SSHKeywords.Restore Current SSH Connection From Index ${current_ssh_connection.index}
NetconfKeywords.Stop_Testtool
Configure_Device
- [Arguments] ${current_name}
+ [Arguments] ${current_name} ${log_response}=True
[Documentation] Operation for configuring the device.
KarafKeywords.Log_Message_To_Controller_Karaf Configuring device ${current_name} to Netconf
NetconfKeywords.Configure_Device_In_Netconf ${current_name} device_type=${device_type} device_port=${current_port}
KarafKeywords.Log_Message_To_Controller_Karaf Device ${current_name} configured
Wait_Connected
- [Arguments] ${current_name}
+ [Arguments] ${current_name} ${log_response}=True
[Documentation] Operation for waiting until the device is connected.
KarafKeywords.Log_Message_To_Controller_Karaf Waiting for device ${current_name} to connect
- NetconfKeywords.Wait_Device_Connected ${current_name} period=0.5s timeout=120s
+ NetconfKeywords.Wait_Device_Connected ${current_name} period=0.5s timeout=120s log_response=${log_response}
KarafKeywords.Log_Message_To_Controller_Karaf Device ${current_name} connected
Read_Python_Tool_Operation_Result
BuiltIn.Should_Be_Equal_As_Strings ${data} ${expected}
Deconfigure_Device
- [Arguments] ${current_name}
+ [Arguments] ${current_name} ${log_response}=True
[Documentation] Operation for deconfiguring the device.
KarafKeywords.Log_Message_To_Controller_Karaf Deconfiguring device ${current_name}
NetconfKeywords.Remove_Device_From_Netconf ${current_name}
KarafKeywords.Log_Message_To_Controller_Karaf Device ${current_name} deconfigured
Check_Device_Deconfigured
- [Arguments] ${current_name}
+ [Arguments] ${current_name} ${log_response}=True
[Documentation] Operation for making sure the device is really 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
+ NetconfKeywords.Wait_Device_Fully_Removed ${current_name} period=0.5s timeout=120s log_response=${log_response}
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