commit | 5360d036e3a5c515cd8ed5c81dac2afa37ab305d | [log] [tgz] |
---|---|---|
author | Zsolt Haraszti <zharaszt@ciena.com> | Wed Mar 02 23:02:09 2016 -0800 |
committer | Zsolt Haraszti <zharaszt@ciena.com> | Mon Mar 07 15:56:15 2016 -0800 |
tree | 3a8e6a1e4b80753f6403cd4c81f545613e1328b5 | |
parent | 5b8b39c6f6c6d754d52e04342a11df13cadff564 [diff] |
Completed 2nd complex testcase with 2 ONUs For details of the two completed scenarios, please read the Python file (see class doc strings). Change-Id: I84edc5c26be3816e9b670a5c97feb072286f0070 Use flow_delete_strict and fake dataplane mode Two changes in this request: 1. I noticed that the installEapolRule() method in install=False mode uses the flow_delete message instead of the flow_delete_strict. However, the way the message is constructed, this should never have the intended effect, because the out_port is left to 0. Per the OpenFlow spec, this will match only flows that has the output action pointing to port 0. The flow_delete would work only if out_port is set to OFPP_ANY (4294967295). Alternatively, the flow_delete_strict should be used, in which case the out_port attribute is ignored. I decided that the latter makes more sense in this use-case. 2. Introduced a "fake-dataplane" mode in which mode all verify_packet and verify_packet_in calls automatically pass. This allows the tests to manage flows and groups on an OF agent, without actually testing packet forwarding, which is useful if the goal is to review what flow command the OLT use-case rely on. Change-Id: I3d39953c39d39a386802c44c5a84aac7560f9c09 Create a pair of isolated Eapol tests These are extracts from the complex usecase. They differ from the olt.py Eapol out/in tests in that they really target the ONU port and not all ports, hence they are more realistic. The main reason I created them is that on the Tibit OLT Eapol forwarding is not setup on the OLT port, only on the ONU ports. This is correct behavior but the original tests would fail with it. Change-Id: I340c5798c806277ce51b758b6a35f5c9b560a91e
OFTest suite for PMC OLT
Small suite of tests that describe the behaviour needed from the OLT for CORD.
This is based on the OFTest framework. See here for details on OFTest, including prerequisites and steps to set up: https://github.com/floodlight/oftest
Firstly make sure the prerequisites for OFTest are installed - Python and Scapy.
Clone both the OFTest repository and this repository side-by-side. You can find oftest at https://github.com/floodlight/oftest.
You'll need to connect the OLT port and one of the ONU ports connected to interfaces on the server - for example, ONU port 1 to eth1 on the server, and OLT port 129 to eth2 on the server.
Then you can run the tests as follows:
sudo oftest/oft --test-dir=olt-oftest/ -i 1@eth1 -i 129@eth2 --port 6633 -V 1.3
Most forwarding tests use 1 ONU port, and some multicast tests use 2 ONU ports. By default the tests use ONU ports 1 and 2, and OLT port 129. If you need to change the port numbers used by the tests, you can set them using test-params.
For example, to use the ONU ports 130 and 131, and OLT port 258, the following command can be used:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 130@h1-eth0 -i 131@h2-eth0 -i 258@h129-eth0 --port 6633 -V 1.3 --test-params="onu_port=130;onu_port2=131;olt_port:258;"
The port numbers must be set correctly in the -i arguments which are local interface connected to hardware ports, and in the --test-params argument.
We've also provided a Mininet topology that runs an OVS instance with port 1 and port 129 so we can run the tests and verify the correct behaviour without using the OLT. The OVS switch stands in for the OLT in the test framework.
First install Mininet and its dependencies.
Then start the switch:
sudo olt-oftest/olt-topo.py
Now you can run the tests on the OVS switch using:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 1@h1-eth0 -i 129@h129-eth0 --port 6633 -V 1.3
The above script can be used to start a mininet topology using the CPqD reference soft switch. CPqD can be installed with the Mininet installer using the following mode of the install script:
git clone git://github.com/mininet/mininet ./mininet/utils/install.sh -n3fxw
For further information on how to install CPqD, please refer to, e.g., https://github.com/CPqD/ofsoftswitch13/wiki/OpenFlow-1.3-Tutorial
Once CPqD and mininet are installed, start the topology using:
sudo ./olt-oftest/olt-topo.py -u
Now you can run the tests on the switch using:
sudo ./oftest/oft --test-dir=olt-oftest/ -i 1@h1-eth0 -i 2@h2-eth0 -i 3@h129-eth0 --port 6633 -V 1.3 \ -t "onu_port=1;onu_port2=2;olt_port=3;device_type='cpqd'"
Please note that as of this writing, the following tests known to fail:
olt.TestGroupForwarding ... FAIL olt.TestGroupModForwarding ... FAIL olt.TestMeter ... FAIL olt.TestCyclingDoubleVlan ... FAIL