blob: 7499296da3c85ab8dba3f94edfb6b88b93d0600d [file] [log] [blame]
Charles Chancc71f622019-09-17 11:27:56 -07001Control Plane Testing
2*********************
3
Charles Chan8d63fa02019-09-17 13:25:44 -07004TestON Setup
5============
6
7Setup ONOS Cluster
8------------------
9Follow instructions in `Install ONOS Controller <../installation.html#install-controller-onos>`_ to setup and run ONOS cluster
10
11
12Setup Mininet Environment
13-------------------------
14- Clone Mininet and run the install script
15
Charles Chan8299f072019-09-23 11:32:26 -070016 .. code-block:: console
Charles Chan8d63fa02019-09-17 13:25:44 -070017
Charles Chan8299f072019-09-23 11:32:26 -070018 $ cd ~
19 $ git clone https://github.com/jhall11/mininet.git # Clone the repository
20 $ cd mininet
21 $ git branch -v -a # Show all the remote repositories
22 $ git checkout -b dynamic_topo origin/dynamic_topo # Checkout the dynamic_topo repository
23 $ cd util
24 $ sudo ./install.sh -3fvn # Install OpenFlow 1.3, Open Vswitch and Mininet dependencies
Charles Chan8d63fa02019-09-17 13:25:44 -070025
26- Follow `Trellis in a Box <https://github.com/opennetworkinglab/routing/tree/master/trellis>`_ to install Trellis dependencies, such as DHCP server and Quagga.
27
Charles Chan8299f072019-09-23 11:32:26 -070028 .. note::
29 If DHCP server does not properly run because of a permission error, please see `this <https://help.ubuntu.com/community/ isc-dhcp-server#Permission_issues_with_ISC-DHCP_server>`_ to solve the problem.
Charles Chan8d63fa02019-09-17 13:25:44 -070030
31- Set environment variables as described in `Create a Cell File <../installation.html#create-a-cell-file>`_
32
33
34Setup Test Station
35------------------
36- Follow `TestON installation guide <https://wiki.onosproject.org/display/ONOS/Installation>`_ to install TestON
37- (Optional) Add ``OnosSystemTest/TestON/bin`` to ``$PATH`` for convenience
38
39
40Run Tests
41=========
42
43Before you run any test, it is recommended to run cleanup script to kill any TestON, ssh, and Mininet sessions that are running.
44
45.. code-block:: console
46
Charles Chan8299f072019-09-23 11:32:26 -070047 cd ~/OnosSystemTest/TestON/bin
48 ./cleanup.sh
Charles Chan8d63fa02019-09-17 13:25:44 -070049
50Fabric-related tests are located in ``OnosSystemTest/TestON/tests/USECASE/SegmentRouting/``.
51Each individual test can be run by executing ``cli.py`` script with test name. For example:
52
53.. code-block:: console
54
Charles Chan8299f072019-09-23 11:32:26 -070055 cd ~/OnosSystemTest/TestON/bin
56 ./cli.py run SRSanity
Charles Chan8d63fa02019-09-17 13:25:44 -070057
58
59Test Plan
60=========
61
62Topology
63--------
64- 0x1 single ToR
65- 0x2 dual-homed ToR
66- 2x2 leaf-spine
67- 2x4 leaf-spine with dual-homed ToR
68- 2x3 leaf-spine with dual-homed ToR on one leaf
69- 2x5 topology with spines S0 and S1, and leafs L0, L1, L2, L3, L4
70
Charles Chan8299f072019-09-23 11:32:26 -070071 - L1+L2 and L3+L4 are paired switches.
72 - All spine links with L1-4 are double links.
73 - Hosts take ips with dhcp and there exist 2 external routers.
74 - Hosts can use ipv4 or ipv6.
75 - We configure untagged/tagged single/dual home hosts in order to test every possible combination.
76 - Most of the hosts reside in different ip subnets.
Charles Chan8d63fa02019-09-17 13:25:44 -070077
78Tests Steps
79-----------
80- Configure and install ONOS
81- Start mininet and check flow state
82- Test connectivity
83
Charles Chan8299f072019-09-23 11:32:26 -070084 - pingall
85 - (Optional) ``ping 10.0.99.2`` to check external IPv4 connectivity
86 - (Optional) ``ping6 2000:9902`` to check external IPv6 connectivity
Charles Chan8d63fa02019-09-17 13:25:44 -070087- Additional actions and tests defined in each individual test case
88
89
90Test Cases
91----------
92.. csv-table::
93 :file: ../tables/testing-plan.csv
94 :widths: 1, 2, 6, 1, 1, 2, 1
95 :header-rows: 1
96
97Test Results
98============
99ONF runs all Mininet based Trellis tests nightly.
100Test results are automatically published `here <https://wiki.onosproject.org/display/ONOS/1.12-Segment+Routing>`_