Table of Contents
Genius CSIT requires very minimal testbed topology, and it is very easy to run the same on your laptop, with the below steps. This will help you run tests yourself on the code changes you are making in genius locally, without the need for waiting in jenkins job queue for long.
Test setup consists of ODL with odl-genius-rest feature installed and two switches (DPNs) connected to ODL over OVSDB and OpenflowPlugin channels.
This setup uses the default Genius test topology.
+--------+ +--------+ | BR1 | data | BR2 | | <-------> | +---^----+ +----^---+ | mgmt | +---v-----------------v---+ | | | ODL | | | | odl-genius | | | +-------------------------+
ODL running on a VM or laptop[usual specifications for running ODL, min 2CPU+4GB RAM]
Two VMs with OVS [2.4 or higher] installed. [1CPU+1GB RAM]
Robotframework which can co-exist with any of the above VMs(provided it has connectivity to all the above entities).
We can run ODL on laptop, and OVS on two VMs. RobotFramework can be installed on of the two OVS VMs. The documentation is based on ubuntu Desktop VMs, which were started using virtual box.
Pick up any ODL stable distribution or build it yourself
In the karaf prompt, install the genius feature feature:install odl-genius-rest
Most of the genius developers already know this. Just for completion sake, on both the VMs, OVS has to be installed.
sudo apt-get install openvswitch-switch
service openvswitch-switch start
You can type “ovs-vsctl show” command to check if ovs is running as expected.
Make sure that the output of the above command should show different unique node UUIDs for OVS. If not, genius CSIT will have trouble creating ITM tunnels.[This is likely to happen, if you clone the first VM to run the second OVS]
Please refer to the script below for the latest uptodate requirement versions supported, the script also has more information on how to setup the robot environment.
Below are the requirements for running genius CSIT.
Install Python 2.7
Install ride tool and required libraries: sudo pip install robotframework-ride sudo pip install robotframework-requests sudo pip install robotframework-sshlibrary sudo pip install –upgrade robotframework-httplibrary sudo pip install jmespath
To start ride : ride.py <test suite name> To open genius test suite, opendaylight integration/test repo needs to be cloned. git clone https://<your_username>@git.opendaylight.org/gerrit/p/integration/test.git ride.py test/csit/suites/genius [Same can be imported after RIDE opens up, if you don’t want to specify the path in the prompt]
In the RIDE window that opens up, Genius test suite will be imported now
Click on the Run panel, and Click Start, by passing below arguments -v ODL_SYSTEM_IP:<ODL_IP> -v TOOLS_SYSTEM_IP:<OVS1_IP> -v TOOLS_SYSTEM_2_IP:<OVS2_IP> -v USER_HOME:<HOME_FOLDER> -v TOOLS_SYSTEM_USER:<USER NAME> -v DEFAULT_USER:<USER NAME> -v DEFAULT_LINUX_PROMPT:<LINUX PROMPT> -v ODL_SYSTEM_USER:<ODL USER NAME> -v ODL_SYSTEM_PROMPT:<ODL PROMPT> -v ODL_STREAM:<ODL STREAM> -v ODL_SYSTEM_1_IP:<ODL1_IP> -v KARAF_HOME:<KARAF-HOME-FOLDER> Any arguments defined in Variables.py can be overriden, by passing the argument value like above. For eg:, there was a recent change in karaf prompt, in that case we could run genius csit by passing argument “-v KARAF_PROMPT:karaf@root”