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 | ------------------ |
| 9 | Follow instructions in `Install ONOS Controller <../installation.html#install-controller-onos>`_ to setup and run ONOS cluster |
| 10 | |
| 11 | |
| 12 | Setup Mininet Environment |
| 13 | ------------------------- |
| 14 | - Clone Mininet and run the install script |
| 15 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 16 | .. code-block:: console |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 17 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 18 | $ 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 25 | |
| 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 Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 28 | .. 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 30 | |
| 31 | - Set environment variables as described in `Create a Cell File <../installation.html#create-a-cell-file>`_ |
| 32 | |
| 33 | |
| 34 | Setup 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 | |
| 40 | Run Tests |
| 41 | ========= |
| 42 | |
| 43 | Before 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 Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 47 | cd ~/OnosSystemTest/TestON/bin |
| 48 | ./cleanup.sh |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 49 | |
| 50 | Fabric-related tests are located in ``OnosSystemTest/TestON/tests/USECASE/SegmentRouting/``. |
| 51 | Each individual test can be run by executing ``cli.py`` script with test name. For example: |
| 52 | |
| 53 | .. code-block:: console |
| 54 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 55 | cd ~/OnosSystemTest/TestON/bin |
| 56 | ./cli.py run SRSanity |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 57 | |
| 58 | |
| 59 | Test Plan |
| 60 | ========= |
| 61 | |
| 62 | Topology |
| 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 Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 71 | - 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 Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 77 | |
| 78 | Tests Steps |
| 79 | ----------- |
| 80 | - Configure and install ONOS |
| 81 | - Start mininet and check flow state |
| 82 | - Test connectivity |
| 83 | |
Charles Chan | 8299f07 | 2019-09-23 11:32:26 -0700 | [diff] [blame] | 84 | - pingall |
| 85 | - (Optional) ``ping 10.0.99.2`` to check external IPv4 connectivity |
| 86 | - (Optional) ``ping6 2000:9902`` to check external IPv6 connectivity |
Charles Chan | 8d63fa0 | 2019-09-17 13:25:44 -0700 | [diff] [blame] | 87 | - Additional actions and tests defined in each individual test case |
| 88 | |
| 89 | |
| 90 | Test 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 | |
| 97 | Test Results |
| 98 | ============ |
| 99 | ONF runs all Mininet based Trellis tests nightly. |
| 100 | Test results are automatically published `here <https://wiki.onosproject.org/display/ONOS/1.12-Segment+Routing>`_ |