2 Documentation A test suite which contains keywords of ODL micro which are used commonly.
5 Library OperatingSystem
10 Library RequestsLibrary
15 [Documentation] Create SSH Connection and deploy odl micro
16 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=ODL_System
17 SSHLibrary.Set_Client_Configuration timeout=10s
18 SSHLibrary.Set_Client_Configuration prompt=${ODL_SYSTEM_PROMPT}
19 SSHKeywords.Flexible_SSH_Login ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD} delay=4s
20 ${file_name} = NexusKeywords.Deploy_Test_Tool
25 ... build_version=${ODL_MICRO_VERSION}
26 ... build_location=org/opendaylight/odlmicro
27 BuiltIn.Set_Suite_Variable ${FILENAME} ${filename}
30 [Documentation] Run ODL Micro
31 SSHLibrary.Switch_Connection ODL_System
32 SSHLibrary.Write tar -xvf ${FILE_NAME} -C ${ODL_MICRO_WORKSPACE}/
33 SSHLibrary.Write cd ${ODL_MICRO_WORKSPACE}/micro-netconf-${ODL_MICRO_VERSION}
34 ${response} = SSHLibrary.Execute_Command ls
35 BuiltIn.Log ${response}
36 ${command} = NexusKeywords.Compose_Full_Java_Command
37 ... -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dcom.sun.management.jmxremote -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom -cp "etc/initial/:lib/*" org.opendaylight.netconf.micro.NetconfMain > /tmp/odlmicro.log 2>&1
38 BuiltIn.Log ${command}
39 SSHLibrary.Write ${command}
42 [Arguments] ${process_name}
43 ${pid} = SSHLibrary.Execute Command
44 ... ps -fu ${ODL_SYSTEM_USER} | grep "${process_name}" | grep -v "grep" | awk '{print $2}'
48 [Arguments] ${portno} ${session}=ODL_Micro_instance
49 SSHLibrary.Switch_Connection ${session}
50 SSHLibrary.Write netstat -tunpl
51 SSHLibrary.Read Until Regexp .*${portno}
54 [Arguments] ${process_name}
55 SSHLibrary.Open_Connection ${ODL_SYSTEM_IP} alias=ODL_Micro_instance
56 SSHLibrary.Set_Client_Configuration timeout=10s
57 SSHLibrary.Set_Client_Configuration prompt=${ODL_SYSTEM_PROMPT}
58 SSHKeywords.Flexible_SSH_Login ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD} delay=4s
59 ${mock_pid} = Get pid ${process_name}
60 IF '${mock_pid}' == '${EMPTY}'
61 BuiltIn.Fail No ${process_name} process is running
65 [Arguments] ${process_name} ${ssh_alias}=ODL_Micro_instance
66 SSHLibrary.Switch_Connection ${ssh_alias}
67 ${mock_pid} = Get pid ${process_name}
68 SSHLibrary.Execute_Command kill -9 ${mock_pid}
70 Download Netconf Testtool
71 [Documentation] Download netconf testtool from opendaylight nexus
72 SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP} alias=Netconf_System
73 SSHLibrary.Set_Client_Configuration timeout=10s
74 SSHLibrary.Set_Client_Configuration prompt=${TOOLS_SYSTEM_PROMPT}
75 SSHKeywords.Flexible_SSH_Login ${TOOLS_SYSTEM_USER} ${TOOLS_SYSTEM_PASSWORD} delay=4s
76 ${file_name} = NexusKeywords.Deploy_Test_Tool
79 ... build_version=${NETCONF_TESTTOOL_VERSION}
80 ... build_location=org/opendaylight/netconf
81 Set Global Variable ${NETCONF_FILENAME} ${filename}
82 ${file_name} = NexusKeywords.Deploy_Test_Tool
86 ... build_version=${NETCONF_TESTTOOL_VERSION}
87 ... build_location=org/opendaylight/netconf
88 Set Global Variable ${RESTPERF_FILENAME} ${filename}
91 [Arguments] ${ssh_alias}=Netconf_System
92 NetconfKeywords.Start_Testtool
93 ... ${NETCONF_FILENAME}
95 ... schemas=${CURDIR}/../variables/netconf/CRUD/schemas