aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-10 02:37:11 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-11 16:00:55 +0200
commit0546e310ce230a46dcf3a3795c6a0baefd7aaaf2 (patch)
tree8a9b6ed5f9def89c034e12334726d346337a92ce /mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
parent97b118133edd82d2558fc169ab3974cb0b5b3946 (diff)
reclass: virtual: Factor out VM interface naming
Define two groups of VM interface naming: - ens3..ens6 - used by infra VMs, virtual node VMs; - ens2..ens3 - used by VCP VMs (spawned by salt.control); Parametrize newly defined interface names throughout the cluster models. While at it, add AArch64 default values for above iface names. NOTE: baremetal clusters will be parametrized later, after common config is factored out into <baremetal-mcp-ocata-common>. Change-Id: I89aba9aaf85b585cc510302eb76d7810fbf60679 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml')
-rw-r--r--mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
index a5fc3b1d3..d60c81dd1 100644
--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
@@ -25,8 +25,9 @@ parameters:
linux:
network:
interface:
- ens4:
+ single_int:
enabled: true
+ name: ${_param:opnfv_fn_vm_secondary_interface}
type: eth
proto: static
address: ${_param:single_address}
6'>226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. SPDX-License-Identifier: CC-BY-4.0

************************
Functest Developer Guide
************************

.. toctree::
   :numbered:
   :maxdepth: 2

Version history
===============
+------------+----------+------------------+----------------------------------+
| **Date**   | **Ver.** | **Author**       | **Comment**                      |
|            |          |                  |                                  |
+------------+----------+------------------+----------------------------------+
| 2017-01-23 | 1.0.0    | Morgan Richomme  | Creation for Danube              |
+------------+----------+------------------+----------------------------------+
| 2017-08-16 | 1.0.1    | Morgan Richomme  | Adaptations for Euphrates        |
|            |          |                  | - move generic part to Testing   |
|            |          |                  | developer guide                  |
|            |          |                  | - move reporting part to functest|
|            |          |                  | user guide                       |
|            |          |                  | - update test case list          |
|            |          |                  | - include auto generated core    |
|            |          |                  | documentation                    |
+------------+----------+------------------+----------------------------------+

============
Introduction
============

Functest is a project dealing with functional testing.
The project produces its own internal test cases but can also be considered
as a framework to support feature and VNF onboarding project testing.

Therefore there are many ways to contribute to Functest. You can:

 * Develop new internal test cases
 * Integrate the tests from your feature project
 * Develop the framework to ease the integration of external test cases

Additional tasks involving Functest but addressing all the test projects
may also be mentioned:

  * The API / Test collection framework
  * The dashboards
  * The automatic reporting portals
  * The testcase catalog

This document describes how, as a developer, you may interact with the
Functest project. The first section details the main working areas of
the project. The Second part is a list of "How to" to help you to join
the Functest family whatever your field of interest is.


========================
Functest developer areas
========================


Functest High level architecture
================================

Functest is a project delivering test containers dedicated to OPNFV.
It includes the tools, the scripts and the test scenarios.
Until Danube, Functest produced 2 docker files based on Ubuntu 14.04:

  * x86 Functest: https://hub.docker.com/r/opnfv/functest/
  * aarch64 Functest: https://hub.docker.com/r/opnfv/functest_aarch64/

In Euphrates Alpine containers have been introduced in order to lighten the
container and manage testing slicing. The new containers are created according
to the different tiers:

  * functest-core: https://hub.docker.com/r/opnfv/functest-core/
  * functest-healthcheck: https://hub.docker.com/r/opnfv/functest-healthcheck/
  * functest-smoke: https://hub.docker.com/r/opnfv/functest-smoke/
  * functest-features: https://hub.docker.com/r/opnfv/functest-features/
  * functest-components: https://hub.docker.com/r/opnfv/functest-components/
  * functest-vnf: https://hub.docker.com/r/opnfv/functest-vnf/
  * functest-parser: https://hub.docker.com/r/opnfv/functest-parser/
  * functest-restapi: https://hub.docker.com/r/opnfv/functest-restapi/

Standalone functest dockers are maintained for Euphrates but Alpine containers
are recommended.

Functest can be described as follow:

 +----------------------+
 |                      |
 |   +--------------+   |                  +-------------------+
 |   |              |   |    Public        |                   |
 |   | Tools        |   +------------------+      OPNFV        |
 |   | Scripts      |   |                  | System Under Test |
 |   | Scenarios    |   |                  |                   |
 |   |              |   |                  |                   |
 |   +--------------+   |                  +-------------------+
 |                      |
 |    Functest Docker   |
 |                      |
 +----------------------+

Functest internal test cases
============================
The internal test cases in Euphrates are:


 * api_check
 * connection_check
 * snaps_health_check
 * vping_ssh
 * vping_userdata
 * odl
 * odl-netvirt
 * odl-fds
 * rally_full
 * rally_sanity
 * tempest_smoke_serial
 * tempest_full_parallel
 * cloudify_ims

By internal, we mean that this particular test cases have been developed and/or
integrated by functest contributors and the associated code is hosted in the
Functest repository.
An internal case can be fully developed or a simple integration of
upstream suites (e.g. Tempest/Rally developed in OpenStack, or odl suites are
just integrated in Functest).

