Charles Chan | cc71f62 | 2019-09-17 11:27:56 -0700 | [diff] [blame] | 1 | Control Plane Testing |
| 2 | ********************* |
| 3 | |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 4 | TestON Setup |
| 5 | ============ |
| 6 | |
| 7 | Setup ONOS Cluster |
| 8 | ------------------ |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 9 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 10 | Follow instructions in `Install ONOS Controller |
| 11 | <../installation.html#install-controller-onos>`_ to setup and run ONOS cluster |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 12 | |
| 13 | Setup Mininet Environment |
| 14 | ------------------------- |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 15 | |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 16 | - Clone Mininet and run the install script |
| 17 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 18 | .. code-block:: console |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 19 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 20 | $ 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 27 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 28 | - 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 31 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 32 | .. note:: |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 33 | 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 37 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 38 | - Set environment variables as described in `Create a Cell File |
| 39 | <../installation.html#create-a-cell-file>`_ |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 40 | |
| 41 | |
| 42 | Setup Test Station |
| 43 | ------------------ |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 44 | |
| 45 | - Follow `TestON installation guide |
| 46 | <https://wiki.onosproject.org/display/ONOS/Installation>`_ to install TestON |
| 47 | |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 48 | - (Optional) Add ``OnosSystemTest/TestON/bin`` to ``$PATH`` for convenience |
| 49 | |
| 50 | |
| 51 | Run Tests |
| 52 | ========= |
| 53 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 54 | Before you run any test, it is recommended to run cleanup script to kill any |
| 55 | TestON, ssh, and Mininet sessions that are running. |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 56 | |
| 57 | .. code-block:: console |
| 58 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 59 | cd ~/OnosSystemTest/TestON/bin |
| 60 | ./cleanup.sh |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 61 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 62 | Fabric-related tests are located in |
| 63 | ``OnosSystemTest/TestON/tests/USECASE/SegmentRouting/``. |
| 64 | |
| 65 | Each individual test can be run by executing ``cli.py`` script with test name. |
| 66 | For example: |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 67 | |
| 68 | .. code-block:: console |
| 69 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 70 | cd ~/OnosSystemTest/TestON/bin |
| 71 | ./cli.py run SRSanity |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 72 | |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 73 | Test Plan |
| 74 | ========= |
| 75 | |
| 76 | Topology |
| 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 Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 85 | - L1+L2 and L3+L4 are paired switches. |
| 86 | - All spine links with L1-4 are double links. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 87 | - Hosts take IPs with dhcp and there exist 2 external routers. |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 88 | - Hosts can use ipv4 or ipv6. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 89 | - We configure untagged/tagged single/dual home hosts in order to test every |
| 90 | possible combination. |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 91 | - Most of the hosts reside in different ip subnets. |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 92 | |
| 93 | Tests Steps |
| 94 | ----------- |
| 95 | - Configure and install ONOS |
Jon Hall | 98006ff | 2021-06-23 13:48:14 -0700 | [diff] [blame^] | 96 | - Start Mininet and check flow state |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 97 | - Test connectivity |
| 98 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 99 | - pingall |
| 100 | - (Optional) ``ping 10.0.99.2`` to check external IPv4 connectivity |
| 101 | - (Optional) ``ping6 2000:9902`` to check external IPv6 connectivity |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 102 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 103 | - Additional actions and tests defined in each individual test case |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 104 | |
| 105 | Test 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 | |
| 112 | Test Results |
| 113 | ============ |
| 114 | ONF runs all Mininet based Trellis tests nightly. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 115 | |
| 116 | Test results are automatically published `here |
| 117 | <https://wiki.onosproject.org/display/ONOS/1.12-Segment+Routing>`_ |
| 118 | |