Merge "Extract util functions from tempest.py to conf_utils"
[functest.git] / docs / userguide / introduction.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Overview of the Functest suites
5 ===============================
6
7 Functest is the OPNFV project primarily targeting function testing.
8 In the Continuous Integration pipeline, it is launched after an OPNFV fresh
9 installation to validate and verify the basic functions of the
10 infrastructure.
11
12 The current list of test suites can be distributed over 5 main domains: VIM
13 (Virtualised Infrastructure Manager), Controllers (i.e. SDN Controllers),
14 Features, VNF (Virtual Network Functions) and MANO stacks.
15
16 Functest test suites are also distributed in the OPNFV testing categories:
17 healthcheck, smoke, features, components, performance, VNF, Stress tests.
18
19 All the Healthcheck and smoke tests of a given scenario must be succesful to
20 validate the scenario for the release.
21
22 +-------------+---------------+----------------+----------------------------------+
23 | Domain      | Tier          | Test case      | Comments                         |
24 +=============+===============+================+==================================+
25 | VIM         | healthcheck   | healthcheck    | Verify basic operation in VIM    |
26 |             |               +----------------+----------------------------------+
27 |             |               | connection     | Check OpenStack connectivity     |
28 |             |               | _check         | through SNAPS framework          |
29 |             |               +----------------+----------------------------------+
30 |             |               | api_check      | Check OpenStack API through      |
31 |             |               |                | SNAPS framework                  |
32 |             +---------------+----------------+----------------------------------+
33 |             | smoke         | vPing_SSH      | NFV "Hello World" using an SSH   |
34 |             |               |                | connection to a destination VM   |
35 |             |               |                | over a created floating IP       |
36 |             |               |                | address on the SUT Public /      |
37 |             |               |                | External network. Using the SSH  |
38 |             |               |                | connection a test script is then |
39 |             |               |                | copied to the destination        |
40 |             |               |                | VM and then executed via SSH.    |
41 |             |               |                | The script will ping another     |
42 |             |               |                | VM on a specified IP address over|
43 |             |               |                | the SUT Private Tenant network.  |
44 |             |               +----------------+----------------------------------+
45 |             |               | vPing_userdata | Uses Ping with given userdata    |
46 |             |               |                | to test intra-VM connectivity    |
47 |             |               |                | over the SUT Private Tenant      |
48 |             |               |                | network. The correct operation   |
49 |             |               |                | of the NOVA Metadata service is  |
50 |             |               |                | also verified in this test.      |
51 |             |               +----------------+----------------------------------+
52 |             |               | tempest_smoke  | Generate and run a relevant      |
53 |             |               | \_serial       | Tempest Test Suite in smoke mode.|
54 |             |               |                | The generated test set is        |
55 |             |               |                | dependent on the OpenStack       |
56 |             |               |                | deployment environment.          |
57 |             |               +----------------+----------------------------------+
58 |             |               | rally_sanity   | Run a subset of the OpenStack    |
59 |             |               |                | Rally Test Suite in smoke mode   |
60 |             |               +----------------+----------------------------------+
61 |             |               | snaps_smoke    | Run a subset of the OpenStack    |
62 |             |               |                | Rally Test Suite in smoke mode   |
63 |             +---------------+----------------+----------------------------------+
64 |             | components    | tempest_full   | Generate and run a full set of   |
65 |             |               | \_parallel     | the OpenStack Tempest Test Suite.|
66 |             |               |                | See the OpenStack reference test |
67 |             |               |                | suite `[2]`_. The generated      |
68 |             |               |                | test set is dependent on the     |
69 |             |               |                | OpenStack deployment environment.|
70 |             |               +----------------+----------------------------------+
71 |             |               | rally_full     | Run the OpenStack testing tool   |
72 |             |               |                | benchmarking OpenStack modules   |
73 |             |               |                | See the Rally documents `[3]`_.  |
74 +-------------+---------------+----------------+----------------------------------+
75 | Controllers | smoke         | odl            | Opendaylight Test suite          |
76 |             |               |                | Limited test suite to check the  |
77 |             |               |                | basic neutron (Layer 2)          |
78 |             |               |                | operations mainly based on       |
79 |             |               |                | upstream testcases. See below    |
80 |             |               |                | for details                      |
81 |             |               +----------------+----------------------------------+
82 |             |               | onos           | Test suite of ONOS L2 and L3     |
83 |             |               |                | functions.                       |
84 |             |               |                | See `ONOSFW User Guide`_  for    |
85 |             |               |                | details.                         |
86 +-------------+---------------+----------------+----------------------------------+
87 | Features    | features      | promise        | Resource reservation and         |
88 |             |               |                | management project to identify   |
89 |             |               |                | NFV related requirements and     |
90 |             |               |                | realize resource reservation for |
91 |             |               |                | future usage by capacity         |
92 |             |               |                | management of resource pools     |
93 |             |               |                | regarding compute, network and   |
94 |             |               |                | storage.                         |
95 |             |               |                | See `Promise User Guide`_ for    |
96 |             |               |                | details.                         |
97 |             |               +----------------+----------------------------------+
98 |             |               | doctor         | Doctor platform, as of Colorado  |
99 |             |               |                | release, provides the three      |
100 |             |               |                | features:                        |
101 |             |               |                | * Immediate Notification         |
102 |             |               |                | * Consistent resource state      |
103 |             |               |                | awareness for compute host down  |
104 |             |               |                | * Valid compute host status      |
105 |             |               |                | given to VM owner                |
106 |             |               |                | See `Doctor User Guide`_ for     |
107 |             |               |                | details                          |
108 |             |               +----------------+----------------------------------+
109 |             |               | bgpvpn         | Implementation of the OpenStack  |
110 |             |               |                | bgpvpn API from the SDNVPN       |
111 |             |               |                | feature project. It allows for   |
112 |             |               |                | the creation of BGP VPNs.        |
113 |             |               |                | See `SDNVPN User Guide`_ for     |
114 |             |               |                | details                          |
115 |             |               +----------------+----------------------------------+
116 |             |               | security_scan  | Implementation of a simple       |
117 |             |               |                | security scan. (Currently        |
118 |             |               |                | available only for the Apex      |
119 |             |               |                | installer environment)           |
120 |             |               +----------------+----------------------------------+
121 |             |               | onos-sfc       | SFC testing for onos scenarios   |
122 |             |               |                | See `ONOSFW User Guide`_ for     |
123 |             |               |                | details                          |
124 |             |               +----------------+----------------------------------+
125 |             |               | odl-sfc        | SFC testing for odl scenarios    |
126 |             |               |                | See `SFC User Guide`_ for details|
127 |             |               +----------------+----------------------------------+
128 |             |               | domino         | Domino provides TOSCA template   |
129 |             |               |                | distribution service for network |
130 |             |               |                | service and VNF descriptors      |
131 |             |               |                | among MANO components e.g.,      |
132 |             |               |                | NFVO, VNFM, VIM, SDN-C, etc.,    |
133 |             |               |                | as well as OSS/BSS functions.    |
134 |             |               |                | See `Domino User Guide`_ for     |
135 |             |               |                | details                          |
136 |             |               +----------------+----------------------------------+
137 |             |               | copper         | Copper develops OPNFV platform   |
138 |             |               |                | support for policy management,   |
139 |             |               |                | using open source projects such  |
140 |             |               |                | as OpenStack Congress, focused   |
141 |             |               |                | on helping ensure that virtual   |
142 |             |               |                | infrastructure and the apps that |
143 |             |               |                | execute on it comply with the    |
144 |             |               |                | configuration policy intent of   |
145 |             |               |                | service providers, developers,   |
146 |             |               |                | and end users. See more detail   |
147 |             |               |                | in the `Copper User Guide`_.     |
148 |             |               +----------------+----------------------------------+
149 |             |               | multisites     | Multisites                       |
150 |             |               |                | See `Multisite User Guide`_ for  |
151 |             |               |                | details                          |
152 |             |               +----------------+----------------------------------+
153 |             |               | moon           | Security management system       |
154 |             |               |                | See `Moon User Guide`_ for       |
155 |             |               |                | details                          |
156 +-------------+---------------+----------------+----------------------------------+
157 | VNF         | vnf           | cloudify_ims   | Example of a real VNF deployment |
158 |             |               |                | to show the NFV capabilities of  |
159 |             |               |                | the platform. The IP Multimedia  |
160 |             |               |                | Subsytem is a typical Telco test |
161 |             |               |                | case, referenced by ETSI.        |
162 |             |               |                | It provides a fully functional   |
163 |             |               |                | VoIP System                      |
164 |             |               +----------------+----------------------------------+
165 |             |               | opera_ims      | vIMS deployment using openBaton  |
166 |             |               +----------------+----------------------------------+
167 |             |               | orchestra_ims  | vIMS deployment using open-O     |
168 +             +---------------+----------------+----------------------------------+
169 |             |               | parser         | Parser is an integration project |
170 |             |               |                | which aims to provide            |
171 |             |               |                | placement/deployment templates   |
172 |             |               |                | translation for OPNFV platform,  |
173 |             |               |                | including TOSCA -> HOT, POLICY ->|
174 |             |               |                | TOSCA and YANG -> TOSCA.         |
175 |             |               |                | See `Parser User Guide`_ for     |
176 |             |               |                | details                          |
177 +-------------+---------------+----------------+----------------------------------+
178
179
180 As shown in the above table, Functest is structured into different 'domains',
181 'tiers' and 'test cases'. Each 'test case' usually represents an actual
182 'Test Suite' comprised -in turn- of several test cases internally.
183
184 Test cases also have an implicit execution order. For example, if the early
185 'healthcheck' Tier testcase fails, or if there are any failures in the 'smoke'
186 Tier testcases, there is little point to launch a full testcase execution round.
187
188 In Danube, we merged smoke and sdn controller tiers in smoke tier.
189
190 An overview of the Functest Structural Concept is depicted graphically below:
191
192 .. figure:: ../images/concepts_mapping_final.png
193    :align: center
194    :alt: Functest Concepts Structure
195
196 Some of the test cases are developed by Functest team members, whereas others
197 are integrated from upstream communities or other OPNFV projects. For example,
198 `Tempest <http://docs.openstack.org/developer/tempest/overview.html>`_ is the
199 OpenStack integration test suite and Functest is in charge of the selection,
200 integration and automation of those tests that fit suitably to OPNFV.
201
202 The Tempest test suite is the default OpenStack smoke test suite but no new test
203 cases have been created in OPNFV Functest.
204
205 The results produced by the tests run from CI are pushed and collected into a
206 NoSQL database. The goal is to populate the database with results from different
207 sources and scenarios and to show them on a `Functest Dashboard`_. A screenshot
208 of a live Functest Dashboard is shown below:
209
210 ** TODO **
211 .. figure:: ../images/FunctestDashboardDanube.png
212    :align: center
213    :alt: Functest Dashboard
214
215
216 Basic components (VIM, SDN controllers) are tested through their own suites.
217 Feature projects also provide their own test suites with different ways of
218 running their tests.
219
220 The notion of domain has been introduced in the description of the test cases
221 stored in the Database.
222 This parameters as well as possible tags can be used for the Test case catalog.
223
224 vIMS test case was integrated to demonstrate the capability to deploy a
225 relatively complex NFV scenario on top of the OPNFV infrastructure.
226
227 Functest considers OPNFV as a black box. As of Danube release the OPNFV
228 offers a lot of potential combinations:
229
230   * 3 controllers (OpenDaylight, ONOS, OpenContrail)
231   * 4 installers (Apex, Compass, Fuel, Joid)
232
233 Most of the tests are runnable by any combination, but some tests might have
234 restrictions imposed by the utilized installers or due to the available
235 deployed features. The system uses the environment variables (INSTALLER_IP and
236 DEPLOY_SCENARIO) to automatically determine the valid test cases, for each given
237 environment.
238
239 A convenience Functest CLI utility is also available to simplify setting up the
240 Functest evironment, management of the OpenStack environment (e.g. resource
241 clean-up) and for executing tests.
242 The Functest CLI organised the testcase into logical Tiers, which contain in
243 turn one or more testcases. The CLI allows execution of a single specified
244 testcase, all test cases in a specified Tier, or the special case of execution
245 of **ALL** testcases. The Functest CLI is introduced in more detail in the
246 section `Executing the functest suites`_ of this document.
247
248 .. _`[2]`: http://docs.openstack.org/developer/tempest/overview.html
249 .. _`[3]`: https://rally.readthedocs.org/en/latest/index.html
250 .. _`Copper User Guide`: http://artifacts.opnfv.org/copper/colorado/docs/userguide/index.html
251 .. _`Doctor User Guide`: http://artifacts.opnfv.org/doctor/colorado/userguide/index.html
252 .. _`Promise User Guide`: http://artifacts.opnfv.org/promise/colorado/docs/userguide/index.html
253 .. _`ONOSFW User Guide`: http://artifacts.opnfv.org/onosfw/colorado/userguide/index.html
254 .. _`SDNVPN User Guide`: http://artifacts.opnfv.org/sdnvpn/colorado/docs/userguide/index.html
255 .. _`Domino User Guide`: http://artifacts.opnfv.org/domino/docs/userguide-single/index.html
256 .. _`Parser User Guide`: http://artifacts.opnfv.org/parser/colorado/docs/userguide/index.html
257 .. _`Functest Dashboard`: http://testresults.opnfv.org/kibana_dashboards/
258 .. _`SFC User Guide`: http://artifacts.opnfv.org/sfc/colorado/userguide/index.html
259 .. _`Multisite User Guide`: http://artifacts.opnfv.org/multisite/docs/userguide/index.html
260 .. _`Moon User Guide`: http://artifacts.opnfv.org/moon/docs/userguide/index.html