${WORKSPACE} /tmp
${BUNDLEFOLDER} distribution-karaf-0.3.0-SNAPSHOT
${AUTHN_CFG_FILE} ${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.aaa.authn.cfg
-${CONTROLLER_USER} ${MININET_USER}
*** Keywords ***
AAA Login
[Arguments] ${controller_ip}
[Documentation] Will disable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
- Login With Public Key ${CONTROLLER_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${ODL_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=false/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
[Arguments] ${controller_ip}
[Documentation] Will enable token based authentication. Currently, that is done with a config file change
SSHLibrary.Open Connection ${controller_ip}
- Login With Public Key ${CONTROLLER_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${ODL_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
${cmd}= Set Variable sed -i 's/^authEnabled=.*$/authEnabled=true/g' ${AUTHN_CFG_FILE}
SSHLibrary.Execute Command ${cmd}
SSHLibrary.Close Connection
${body} Replace String ${body} tcp:controller1:6633 tcp:${ODL_SYSTEM_1_IP}:6640
${body} Replace String ${body} tcp:controller2:6633 tcp:${ODL_SYSTEM_2_IP}:6640
${body} Replace String ${body} tcp:controller3:6633 tcp:${ODL_SYSTEM_3_IP}:6640
- ${body} Replace String ${body} 127.0.0.1 ${MININET}
+ ${body} Replace String ${body} 127.0.0.1 ${TOOLS_SYSTEM_IP}
${BRIDGE}= Set Variable If "${status}"=="AfterFail" br02 br01
Log ${BRIDGE}
${body} Replace String ${body} br01 ${BRIDGE}
[Return] ${output}
Check Karaf Log File Does Not Have Messages
- [Arguments] ${ip} ${message} ${user}=${CONTROLLER_USER} ${password}=${CONTROLLER_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
+ [Arguments] ${ip} ${message} ${user}=${ODL_SYSTEM_USER} ${password}=${CONTROLLER_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
[Documentation] Fails if the provided ${message} is found in the karaf.log file. Uses grep to search. The
... karaf.log file can be overridden with ${log_file} to be any file on the given system @ ${ip}
${output}= Run Command On Controller ${ip} grep -c '${message}' ${log_file} user=${user} password=${password} prompt=${prompt}
[Documentation] Start mininet with one switch and ${hosts} hosts
Log Starting mininet with one switch and ${hosts} hosts
Log To Console Starting mininet with one switch and ${hosts} hosts
- ${mininet_conn_id}= Open Connection ${MININET} prompt=${DEFAULT_LINUX_PROMPT} timeout=${hosts*3}
+ ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=${hosts*3}
Set Suite Variable ${mininet_conn_id}
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Write sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,1,${hosts} --switch ovsk,protocols=OpenFlow13
Read Until mininet>
[Arguments] ${switches}
[Documentation] Start mininet linear topology with ${switches} nodes
Log To Console Starting mininet linear ${switches}
- ${mininet_conn_id}= Open Connection ${MININET} prompt=${DEFAULT_LINUX_PROMPT} timeout=${switches*3}
+ ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=${switches*3}
Set Suite Variable ${mininet_conn_id}
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Write sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${switches} --switch ovsk,protocols=OpenFlow13
Read Until mininet>
Sleep 6
[Arguments] ${topology_file} ${switches} ${base_mac}=00:00:00:00:00:00 ${base_ip}=1.1.1.1 ${hosts}=0 ${mininet_start_time}=100
[Documentation] Start a custom mininet topology.
Log To Console Start a custom mininet topology with ${switches} nodes
- ${mininet_conn_id}= Open Connection ${MININET} prompt=${DEFAULT_LINUX_PROMPT} timeout=${mininet_start_time}
+ ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=${mininet_start_time}
Set Suite Variable ${mininet_conn_id}
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Write python ${topology_file} ${switches} ${hosts} ${base_mac} ${base_ip}
Read Until ${DEFAULT_LINUX_PROMPT}
Write sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --custom switch.py --topo demotopo --switch ovsk,protocols=OpenFlow13
... switch.mgmt_protocol, the connection open will be handled by the right robot
... library (Telnet or SSHLibrary). \ The connection_index is returned.
Run Keyword If "${switch.mgmt_protocol}" == "ssh" Call Method ${switch} set_ssh_key ${USER_HOME}/.ssh/${SSH_KEY}
- Run Keyword If "${switch.mgmt_protocol}" == "ssh" Call Method ${switch} set_mgmt_user ${MININET_USER}
+ Run Keyword If "${switch.mgmt_protocol}" == "ssh" Call Method ${switch} set_mgmt_user ${TOOLS_SYSTEM_USER}
${connection_index}= Run Keyword If "${switch.mgmt_protocol}" == "ssh" SSHLibrary.Open Connection ${switch.mgmt_ip} prompt=${switch.mgmt_prompt} timeout=30s
Run Keyword If "${switch.mgmt_protocol}" == "ssh" Login With Public Key ${switch.mgmt_user} ${switch.ssh_key} any
${connection_index}= Run Keyword If "${switch.mgmt_protocol}" == "telnet" Telnet.Open Connection ${switch.mgmt_ip}
*** Keywords ***
Start Suite
- [Arguments] ${system}=${MININET} ${user}=${MININET_USER} ${password}=${MININET_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${timeout}=30s
+ [Arguments] ${system}=${TOOLS_SYSTEM_IP} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${timeout}=30s
[Documentation] Basic setup/cleanup work that can be done safely before any system
... is run.
Log Start the test on the base edition
Read Until mininet>
Start Mininet
- [Arguments] ${system}=${MININET} ${cmd}=${start} ${custom}= ${user}=${MININET_USER} ${password}=${MININET_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT}
+ [Arguments] ${system}=${TOOLS_SYSTEM_IP} ${cmd}=${start} ${custom}= ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT}
... ${prompt_timeout}=30s
[Documentation] Basic setup to start mininet with custom topology
Log Start the test on the base edition
Run Command On Mininet ${system} sudo ps -elf | egrep 'usr/local/bin/mn' | egrep python | awk '{print "sudo kill -9",$4}' | sh
Clean Up Ovs
- [Arguments] ${system}=${MININET}
+ [Arguments] ${system}=${TOOLS_SYSTEM_IP}
[Documentation] Cleans up the OVS instance and remove any existing common known bridges.
${output}= Run Command On Mininet ${system} sudo ovs-vsctl list-br
Log ${output}
[Return] ${value}
Get Process ID Based On Regex On Remote System
- [Arguments] ${system} ${regex_string_to_match_on} ${user}=${MININET_USER} ${password}=${EMPTY} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s
+ [Arguments] ${system} ${regex_string_to_match_on} ${user}=${TOOLS_SYSTEM_USER} ${password}=${EMPTY} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s
[Documentation] Uses ps to find a process that matches the supplied regex. Returns the PID of that process
... The ${regex_string_to_match_on} should produce a unique process otherwise the PID returned may not be
... the expected PID
[Return] ${pid}
Get Process Thread Count On Remote System
- [Arguments] ${system} ${pid} ${user}=${MININET_USER} ${password}=${EMPTY} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s
+ [Arguments] ${system} ${pid} ${user}=${TOOLS_SYSTEM_USER} ${password}=${EMPTY} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s
[Documentation] Executes the ps command to retrieve the lightweight process (aka thread) count.
${cmd}= Set Variable ps --no-headers -o nlwp ${pid}
${output}= Run Command On Remote System ${system} ${cmd} user=${user} password=${password} prompt=${prompt}
BuiltIn.Run Keyword And Return Run Command On Remote System ${system} ${cmd} ${user} ${password} prompt=${prompt}
Verify File Exists On Remote System
- [Arguments] ${system} ${file} ${user}=${MININET_USER} ${password}=${MININET_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=5s
+ [Arguments] ${system} ${file} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=5s
[Documentation] Will create connection with public key and will PASS if the given ${file} exists,
... otherwise will FAIL
${conn_id}= Open Connection ${system} prompt=${prompt} timeout=${prompt_timeout}
[Documentation] Download the VTN Coordinator from Controller VM
Log Download the VTN Coordinator bz2 file
SSHLibrary.Open_Connection ${ODL_SYSTEM_IP}
- SSHLibrary.Login_With_Public_Key ${CONTROLLER_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ SSHLibrary.Login_With_Public_Key ${ODL_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
${VTNC_FILENAME}= Catenate SEPARATOR=/ ${WORKSPACE} vtn_coordinator.tar.bz2
SSHLibrary.Get_File ${WORKSPACE}/${BUNDLEFOLDER}/externalapps/*vtn-coordinator*-bin.tar.bz2 ${VTNC_FILENAME}
SSHLibrary.Close_Connection
- SSHLibrary.Open_Connection ${MININET}
- SSHLibrary.Login_With_Public_Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP}
+ SSHLibrary.Login_With_Public_Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
SSHLibrary.Put_File ${VTNC_FILENAME} /tmp
SSHLibrary.Close_Connection
#Get VtnCo
${vtnc_conn_id}= SSHLibrary.Open Connection ${ODL_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
Set Suite Variable ${vtnc_conn_id}
- SSHLibrary.Login_With_Public_Key ${CONTROLLER_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ SSHLibrary.Login_With_Public_Key ${ODL_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
SSHLibrary.Execute Command sudo mkdir -p /usr/local/vtn
SSHLibrary.Execute Command sudo chown jenkins /usr/local/vtn
SSHLibrary.Execute Command sudo yum install -q -y http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
Start vlan_topo
[Documentation] This will start mininet with custom topology on both the Virtual Machines
- Start Mininet ${MININET} ${vlan_topo} ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH}
+ Start Mininet ${TOOLS_SYSTEM_IP} ${vlan_topo} ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH}
Delete a FLOWLIST
[Arguments] ${flowlistname}
Start PathSuiteVtnMaTest
[Documentation] Start VTN Manager Test Suite and Mininet
Start SuiteVtnMaTest
- Start Mininet ${MININET} ${pathpolicy_topo_13} ${custom}
+ Start Mininet ${TOOLS_SYSTEM_IP} ${pathpolicy_topo_13} ${custom}
Start PathSuiteVtnMaTestOF10
[Documentation] Start VTN Manager Test Suite and Mininet in Open Flow 10 Specification
Start SuiteVtnMaTest
- Start Mininet ${MININET} ${pathpolicy_topo_10} ${custom}
+ Start Mininet ${TOOLS_SYSTEM_IP} ${pathpolicy_topo_10} ${custom}
Stop PathSuiteVtnMaTest
[Documentation] Cleanup/Shutdown work at the completion of all tests.
[Arguments] ${OF}
[Documentation] Create custom topology for vlan functionality
Clean Mininet System
- ${mininet_conn_id1}= Open Connection ${MININET} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
+ ${mininet_conn_id1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
Set Suite Variable ${mininet_conn_id1}
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Execute Command sudo ovs-vsctl set-manager ptcp:6644
Put File ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH}
Run Keyword If '${OF}' == 'OF13' Write ${vlan_topo_13}
Start PathSuiteVtnMaTest
[Documentation] Start VTN Manager Test Suite and Mininet
Start SuiteVtnMaTest
- Start Mininet ${MININET} ${pathpolicy_topo_13} ${custom}
+ Start Mininet ${TOOLS_SYSTEM_IP} ${pathpolicy_topo_13} ${custom}
Start PathSuiteVtnMaTestOF10
[Documentation] Start VTN Manager Test Suite and Mininet in Open Flow 10 Specification
Start SuiteVtnMaTest
- Start Mininet ${MININET} ${pathpolicy_topo_10} ${custom}
+ Start Mininet ${TOOLS_SYSTEM_IP} ${pathpolicy_topo_10} ${custom}
Stop PathSuiteVtnMaTest
[Documentation] Cleanup/Shutdown work at the completion of all tests.
Start vlan_topo
[Arguments] ${OF}
Clean Mininet System
- ${mininet_conn_id1}= Open Connection ${MININET} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
+ ${mininet_conn_id1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
Set Suite Variable ${mininet_conn_id1}
- Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
+ Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Execute Command sudo ovs-vsctl set-manager ptcp:6644
Put File ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH}
Run Keyword If '${OF}' == 'OF13' Write ${vlan_topo_13}