summaryrefslogtreecommitdiffstats
path: root/docs/files/ICE.rst
blob: 094c4f32bfb303445ffc0029fd7ead2345d6240e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2018 Orange Labs.

ICE validation scripts
======================

The ICE validation scripts are based on the python ``pytest`` tool.
These scripts check that the Heat Templates are compliant with the ONAP Heat Template Guidelines.

Installation
------------

This software is not platform dependent and can be run in a Windows, Unix or
OS X environment.

- Install python 2.7 or python 3
- Install pip

In addition to python, this project requires the following packages:

- pytest
- PyYAML

Depending on the desired output format, you should add the following optional packages:

- pytest-tap
- pytest-html

These can be installed using pip (assuming pip is installed) with the command:

``$ pip install pytest PyYAML pytest-tap pytest-html``

Usage
-----

Retrieve the ICE scripts, by cloning the sources:

``$ git clone https://git.onap.org/vnfsdk/ice``

Go into the ice_validator directory:

``$ cd ice/validation-scripts/ice_validator``

The Heat templates validation may generate different output format (plain, tap, html):

- plain format

``$ pytest --template-directory=<Directory>``

- tap format

``$ pytest --tap-stream --template-directory=<Directory>``

- html format

``$ pytest --html=/path/to/report.html --template-directory=<Directory>``

NB: ``<Directory>`` is the absolute path of the folder containing the Heat
Templates to be verified.

.. image:: ./ice-report.png

Figure 1: example of html report generated by ICE scripts