blob: 9064775d0af4292eb6ad02cf299de4fa5f92fe1d [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------------------
Charles Chan8d63fa02019-09-17 13:25:44 -07009
Zack Williamsd63d35b2020-06-23 14:12:46 -070010Follow instructions in `Install ONOS Controller
11<../installation.html#install-controller-onos>`_ to setup and run ONOS cluster
Charles Chan8d63fa02019-09-17 13:25:44 -070012
13Setup Mininet Environment
14-------------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -070015
Charles Chan8d63fa02019-09-17 13:25:44 -070016- Clone Mininet and run the install script
17
Charles Chan8299f072019-09-23 11:32:26 -070018 .. code-block:: console
Charles Chan8d63fa02019-09-17 13:25:44 -070019
Charles Chan8299f072019-09-23 11:32:26 -070020 $ cd ~
21 $ git clone https://github.com/jhall11/mininet.git # Clone the repository
22 $ cd mininet
23 $ git branch -v -a # Show all the remote repositories
24 $ git checkout -b dynamic_topo origin/dynamic_topo # Checkout the dynamic_topo repository
25 $ cd util
26 $ sudo ./install.sh -3fvn # Install OpenFlow 1.3, Open Vswitch and Mininet dependencies
Charles Chan8d63fa02019-09-17 13:25:44 -070027
Zack Williamsd63d35b2020-06-23 14:12:46 -070028- Follow `Trellis in a Box
29 <https://github.com/opennetworkinglab/routing/tree/master/trellis>`_ to
30 install Trellis dependencies, such as DHCP server and Quagga.
Charles Chan8d63fa02019-09-17 13:25:44 -070031
Charles Chan8299f072019-09-23 11:32:26 -070032 .. note::
Zack Williamsd63d35b2020-06-23 14:12:46 -070033 If DHCP server does not properly run because of a permission error,
34 please see `this
35 <https://help.ubuntu.com/community/isc-dhcp-server#Permission_issues_with_ISC-DHCP_server>`_
36 to solve the problem.
Charles Chan8d63fa02019-09-17 13:25:44 -070037
Zack Williamsd63d35b2020-06-23 14:12:46 -070038- Set environment variables as described in `Create a Cell File
39 <../installation.html#create-a-cell-file>`_
Charles Chan8d63fa02019-09-17 13:25:44 -070040
41
42Setup Test Station
43------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -070044
45- Follow `TestON installation guide
46 <https://wiki.onosproject.org/display/ONOS/Installation>`_ to install TestON
47
Charles Chan8d63fa02019-09-17 13:25:44 -070048- (Optional) Add ``OnosSystemTest/TestON/bin`` to ``$PATH`` for convenience
49
50
51Run Tests
52=========
53
Zack Williamsd63d35b2020-06-23 14:12:46 -070054Before you run any test, it is recommended to run cleanup script to kill any
55TestON, ssh, and Mininet sessions that are running.
Charles Chan8d63fa02019-09-17 13:25:44 -070056
57.. code-block:: console
58
Charles Chan8299f072019-09-23 11:32:26 -070059 cd ~/OnosSystemTest/TestON/bin
60 ./cleanup.sh
Charles Chan8d63fa02019-09-17 13:25:44 -070061
Zack Williamsd63d35b2020-06-23 14:12:46 -070062Fabric-related tests are located in
63``OnosSystemTest/TestON/tests/USECASE/SegmentRouting/``.
64
65Each individual test can be run by executing ``cli.py`` script with test name.
66For example:
Charles Chan8d63fa02019-09-17 13:25:44 -070067
68.. code-block:: console
69
Charles Chan8299f072019-09-23 11:32:26 -070070 cd ~/OnosSystemTest/TestON/bin
71 ./cli.py run SRSanity
Charles Chan8d63fa02019-09-17 13:25:44 -070072
Charles Chan8d63fa02019-09-17 13:25:44 -070073Test Plan
74=========
75
76Topology
77--------
78- 0x1 single ToR
79- 0x2 dual-homed ToR
80- 2x2 leaf-spine
81- 2x4 leaf-spine with dual-homed ToR
82- 2x3 leaf-spine with dual-homed ToR on one leaf
83- 2x5 topology with spines S0 and S1, and leafs L0, L1, L2, L3, L4
84
Charles Chan8299f072019-09-23 11:32:26 -070085 - L1+L2 and L3+L4 are paired switches.
86 - All spine links with L1-4 are double links.
Zack Williamsd63d35b2020-06-23 14:12:46 -070087 - Hosts take IPs with dhcp and there exist 2 external routers.
Charles Chan8299f072019-09-23 11:32:26 -070088 - Hosts can use ipv4 or ipv6.
Zack Williamsd63d35b2020-06-23 14:12:46 -070089 - We configure untagged/tagged single/dual home hosts in order to test every
90 possible combination.
Charles Chan8299f072019-09-23 11:32:26 -070091 - Most of the hosts reside in different ip subnets.
Charles Chan8d63fa02019-09-17 13:25:44 -070092
93Tests Steps
94-----------
95- Configure and install ONOS
Jon Hall98006ff2021-06-23 13:48:14 -070096- Start Mininet and check flow state
Charles Chan8d63fa02019-09-17 13:25:44 -070097- Test connectivity
98
Charles Chan8299f072019-09-23 11:32:26 -070099 - pingall
100 - (Optional) ``ping 10.0.99.2`` to check external IPv4 connectivity
101 - (Optional) ``ping6 2000:9902`` to check external IPv6 connectivity
Charles Chan8d63fa02019-09-17 13:25:44 -0700102
Zack Williamsd63d35b2020-06-23 14:12:46 -0700103- Additional actions and tests defined in each individual test case
Charles Chan8d63fa02019-09-17 13:25:44 -0700104
105Test Cases
106----------
107.. csv-table::
108 :file: ../tables/testing-plan.csv
109 :widths: 1, 2, 6, 1, 1, 2, 1
110 :header-rows: 1
111
112Test Results
113============
114ONF runs all Mininet based Trellis tests nightly.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700115
116Test results are automatically published `here
117<https://wiki.onosproject.org/display/ONOS/1.12-Segment+Routing>`_
118