commit | 1f39bf0943ea0cc35891931a55a815dbcc206ab0 | [log] [tgz] |
---|---|---|
author | Jeremy Songster <jeremy@onlab.us> | Wed Jan 20 17:17:25 2016 -0800 |
committer | Jeremy Songster <jeremy@onlab.us> | Tue Jan 26 12:41:05 2016 -0800 |
tree | e201dc543f76740c1b2970b5c53519f5fc206670 | |
parent | 9288fdd7e18d6d46681702c19ebd97f58a4db360 [diff] |
ONOS-3343 Initial scapy implementation commit scapy host discovery and re-ordering of setup cases scapy checkConnection dependency function to check connection with specified packets from given sender(s) to given recipient(s). CASE3000 now uses checkConnection to test one way single to multi point intents. CASE 3000 scapy implementation complete CASE 4000, 5000, 1000 scapy implementation and breakup of dependency functions Change-Id: I9fc277d0e5ba5dd50246f7fc1be76c15566d796c Finished Implementation of Scapy within FUNCintent Refactored FUNCintent for clarity and sense -Now uses dictionaries instead of lists for function params -separated installing and testing intents into distinct functions -merged non-host intent testing into one function called testPointIntent Change-Id: I8ffbe6dcc00994e3b40c9ba0fe7e4188bb2019f7
TestON is the testing platform that all the ONOS tests are being run on currently.
At ON.Lab, we have adopted the Mininet Python style for our drivers and testcases. The one exception is that TestON does not correctly parse multiline comments in testcases when the ending triple double quotes are on the same line as the comment. Therefore, in the testcases, the ending triple double quotes must be on it's own line.
Pull the git repo from https://github.com/OPENNETWORKINGLAB/OnosSystemTest.git
$ git clone https://github.com/OPENNETWORKINGLAB/OnosSystemTest.git
Make a symbolic link for TestON on the HOMEDIR Execute the following from the home directory
$ ln -s OnosSystemTest/TestON TestON
Make sure python path is correct
$ export PYTHONPATH={PATH TO HOMEDIR}/TestON/
$ echo $PYTHONPATH
ONOS
Mininet - Some driver functions rely on a modified version of Mininet. These functions are noted in the mininet driver file. To checkout this branch from your Mininet folder:
$ git remote add jhall11 https://github.com/jhall11/mininet.git
$ git fetch jhall11
$ git checkout -b dynamic_topo remotes/jhall11/dynamic_topo
$ git pull
Note that you may need to run 'sudo make develop' if your mnexec.c file changed when switching branches.
Install python packages configObj and pexpect (Note: pexpect 3.3 has a known bug. We recommend using version 3.2 for now). They can be installed as :
$ sudo pip install configObj
$ sudo pip install pexpect==3.2
$ sudo pip install numpy
Linc-OE - Some testcases use this to emulate optical devices
Requirements:
$ sudo apt-get install erlang
$ sudo apt-get install libpcap-dev
Building and Running:
$ git clone https://github.com/shivarammysore/LINC-Switch.git linc-oe
$ cd linc-oe
$ git checkout tags/oe-0.3
$ cp rel/files/sys.config.orig rel/files/sys.config
$ make rel
Config file at TestON/config/teston.cfg
Change the file paths to the appropriate paths
The .topo file for each test
Must change the IPs/login/etc to point to the nodes you want to run on
TestON must be ran from its bin directory
$ cd TestON/bin
Launch cli
$ ./cli.py
Run the test
teston> run PingallExample
The tests are all located it TestON/tests/ Each test has its own folder with the following files:
.ospk file
This is written in Openspeak, a word based language developed by Paxterra.
It defines the cases and sequence of events for the test
.py file
This file serves the same exact function as the openspeak file.
It will only be used if there is NO .ospk file, so if you like python, delete or rename the .ospk file
.topo file
This defines all the components that TestON creates for that test and includes data such as IP address, login info, and device drivers
The Components must be defined in this file to be uesd in the openspeak or python files.
.params file
Defines all the test-specific variables that are used by the test.
NOTE: The variable testcases
which defines which testcases run when the test is ran.
Here are a few things to check if it doesn't work
Double check the topo file for that specific test the nodes must be able to run that specific component ( Mininet IP -> machine with mn installed)
Enable passwordless logins between your nodes and the TestON node.