blob: d615e7e27f45565722648bf8773fc305a9b608ac [file] [log] [blame]
mrichomme0fcaa852020-11-26 15:24:27 +01001.. This work is licensed under a
2 Creative Commons Attribution 4.0 International License.
3.. integration-tooling:
4
5Tooling
6=======
7
8.. important::
9 Integration team deals with lots of tools to complete its missions. The goal
10 of this section is to highlight some of them and redirect to their official
11 documentation. These tools can be used for CI/CD, Testing or platform management.
12
morganrol81dc70f2021-04-06 19:57:44 +020013 **Upstream tools** are privileged but when needed specific developments can be done.
mrichomme0fcaa852020-11-26 15:24:27 +010014
15 Please note that none of these tools are imposed to test developers, in other
16 words, any kind of test is accepted and can be integrated, the list of tools
17 is just indicative.
18
morganrol81dc70f2021-04-06 19:57:44 +020019Integration Project
20-------------------
21
22Integration portal
Cédric Ollivier808252c2022-07-05 14:53:36 +020023~~~~~~~~~~~~~~~~~~
morganrol81dc70f2021-04-06 19:57:44 +020024
25A portal is built to report the status of the different labs collaborating in
26Integration, see http://testresults.opnfv.org/onap-integration/
27
28.. figure:: files/CI/ONAP_CI_3.png
29 :align: center
30 :width: 6.5in
31
32The code of this web site is shared on a public gitlab project.
33
34
35Communication channels
Cédric Ollivier808252c2022-07-05 14:53:36 +020036~~~~~~~~~~~~~~~~~~~~~~
morganrol81dc70f2021-04-06 19:57:44 +020037
38The main communication channel for real time support is the official ONAP
39Slack #integration-team chan (https://onapproject.slack.com/).
40
41You can also send a mail to onap-discuss AT lists.onap.org
42with [ONAP] [Integration] prefix in the title.
43
Bartek Grzybowski9b632842021-12-13 12:36:27 +010044Repository management
Cédric Ollivier808252c2022-07-05 14:53:36 +020045~~~~~~~~~~~~~~~~~~~~~
Bartek Grzybowski9b632842021-12-13 12:36:27 +010046
47Since Integration team manages few dozens of different repositories a tool was provided to aid the process of mass editing the INFO.yaml files. It can be found `here <https://git.onap.org/integration/tree/ptl/edit_committers_info>`__.
morganrol81dc70f2021-04-06 19:57:44 +020048
mrichomme0fcaa852020-11-26 15:24:27 +010049Testing
50-------
51
52Test frameworks
53~~~~~~~~~~~~~~~
54
55Robotframework
56..............
57
58`robotframework <https://robotframework.org/>`_ is a well known test framework.
59Lots of ONAP tests are leveraging this framework.
60This framework is fully developed upstream even if some extensions (python
61modules) were created especially to deal with OpenStack (see
62`python-testing-utils project <https://git.onap.org/testsuite/python-testing-utils/>`_).
63
64Some GUI tests (using Robotframework Selenium extension) had been initiated but
morganrol81dc70f2021-04-06 19:57:44 +020065not maintained, as a consequence they are not integrated in CI/CD.
mrichomme0fcaa852020-11-26 15:24:27 +010066
67
Michal Jagielloe300a272022-10-27 08:40:00 +000068Python ONAP SDK
69...............
mrichomme0fcaa852020-11-26 15:24:27 +010070
71The Openstack and Kubernetes python SDK are references widely adopted by the
72developers and the industry. Developing a python ONAP SDK aimed to follow the
73examples of the infrastructure SDK with the same expectations in term of code
74quality.
75After an evaluation of the CLI project (JAVA SDK re-exposing primitives through
76python system calls), and a first prototype (onap_tests used until Frankfurt for
77end to end tests) it was decided to develop a new python SDK.
78
79This SDK has been developed in gitlab.com to benefit from the numerous built-in
80options offered by gitlab and ensure the best possible code quality.
81
Michal Jagielloe300a272022-10-27 08:40:00 +000082- `python SDK repositoy <https://gerrit.onap.org/r/admin/repos/integration/python-onapsdk>`_
mrichomme0fcaa852020-11-26 15:24:27 +010083- `python SDK documentation <https://python-onapsdk.readthedocs.io/en/latest/?badge=develop>`_
84
85The project is fully Open Source, released under the Apache v2 license.
86Integration committers are invited to join the project. The main maintainers are
87ONAP integration and OOM committers.
88
89Any new feature shall respect the code quality criteria:
90
91- unit test coverage > 98%
92- functional tests (several components mock objects have been developed)
93
94.. attention::
95 Python-onapsdk is a **SDK**, it means it is a tool allowing to communicate
96 with ONAP. It is a **middleware** that can be used by test projects but it is
97 **NOT a test**.
98
Michal Jagielloe300a272022-10-27 08:40:00 +000099A companion project has been created in ONAP:
mrichomme0fcaa852020-11-26 15:24:27 +0100100`pythonsdk-tests <https://git.onap.org/testsuite/pythonsdk-tests/>`_.
101
102The pythonsdk-test project defines tests based on python-onapsdk.
103
104The tests are hosted in this repository. They consume the different needed SDK:
105python-onapsdk but also the kubernetes, the OpenStack SDK and or any needed
106additional middlewares.
107The project developed the notion of steps that can been combined and reorganized
108as need to design a test. This project interacts with ONAP only through the
109python-onapsdk library.
110The tests are described in :ref:`The Integration Test page <integration-tests>`.
111
112The available steps are:
113
114- [CLAMP] OnboardClampStep: Onboard a SDC including a TCA blueprint
115- [CDS] ExposeCDSBlueprintprocessorNodePortStep: expose CDS blueprint nodeport (Guilin workaround)
116- [CDS] BootstrapBlueprintprocessor: Bootstrap a blueprint processor
117- [CDS] DataDictionaryUploadStep: Upload a Data Dictionary to CDS
118- [CDZ] CbaEnrichStep: Enrich CBA
119- [K8S plugin] K8SProfileStep: Create K8S profile
120- [SO] YamlTemplateVfModuleAlaCarteInstantiateStep: Instantiate VF module described in YAML using SO a'la carte method
121- [SO] YamlTemplateVlAlaCarteInstantiateStep: Instantiate network link described in YAML using SO a'la carte method.
122- [SO] YamlTemplateVfModuleAlaCarteInstantiateStep: Instantiate VF module described in YAML using SO a'la carte method
123- [SO] YamlTemplateVnfAlaCarteInstantiateStep: Instantiate vnf described in YAML using SO a'la carte method
124- [SO] YamlTemplateServiceAlaCarteInstantiateStep: Instantiate service described in YAML using SO a'la carte method
125- [AAI] ConnectServiceSubToCloudRegionStep: Connect service subscription with cloud region
126- [AAI] CustomerServiceSubscriptionCreateStep: Create customer's service subscription
127- [AAI] CustomerCreateStep: Create customer
128- [AAI] LinkCloudRegionToComplexStep: Connect cloud region with complex
129- [AAI] ComplexCreateStep: Create complex
130- [AAI] RegisterCloudRegionStep: Register cloud region
131- [SDC] YamlTemplateServiceOnboardStep: Onboard service described in YAML file in SDC
132- [SDC] YamlTemplateVfOnboardStep: Onboard vf described in YAML file in SDC
133- [SDC] YamlTemplateVspOnboardStep: Onboard vsp described in YAML file in SDC
134- [SDC] VendorOnboardStep: Onboard vendor in SDC
135
136You can reuse the existing steps to compose your test and/or code your own step
137if it is not supported yet.
138
139The procedure to start a test is described in `pythonsdk-test README <https://git.onap.org/testsuite/pythonsdk-tests/tree/README.md>`_
140
mrichomme0fcaa852020-11-26 15:24:27 +0100141CI/CD
142-----
143
144The CI/CD is key for integration. It consolidates the trustability in the solution
145by the automated verification of the deployment and the execution of tests.
146Integration tests complete the component tests (unit and functional known as
147CSIT tests).
148
149Xtesting
150~~~~~~~~
151
152As the tests can be very heterogeneous (framework, language, outputs), the
153integration team integrates the tests in simple isolated execution context based
154on docker called **xtesting dockers**.
155
156Xtesting is a python library harmonizing the way to setup, run, teardown,
157manage the artifacts, manage the reporting of the tests (automatic push of the
158results on a DB backend). It was developed by
159`OPNFV functest project <https://git.opnfv.org/functest-xtesting/>`_.
160This python library is included in an alpine docker and contains the needed
161tests, their associated libraries as well as a testcases.yaml listing these tests.
162These docker files are built on any change in the integration/xtesting repository
163and daily to take into account the upstream changes.
164
165The integration project manages 5 xtesting dockers, see
166:ref:`Integration Test page <integration-tests>`.
167
168.. important::
169 **xtesting is a CI/CD framework, neither a test nor a test framework**
170
171 Testers can provide tests independently from xtesting.
172 However to be part of the CI/CD chains, an integration of the test in xtesting
173 will be required.
174
175The configuration files are provided as volumes and defined in each docker.
176The use of this CI/CD abstraction for the tests simplify the integration
177of the test suites in any CI/CD systems and harmonize the inputs and the outputs.
178
179The official documentation can be found on
180`xtesting official web site <https://xtesting.readthedocs.io/en/latest/>`_
morganrol81dc70f2021-04-06 19:57:44 +0200181
182Integration Test database
183~~~~~~~~~~~~~~~~~~~~~~~~~
184
185The integration team shares a Test Result Database with the OPNFV project. All
186the test results of the CD are automatically pushed to this database.
187It is possible to retrieve the results through the Test API associated with this
188test Database.
189
190The following information are available:
191
192- List of pods allowed to push results: http://testresults.opnfv.org/onap/api/v1/pods
193- List of projects that declared test cases for CI/CD: http://testresults.opnfv.org/onap/api/v1/projects
194- List of integration test cases:
195 http://testresults.opnfv.org/onap/api/v1/projects/integration/cases
196- List of security test cases:
197 http://testresults.opnfv.org/onap/api/v1/projects/security/cases
198- Results with lots of possible filter combinations: http://testresults.opnfv.org/onap/api/v1/results?last=3
199
200It is possible to get results according to several criteria (version, case name,
201lab, period, last, CI id,..)
Cédric Ollivier9d6e8082022-07-04 17:00:50 +0200202See the `OPNFV test API documentation
203<https://docs.anuket.io/en/stable-lakelse/testing/ecosystem/overview.html#test-api-description>`_.
morganrol81dc70f2021-04-06 19:57:44 +0200204
205Any company running ONAP Integration tests can be referenced to push their results
206to this database.
207This Database is hosted on a LF OPNFV server. Results are backuped daily.
208Integration committers can have access to this server.
209
210VNF demo Artifacts
211~~~~~~~~~~~~~~~~~~
212
213VNF demo artifacts are hosted in the demo repositories and published in
214https://nexus.onap.org/content/repositories/releases/org/onap/demo/vnf/.