The structure of this repository is detailed in `[1]`_.
The main internal test cases are in the opnfv_tests subfolder of the
repository, the internal test cases can be grouped by domain:

 * sdn: odl, odl_netvirt, odl_fds
 * openstack: api_check, connection_check, snaps_health_check, vping_ssh, vping_userdata, tempest_*, rally_*
 * vnf: cloudify_ims

If you want to create a new test case you will have to create a new folder under
the testcases directory (See next section for details).

Functest external test cases
============================
The external test cases are inherited from other OPNFV projects, especially the
feature projects.

The external test cases are:

 * barometer
 * bgpvpn
 * doctor
 * domino
 * fds
 * parser
 * promise
 * refstack_defcore
 * snaps_smoke
 * functest-odl-sfc
 * orchestra_clearwaterims
 * orchestra_openims
 * cloudify_vrouter
 * juju_vepc

External test cases integrated in previous versions but not released in
Euphrates:

 * copper
 * moon
 * netready
 * security_scan


The code to run these test cases is hosted in the repository of the project.
Please note that orchestra test cases are hosted in Functest repository and not
in orchestra repository. Cloudify_vrouter and juju_vepc code is also hosted in
functest as there are no dedicated projects.


Functest framework
==================

Functest is a framework.

Historically Functest is released as a docker file, including tools, scripts and
a CLI to prepare the environment and run tests.
It simplifies the integration of external test suites in CI pipeline and provide
commodity tools to collect and display results.

Since Colorado, test categories also known as **tiers** have been created to
group similar tests, provide consistent sub-lists and at the end optimize
test duration for CI (see How To section).

The definition of the tiers has been agreed by the testing working group.

The tiers are:
  * healthcheck
  * smoke
  * features
  * components
  * performance
  * vnf
  * stress

Note Functest deals with healthcheck, smoke, features, components and vnf tiers.
Performance and stress tiers are out of scope.

Functest abstraction classes
============================

In order to harmonize test integration, abstraction classes have been
introduced:

 * testcase: base for any test case
 * unit: run unit tests as test case
 * feature: abstraction for feature project
 * vnf: abstraction for vnf onboarding

The goal is to unify the way to run tests in Functest.

Feature, unit and vnf_base inherit from testcase:

              +-----------------------------------------+
              |                                         |
              |         TestCase                        |
              |                                         |
              |         - init()                        |
              |         - run()                         |
              |         - publish_report()              |
              |         - check_criteria()              |
              |                                         |
              +-----------------------------------------+
                 |               |
                 V               V
  +--------------------+   +--------------+   +--------------------------+
  |                    |   |              |   |                          |
  |    feature         |   |    unit      |   |      vnf                 |
  |                    |   |              |   |                          |
  |                    |   |              |   |  - prepare()             |
  |  - execute()       |   |              |   |  - deploy_orchestrator() |
  | BashFeature class  |   |              |   |  - deploy_vnf()          |
  |                    |   |              |   |  - test_vnf()            |
  |                    |   |              |   |  - clean()               |
  +--------------------+   +--------------+   +--------------------------+


Testcase
--------
.. raw:: html
   :url: http://artifacts.opnfv.org/functest/docs/apidoc/functest.core.testcase.html

Feature
-------
.. raw:: html
   :url: http://artifacts.opnfv.org/functest/docs/apidoc/functest.core.feature.html

Unit
----
.. raw:: html
   :url: http://artifacts.opnfv.org/functest/docs/apidoc/functest.core.unit.html

VNF
---
.. raw:: html
   :url: http://artifacts.opnfv.org/functest/docs/apidoc/functest.core.vnf.html


see `[5]`_ to get code samples


Functest util classes
=====================

In order to simplify the creation of test cases, Functest develops also some
functions that are used by internal test cases.
Several features are supported such as logger, configuration management and
Openstack capabilities (snapshot, clean, tacker,..).
These functions can be found under <repo>/functest/utils and can be described as
follows::

 functest/utils/
 |-- config.py
 |-- constants.py
 |-- decoratos.py
 |-- env.py
 |-- functest_utils.py
 |-- openstack_clean.py
 |-- openstack_snapshot.py
 |-- openstack_tacker.py
 `-- openstack_utils.py

It is recommended to use the SNAPS-OO library for deploying OpenStack instances.
SNAPS `[4]`_ is an OPNFV project providing OpenStack utils.


TestAPI
=======
Functest is using the Test collection framework and the TestAPI developed by
the OPNFV community. See `[6]`_ for details.


Reporting
=========
A web page is automatically generated every day to display the status based on
jinja2 templates `[3]`_.


Dashboard
=========

Additional dashboarding is managed at the testing group level, see `[7]`_ for
details.


=======
How TOs
=======

See How to section on Functest wiki `[8]`_


==========
References
==========

_`[1]`: http://artifacts.opnfv.org/functest/docs/configguide/index.html Functest configuration guide

_`[2]`: http://artifacts.opnfv.org/functest/docs/userguide/index.html functest user guide

_`[3]`: https://git.opnfv.org/cgit/releng/tree/utils/test/reporting

_`[4]`: https://git.opnfv.org/snaps/

_`[5]` : http://testresults.opnfv.org/functest/framework/index.html

_`[6]`: http://docs.opnfv.org/en/latest/testing/testing-dev.html

_`[7]`: https://opnfv.biterg.io/goto/283dba93ca18e95964f852c63af1d1ba

_`[8]`: https://wiki.opnfv.org/pages/viewpage.action?pageId=7768932

IRC support chan: #opnfv-functest